-
Notifications
You must be signed in to change notification settings - Fork 70
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
"Role attribute has valid value" [674b10]: how to enforce WCAG mappings #1862
Conversation
## Expectation (mapping to 4.1.2) | ||
|
||
Each test target either has at least one token which is a valid value corresponding to a non-abstract role from [WAI-ARIA Specifications][]; or the test target is not a [user interface component](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components) | ||
|
||
## Expectation (mapping to 1.3.1) | ||
|
||
Each test target either has at least one token which is a valid value corresponding to a non-abstract role from [WAI-ARIA Specifications][]; or the test target has not a [structure](https://www.w3.org/TR/WCAG21/#dfn-structure) conveyed through presentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposing two different versions, depending on the mapping we want to have.
I feel the 4.1.2 version is better, but also that the mapping is weaker (since less roles are UI components).
The 4.1.2 version would accept a mispelled list
while the 1.3.1 version would reject it…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm struggling to understand how any test target could meet the second part of the expectation version 1.3.1. If the test target must not be programatically hidden then it always have structure conveyed through presentation (because it will always be organised in relation to other parts of the web page).
Side question is whether we want to add examples for these exceptions, knowing that it would effectively prevents automated tools to claim a complete implementation 🤔 |
## Expectation | ||
## Expectation (mapping to 4.1.2) | ||
|
||
Each test target either has at least one token which is a valid value corresponding to a non-abstract role from [WAI-ARIA Specifications][]; or the test target is not a [user interface component](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both the UIC and the structure definitions are ambiguous. UIC because it is not clear who is meant by "users", and "structure" for not specifying what "organize" means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can replace UIC by our definition of Instrument but that would require to define the objective, so I'm not sure it would actually work 😕
Another possibility that we've discussed would be to change the ACT rules format to have both mandatory and optional mappings. For this rule, it would be something like:
So, implementation that fail one or the other SC on some or even all test cases would be considered consistent, but implementations that fail 2.1.1 would not be considered consistent. This could also be used to streamline the button/image button rules by removing the "button not image button" exception from "button has accessible name" and having instead a mandatory mapping to 4.1.2 and an optional to 1.1.1. |
That seems like a good solution. It might also solve the mapping problem in #1810 (comment) Might also be worth considering conditional mappings. For a lot of ARIA issues 4.1.2: Name, Role, Value seems like the best option, but then has problems because it only applies to [user interface components] (https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html#dfn-user-interface-component) So you could say something like
That could also fix #1875. The conditional mapping for an area without alt would be:
|
The ACT rule format is moving toward having secondary requirements, which would be a better way to handle this kind of cases. Closing this. |
Role attribute has valid value has a mapping to 1.3.1 (4.1.2 would be another candidate) which is not always respected. But in man of the cases, a mispelled
role
is still an accessibility error.After TF discussion, we tried to remove the mapping in #1854 but this opened concerned from tool vendors that it will effectively remove the rule from the checks that their users care about since they are usually focused on compliance. See also the CG call discussion about removing mappings.
As per the CG call discussion, this tries to add a non-automatable exception to the Expectation to ensure the mapping is correct. I've tried both with 1.3.1 and 4.1.2. The later sounds much better imho, but the mapping is also weaker…
These propositions should likely be taken to the TF for further discussions at some point.
Closes issue(s):
Need for Call for Review:
N/A, this is mostly for opening discussion.
Pull Request Etiquette
When creating PR:
develop
branch (left side).After creating PR:
Rule
,Definition
orChore
.When merging a PR:
How to Review And Approve