-
Notifications
You must be signed in to change notification settings - Fork 794
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 superclass role to ARIA lookup table #2151
Comments
Thanks for the issues. @WilcoFiers will have a better idea of if this is intended or not. |
@NickAb the "type" is not intended to be an accurate representation of the element's superclass. Admittedly, it looks way too much like the superclass, so I understand the confusion. getRoleType() === 'widget' does is tell us if the thing can be focusable. You can see that for example in the focus-order-semantics rule. To be honest, I'd like this "type" property to get deprecated and be replaced by proper superclass, and maybe have a prop that says whether or not the thing "may" or "should" be focusable. I think the proper solve here is to add a "superclass" property to the lookup table. Would you be open to putting in a pull request for this? Fair warning, it'll likely take 3 to 5 months before we can do another release with new features in it, so if you're in a hurry with the rule, you may want to bake a solution into the rule in the mean time. |
Link to #1677 |
To fix: in the ariaRoles standard, each role should have a new property called For example, the alertdialog role should be: |
Could I take a stab at this issue if no one else is working on it? |
All yours. Let us know if you need anything. |
I've added the |
Nope. Just adding the property to the standards file should be enough. We can take care of incorporating it into the |
Thanks! I've created the PR: #2600 I've signed the CLA but I'm still getting a note saying that I haven't signed it yet in the PR |
Thanks! I'll take a look. Sometimes the CLA can be finicky so I'll see what's going. |
As this is code based, marking it as devTask. Please let me know if anything needs from QA. |
Incorrect role type is returned for the role of dialog: lookup-table.js#L492.
Expectation:
axe.commons.aria.getRoleType('dialog')
returns'window'
.Actual:
axe.commons.aria.getRoleType('dialog')
returns'widget'
.Reference: https://www.w3.org/TR/wai-aria-1.1/#dialog
Motivation: I want
getRoleType
to return role types according to aria spec. This is so that we can use returned role type in a custom rule to run keyboard reachability checks.Wider issue #672 was closed with suggestion to open role specific ones.
The text was updated successfully, but these errors were encountered: