-
Notifications
You must be signed in to change notification settings - Fork 125
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
ARIA 1.1: aria-expanded is not supported on menuitem roles #454
Comments
@accdc, do you have info regarding which browsers already expose aria-expanded on menuitems? |
This is already supported in IE11, Firefox, and Chrome from what I just tested in the accessibility tree using a Windows machine. |
So, we already have 2 implementations. Could someone test on a Mac? |
Looks like AXExpanded is correctly exposed for aria-expanded on role=menuitem in both Chrome and Safari in Mac OS. However, VoiceOver isn't speaking "expanded" or "collapsed" for menuitems. |
Discussing this during a ARIA concall: Question to be answered is what about menuitemradio and menuitemcheckbox. |
Hi, thinking about this further, it makes sense that aria-expanded would be supported on all of the same menuitem roles that support the use of aria-haspopup to convey the presence of a submenu. Otherwise there is no point to it. So if you look at the 1.1 spec for role=menuitem, you will see explicit instructions for adding aria-haspopup to convey this, however there are no such instructions for the roles menuitemcheckbox or menuitemradio regardless that aria-haspopup inherits into each of these. My conclusion is to just add support for aria-expanded on the same roles where aria-haspopup is supported in this case and instruct people to build things in a way that makes sense in practice. |
Questions about this have come up a couple times recently on StackOverflow:
…and I’ve answered them as best as I can—but note that among the reasons that web developer-authors want to know what the right thing to do here is that there are some W3C guides and tutorials that use
Because those are in violation of the ARIA spec, they cause the W3C HTML Checker (validator) to report error messages. See w3c/aria-practices#410 for discussion of that. |
Hi, as a quick update to this, here are the ARIA WG meeting minutes where this was discussed. There were no objections to including aria-expanded as a supported attribute for role=menuitem. Since ARIA 1.1 is still technically not a ratified spec document it may take a bit for the validators and checkers to catch up with this, however this attribute is indeed valid on this role and the spec is supposed to reflect this in the future. |
Thanks for the clarification Bryan |
As an update to the update: While there were no objections, making this change during the ARIA 1.1 time frame assumed two things:
The first condition is not occurring. As a result, the attribute is technically not valid on this role in ARIA 1.1 and the spec will not reflect this until ARIA 1.2. Sorry!! |
Arg, that's good to know thanks. At present though I think it does no harm to have this attribute on role=menuitem. We currently have this within the APG. |
Matt and others, do you think this should be removed from the menu code? |
Given there is consensus this should be changed in the spec for ARIA 1.2 and that it is already implemented in browsers on all major platforms, per discussion in last week's APG meeting, we plan to leave it in the APG examples with an appropriate note that will link here. |
It's now supported on menuitem. See above commit. Ironically, it menuitem is one of the few things it wasn't supported on. See issue #681 which I just opened. We can discuss the menuitemcheckbox and menuitemradio issue mentioned here as part of 681. I'm going to close this issue as fixed. I'll do a snapshot next so there will be an Editor's Draft we can point to so the validator stuff can be addressed. If I missed anything we need to do as part of this issue, please re-open and comment. Thanks! |
I’ve updated the HTML checker to support this, and pushed the update to https://validator.w3.org/nu/ |
@joanmarie, Glad to see this! Two additional questions come to mind:
|
|
To ensure accessibility on touch screen devices, aria-expanded needs to be supported on role=menuitem in order to convey which menu item is currently expanded as opposed to others that are not.
The text was updated successfully, but these errors were encountered: