-
Notifications
You must be signed in to change notification settings - Fork 779
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 ATSupported checks to ARIA rules #918
Comments
On second thought, perhaps a separate rule instead... Thoughts? |
More of an explanation about ARIA roles and attributes could also help to differentiate between these two common scenarios, which are pretty cryptic:
|
Like adding everything from the ARIA spec to the lookupTable? We can't rely on aria-query completely due to its reliance on Sets, IIRC?
It seems like the actual marking of support should live in the lookupTable, and the checks simply look up those flags and report them to the user. Disabling the new checks would put axe back to how it operates now. Is there anything else you want to add @WilcoFiers? |
I don't have it all worked out... I do think we should use aria-query. We can't use it directly, but there's probably a way that we can use it to build an object structure that we can safely include into axe. As for where the support data should be. Probably somewhere as a data structure in If you're not sure how to proceed, maybe a quick design doc would help. |
Some more thoughts. I think we should turn whatever we do into one, or possibly multiple JSON files, rather than have them live in JS code. All this is static data, lets store it that way. |
Wilco and I paired on this for a while today, here's what we decided was the least complicated to implement and iterate on in the future: Mapping checks to unsupported data
Making it configurable through the API
Future improvements
-- |
I'm liking this plan a lot :-). One tweak to make to it. for axe.commons.support({
roles: { figure: false },
ariaProps: { roledescription: false }
}) |
Adds `unsupported` property to the lookupTable.role dictionary. New option for aria.isValidRole to flagUnsupported roles. Defaults to false since this commons function is reused for multiple checks. TODO: Add `unsupported` to lookupTable.attributes and figure out what to do with globalAttributes Part of #918
Adds `unsupported` property to the `lookupTable.role` dictionary. New option for `aria.isValidRole` to `flagUnsupported` roles. Defaults to `false` since this commons function is reused for multiple checks. Part one of #918. TODO: - Add `unsupported` to lookupTable.attributes - Figure out what to do with globalAttributes, which are currently a flat array - Add `axe.commons.support` API and enable control of it through `axe.configure` ## Reviewer checks **Required fields, to be filled out by PR reviewer(s)** - [x] Follows the commit message policy, appropriate for next version - [x] Has documentation updated, a DU ticket, or requires no documentation change - [x] Includes new tests, or was unnecessary - [x] Code is reviewed for security by: @WilcoFiers
@WilcoFiers I have a note to do something about global attributes, which are a flat array. But those attributes are repeated in the more granular ARIA attribute object, so I don't think there is anything specific we need to do for that. Does it really matter if an unsupported attribute is global? |
Here's something I found that could be related: the The matches file also duplicates some of the same work as the I've written the new check to look at any ARIA attribute on the node and consult the lookupTable on whether it is supported. Here's what I have so far: #1254 Feel free to discuss here or on the PR! Thanks :) |
This branch adds a new check to report unsupported ARIA attributes to the user. We have to make a decision on how to modify the rule to support it, which you can find discussed in #918. Closes issue: #918 ## Reviewer checks **Required fields, to be filled out by PR reviewer(s)** - [x] Follows the commit message policy, appropriate for next version - [x] Has documentation updated, a DU ticket, or requires no documentation change - [x] Includes new tests, or was unnecessary - [x] Code is reviewed for security by: @WilcoFiers
closing after consultation |
One of the difficulties with the ARIA rules is that it is unclear if an ARIA attribute / role wasn't supported, or if they made had a typo. To solve this we should include all available ARIA attributes and add checks that flag unsupported properties as violations. This has the added benefit of making it easy to ignore unsupported properties by simply disabling these checks.
The text was updated successfully, but these errors were encountered: