w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
654 stars 125 forks source link

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

Closed accdc closed 6 years ago

accdc commented 8 years ago

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 commented 8 years ago

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

accdc commented 8 years ago

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

mcking65 commented 8 years ago

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 commented 7 years ago

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.

joanmarie commented 7 years ago

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

accdc commented 7 years ago

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 commented 7 years ago

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 https://github.com/w3c/aria-practices/issues/410 for discussion of that.

accdc commented 7 years ago

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 commented 7 years ago

Thanks for the clarification Bryan

joanmarie commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

mcking65 commented 7 years ago

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 commented 6 years ago

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 commented 6 years ago

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

jspurlin commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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