-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check to fail fallback roles #724
Comments
aXe-core currently doesn't support multiple roles in any way. The first proposed adoption of multiple roles in in a PR I opened 2 days ago (#722). I do think we need to start supporting this, but we'd need to come up with a strategy for doing so. It isn't quite as easy as picking the first one we recognise and going with that. It may also require some structural changes to how aXe-core works today. Some considerations (for future reference):
I think the first step should be to test multiple roles in assistive technologies. Specifically, we need to know if AT don't just ignore the role if they don't recognise the first role, but actually look at subsequent roles in the role attribute. I'm flagging this as help wanted, because we need to get the test work done for at least all of the AT in our accessibility support document. |
I think the next line of the spec answers the question of which role to accept:
I think unknown roles should be ignored by aXe, and the first known role taken, with any further roles ignored. I found some notes on how AT react to multiple roles from 2015 here: Not sure if @stevefaulkner or others have done any further research into this. |
Thanks for that link @jwheare Please read the information pointed-to by @WilcoFiers https://github.com/dequelabs/axe-core/blob/develop/doc/accessibility-supported.md This outlines what axe-core policy is with respect to the WCAG 2 concept of "accessibility supported", so we need definitive tests of all the platforms listed on current versions. Minimally missing from that Paciello page are: JAWS |
I just tested Steve’s code pen on Android 6.0.1 with Talkback and all test cases are reported correctly. |
Unfortunately it doesn’t seem to be supported in JAWS+IE, I filed an issue at FreedomScientific/standards-support#51 |
That's pretty unfortunate. So we could add support for it, but we can't enable it by default. Probably not for some time, given how slow most JAWS users are to update. |
At the least, you could parse the roles, but offer a more precise warning about the risks of incomplete AT support. |
Agreed. That would be quite helpful. |
@jwheare @WilcoFiers unless we add complete support for customizing the list of ATs, we want to stick with the primary value proposition of axe-core: If we say it doesn't work, we know what we are talking about, that means it does not work somewhere important. If we say it does work, you can trust us, it works everywhere. |
I think it would be indeed useful to add some sort of support: there could be cases where a role is supported in IE+JAWS but not somewhere else (like macOS/iOS+VO), which would effectively make the multirole approach a supported fallback mechanism. |
@dylanb makes sense. I'm only suggesting that it would be more useful for developers if it says specifically what doesn't work (multiple roles) rather than attributing the errors incorrectly as the original issue shows. It's not necessary to list ATs to do that. Hope that's clear :) |
I think there might be confusion where the support issues for this might be. Screen readers have nothing to do here as this is a browser requirement. Dragon could be a problem here - but there are cases (such as With every new role added to ARIA the best way for a developer to use them is with a fallback role to something similar which isn't supported as well. Checkers such as aXe throwing errors in this case makes it much harder to uptake new features and still support a wider array of browsers/AT. |
This was added as part of axe-core v3.5.0. The axe.configure({
checks: [
{
id: 'fallbackrole'
enabled: false
}
]
}); |
Reposting from GoogleChrome/lighthouse#4474
Given the following markup, aXe reports a few errors, I believe due to not being able to validate both roles in
<span role="tab button">
at onceCodepen: https://codepen.io/anon/pen/mXRPJJ
From the HTML spec https://www.w3.org/TR/html52/dom.html#aria-role-attribute
The Chrome accessibility tree also computes the role correctly as
tab
Errors from the chrome extension:
Elements must only use allowed ARIA attributes
ARIA attribute is not allowed: aria-selected="false"
<span role="tab button" tabindex="0" aria-selected="false">Header</span>
Certain ARIA roles must contain particular children
Required ARIA child role not present: tab
<ul role="tablist">
ARIA roles used must conform to valid values
Role must be one of the valid ARIA roles
<span role="tab button" tabindex="0" aria-selected="false">Header</span>
The text was updated successfully, but these errors were encountered: