-
Notifications
You must be signed in to change notification settings - Fork 355
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
Navigation Menu Button: menuitem role automatically hides semantics? #989
Comments
Hi, @michaelwayneharris87, thanks for pointing this out at CSUN! I agree with your assessment— |
I disagree - |
I think the prose needs to be changed rather than adding |
Can you link to the part of the spec that says Thanks so much for the help — I've had a terrible time remediating a widget based on the inconsistent docs. |
Things that can't have children have children Presentational set to true. I don't think we have the inverse. |
OK — I guess I wish I could better follow how it is we know that, given the discrepancy between the Navigation Menu Button example and the relevant section of the Authoring Practices, we know which one is correct. But so long as the discrepancy can be resolved, that would be really helpful. |
I agree that text is confusing. It needs fixing. The below is not elegant text and needs wordsmithing but something like the following is what I believe it needs to say. Another reason the menuitem role is not on the li element is that the semantics of descendants of ARIA menuitem elements are not exposed in the accessibility tree, except for when the menuitem contains a child menu. That is, an item in a menu can only be a menuitem because accessibility APIs do not enable assistive technologies to render elements contained inside of an item in a menu. This is similar to Roles That Automatically Hide Semantics by Making Their Descendants Presentational, except for the fact that menuItems can own sub menus. |
“Another reason the menuitem role is not on the li element is that the semantics of descendants of ARIA menuitem elements are not exposed in the accessibility tree, except for when the menuitem contains a child menu. That is, an item in a menu can only be a menuitem because accessibility APIs do not enable assistive technologies to render elements contained inside of an item in a menu. This is similar to Roles That Automatically Hide Semantics by Making Their Descendants Presentational, except for the fact that menuItems can own sub menus.” Why can't it just read 'This role must not include any embedded active elements besides those with role=menu, role=menubar, role=menuitem, role=menuitemcheckbox, or role=menuitemradio.' |
@jnurthen Do you have an example somewhere that has menus as children of menuitems? The spec does refer to "child menus", but maybe that just means "the associated submenu"? The APG Menu or Menubar section says:
|
No I can't - but the current advice to add a sibling element leads to incorrect information being exposed in the accessibility APIs today. See the screenshot below. The submenu is open and the top menu shows a child count of 6 items rather than the correct count of 5. Now in practice this generally isn't an issue as focus is in the submenu at the time so the fact that the number of items in the parent menu is off by 1 is not normally a real problem for users. |
I guess the screen readers are only counting the menuitem children - I just tried our (sibling markup) menubar (has several submenus) with JAWS/NVDA in both FF/Chrome and the spoken counts are correct. |
The ARIA in HTML entry for menuitem notes the following in the "Descendant Restrictions" column:
Looks like this was discussed before, in APG issue #592. |
There seems to be some inconsistency in the introduction to the Navigation Menu Button Example page.
The introduction states:
I think that is telling me that I should expected to find menuitem in the list that is linked to. However, menuitem is not in that list. (menuitemcheckbox and menuitemradio are on the list, however).
So, something isn't adding up for me. Can we add menuitem to the list of roles that make their children presentational, or change the language in the intro to the navigation menu button pattern to be less confusing?
Thanks!
The text was updated successfully, but these errors were encountered: