Skip to content
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

Closed
accdc opened this issue Oct 31, 2016 · 18 comments
Closed

ARIA 1.1: aria-expanded is not supported on menuitem roles #454

accdc opened this issue Oct 31, 2016 · 18 comments
Assignees

Comments

@accdc
Copy link
Contributor

accdc commented Oct 31, 2016

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.

@mcking65
Copy link
Contributor

mcking65 commented Nov 1, 2016

@accdc, do you have info regarding which browsers already expose aria-expanded on menuitems?

@accdc
Copy link
Contributor Author

accdc commented Nov 1, 2016

This is already supported in IE11, Firefox, and Chrome from what I just tested in the accessibility tree using a Windows machine.

@mcking65
Copy link
Contributor

mcking65 commented Nov 2, 2016

So, we already have 2 implementations.

Could someone test on a Mac?
Maybe we have implementations in all major browsers. @michael-n-cooper, if we did, could this actually be part of 1.1?

@jasonkiss
Copy link
Contributor

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.

@mcking65 mcking65 self-assigned this Jun 15, 2017
@joanmarie
Copy link
Contributor

Discussing this during a ARIA concall: Question to be answered is what about menuitemradio and menuitemcheckbox.

@accdc
Copy link
Contributor Author

accdc commented Jun 22, 2017

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.

@sideshowbarker
Copy link

sideshowbarker commented Jul 8, 2017

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 aria-expanded with role=menuitem in violation of the ARIA spec:

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.

@accdc
Copy link
Contributor Author

accdc commented Aug 8, 2017

Hi, as a quick update to this, here are the ARIA WG meeting minutes where this was discussed.
https://lists.w3.org/Archives/Public/public-aria/2017Jun/0036.html

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.

@LaurenceRLewis
Copy link
Contributor

Thanks for the clarification Bryan

@joanmarie
Copy link
Contributor

joanmarie commented Aug 8, 2017

As an update to the update: While there were no objections, making this change during the ARIA 1.1 time frame assumed two things:

  1. The ARIA 1.1 spec would need to exit and re-enter CR for other, more critical issues. The theory was, if we have to exit and re-enter CR, this seemed like a reasonable thing to include.
  2. There were no objections related to this change raised in the CfC to re-enter CR.

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!!

@accdc
Copy link
Contributor Author

accdc commented Aug 8, 2017

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.

@accdc
Copy link
Contributor Author

accdc commented Aug 8, 2017

Matt and others, do you think this should be removed from the menu code?

@mcking65
Copy link
Contributor

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.

@joanmarie
Copy link
Contributor

joanmarie commented Dec 6, 2017

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!

@sideshowbarker
Copy link

I’ve updated the HTML checker to support this, and pushed the update to https://validator.w3.org/nu/

@jspurlin
Copy link

@joanmarie, Glad to see this! Two additional questions come to mind:

  1. What about the following roles option, textbox, and searchbox? Those are some other roles that have aria-haspopup but does not support aria-expanded (there might be more, but these are the one's I've run in to most recently). For the textbox/serachbox example, if it displays results I've seen examples state to make the input a comboBox. The issue with that is you must use a listbox with a comboBox (for the "menu" scenario), and a listbox must contain option(s), but options currently do not allow for aria-expanded...
  2. What is the timeline for getting ARIA 1.2 published?

@jnurthen
Copy link
Member

@jspurlin

  1. If you think there are other issues please log issues for them. You can reference this as a base issue. Adding extra discussion to this issue will confuse it
  2. Our new charter which has the timeline is not yet finalised but you can find the draft at https://www.w3.org/2018/03/draft-aria-charter

@jspurlin
Copy link

@jnurthen FYI, it looks like #681 is already tracking the general work item to fix up aria-expanded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants