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

menuitem doesn't have presentational children? #1711

Open
scottaohara opened this issue Mar 22, 2022 · 7 comments
Open

menuitem doesn't have presentational children? #1711

scottaohara opened this issue Mar 22, 2022 · 7 comments
Assignees
Milestone

Comments

@scottaohara
Copy link
Member

Seems maybe a miss in aria 1.1, but menuitemradio and menuitemcheckbox each have "Children Presentational: true", where menuitem lacks this row in the characteristics table. Appear to behave that way, but wondering if this is a miss, or was there a potential reason for this?

@JAWS-test
Copy link
Contributor

JAWS-test commented Mar 23, 2022

It may be a mistake, but it may be intentional:

  • Nowhere in the ARIA specification does it say that a submenu cannot be a child element of menuitem (menu > menuitem > menu > menuitem). If this is forbidden, it should be in the specification. If it is not forbidden, menuitem should not have implicit role=presentation. Then it should only be specified that only menu is allowed as a child element of menuitem (see Implicit role=presentation except for Required Owned Elements #1034).
  • menuitemradio/-checkbox cannot have a submenu.

@JAWS-test
Copy link
Contributor

Nesting submenus in the menuitem would be useful for several reasons:

  • Consistent with role=tree/treeitem and nested lists (<ul>, <li>) where nested items are child elements.
  • Consistent with desktop application menus, where submenus are also child items of menu items.
  • seems more logical, therefore more intuitive to implement
  • useful way to correctly map the accessibility tree. A submenu is a child of a menu item, i.e. in the examples at https://www.w3.org/TR/wai-aria-practices-1.2/#menu the parent-child relationship is not correct because the submenus are siblings and not childs of the parent menu item. In general, it seems to me that the ARIA specification makes no statement about how a submenu must be located in the accessibility tree: it could be anywhere, even outside the parent menubar. If so, then it should at least be specified that menuitem refers to the submenu via aria-controls or via aria-owns.

@jnurthen jnurthen added this to the ARIA 1.4 milestone Mar 24, 2022
@scottaohara
Copy link
Member Author

from meeting today, this is on purpose but we need more clarity here on what are allowed children, and how this element should be treated as a semi-children presentational.

This should be resolved by indicating allowed descendant elements.

This may also touch upon other similar issues related to allowed descendants and even what does children presentational mean and how browsers / AT are now inconsistent in respecting this or not.

@craigkovatch
Copy link

craigkovatch commented Apr 21, 2022

Agree that this needs clarification. I'm currently trying to recommend our designers against doing this thing that Google Drive does -- tooltip in a menu item -- and without this clearly specified, it's more my opinion than objective. I assumed that menuitem was same as option in prohibiting interactive child content.

image

@JAWS-test
Copy link
Contributor

@craigkovatch In the future it may be possible to have more elements in the menuitem, see #1440

@jnurthen
Copy link
Member

jnurthen commented Sep 7, 2023

@scottaohara can this be closed now

@scottaohara
Copy link
Member Author

if you think this should be closed in favor of the #1120 issue you opened, sure?

but in your issue you say it should be closed by the merging of #1454, but as that's been merged, reviewing the definition of menuitem again, nothing has changed there that clarifies this, imo

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

No branches or pull requests

4 participants