Follow-up to w3c/aria#2782.
| Element | Implicit role |
|---|---|
<menubar> | menubar |
<menulist> (a popover) | menu |
<menuitem> | menuitem |
<menuitemcheckbox>, <menuitemradio> |
menuitemcheckbox, menuitemradio |
<submenu> | none (display: contents) |
Keyboard model follows the APG menu / menubar pattern. Explainer · whatwg/html#12011
Arrow keys move between menuitems, one tab stop for the whole menu, Esc closes the current menulist and returns focus to its invoker.
<nav><a> isn’t allowed in a
menu.
Navigation menus will get a separate proposal (OpenUI #1193).
Video player settings: Chrome’s own built-in video controls use menu roles. The ⋮ overflow menu is role=menu, and its items are <label role=menuitem> elements wrapping a <button>. The Playback speed and Captions submenus are role=menu with menuitemcheckbox items, and a “Back to options” header that is role=button, i.e. a button directly inside a menu (see blink/renderer/modules/media_controls/elements/).
<menubar>
<submenu>
<menuitem>File</menuitem>
<menulist>
<menuitem>New</menuitem>
<menuitem>Share…</menuitem>
<menuitem>Open…</menuitem>
<hr>
<menuitem>Save</menuitem>
…
</menulist>
</submenu>
</menubar>
<!-- Or from any button: -->
<button commandfor=file
command=toggle-popover>
File
</button>
<menulist id=file>
<menuitem>New</menuitem>
…
</menulist>
No ARIA, no JS. The accessibility tree is the interesting part.
Go quickly. The button gets implicit aria-haspopup=menu and aria-expanded.
Changed since we presented to ARIA in May: submenus used to be connected with ID references (command=toggle-menu commandfor=…). Now they’re nested in the DOM with <submenu>, and the toggle-menu command is gone; a button opens a standalone menulist with toggle-popover or popovertarget.
Press → to step through. NVDA doesn’t say “menu item” when arrowing through these menus (checked with the real elements).
Soft disabling IF NECESSARY: we talked about this at Open UI a lot with Scott O'Hara. Conclusion: we don’t want to add soft disabling just for menus. It should be a platform feature that works for any disableable element. We have an open issue for this.
<menuitem> and its checkbox
and radio versions<submenu> = menuitem + menulist<hr>,
<fieldset>, <div><button>,
<input>, …<a> (hidden by default)<menuitem> or
<legend>Text and images go inside a menuitem. The arrow keys only stop on menuitems.
This content model is stricter than ARIA’s. The big difference: HTML forbids interactive content inside a menuitem (no button, link, input or tabindex inside it), while ARIA allows it. The menuitem role puts no limits on its children, and its children aren’t presentational.
Anchors get a default display: none in menus.
What would happen if the browser did no repair:
<button>Share…</button>
is never reached. Screen-reader users don’t know it’s there.Same menu, but Share… is a <button> instead of a <menuitem>. Arrow keys only stop on menuitems, so the button gets skipped. A sighted mouse user can still click it. A sighted keyboard user can see it and get frustrated, but a screen-reader user never learns it exists.
Like <select>, which falls back when it has interactive content.
<select>: its
picker becomes a dialog and Tab
reaches everythingmenu then owns
things it isn’t allowed to ownWe’ve been working on (a). All three are where we want feedback.
(c) is here because someone may argue the browser shouldn’t guess at all: leave the menu as the author wrote it, and rely on the DevTools warning to get it fixed.
Why not a straight copy of <select>: a select has one popup, so one dialog. Menus nest, so “dialog everywhere” gives nested dialogs (attempt 1).
If someone suggests hiding the menu or the invalid content (display: none): we decided against that for customizable select in openui#540 (2022), and we’re following that precedent.
Success means screen-reader users can find and use everything. It won’t be a great menu.
Set expectations before the attempts: none of them produce a good experience.
Devtools: the Blink web platform team recently, last few years, convinced the chrome devtools team to show console warnings when pages use new primitives in an a11y-unfriendly manner. That unblocked us to do the same here.
menubar → dialog
menuitem File
menulist → dialog
menuitem New
button Share
…
Menuitems kept their menuitem role in attempts 1 and 2.
Lucas said he has never run into nested dialogs in the wild.
menubar → dialog
menuitem File
menulist → list
menuitem New
button Share
…
Focus stays on the menubar. SR users expect a dialog to close and focus to move, but a menubar can’t close.
With the button counted, the broken File menu is “X of 6” again (New 1, Share… 2, Open… 3, …) instead of “X of 5” with the button left out.
But can't CLOSE the outer dialog / menubar because a menubar always takes up space in the page
Scott hinted at this back in May (at OpenUI, not in the ARIA discussion): when a menu tree has invalid content, probably leave the top-level menubar as something other than a dialog.
menubar → list
menuitem File → listitem
menulist → list
menuitem New → listitem
button Share
menuitem Open… → listitem
…
listitem can’t be expanded or
collapsedThis is what Chromium does today (Oct 2026). NVDA seemed confused. TODO: add the exact NVDA output.
Why checkbox/radio: ARIA’s listitem supports only aria-posinset and aria-setsize, so it can’t be checked. For the same reason it can’t be expanded or collapsed, so “File” loses its submenu state. NVDA still sometimes said “submenu”. We first thought it was reading the HTML tag name, but it may instead come from aria-haspopup=menu: Chromium sets that on a menuitem with a submenu, and it may survive the change to listitem. NVDA says “submenu” for any menu item with a popup, e.g. “File submenu 1 of 4” in a valid menubar.
menubar → tree
menuitem File → treeitem
menulist → group
menuitem New → treeitem
button Share
menuitem Open… → treeitem
…
treeitem supports aria-expanded
and aria-checkedPromising results in initial testing, but we're far from positive.
menubar → tree
menuitem File → treeitem
menulist → group
menuitem New → treeitem
button Share
menuitem Open… → treeitem
…
<submenu> gets an implicit
aria-owns pointing at itFixes what was non-compliant in attempt 4. ARIA says a treeitem’s parent must be a tree or a “group with accessibility parent treeitem”, so a submenu’s group has to be a child of the treeitem that opens it, not its sibling. The DOM has them as siblings inside <submenu>, so the treeitem implicitly owns the group.
Only while the menulist is open: a closed menulist is a hidden popover, so it isn’t in the accessibility tree anyway.
The same rule applies at every level, e.g. a submenu inside File.
Caveat: invalid content placed directly in the <menubar> (not inside a submenu) is still non-compliant in attempts 4 and 5. It would be a child of the tree, and ARIA only allows treeitem children in a tree. The example on the slide has the button inside a submenu, so it’s compliant.
menubar / menu /
menuitem roles on the menu HTML elementsmenu would have children with roles that ARIA disallows…That's option (b) from earlier. This is the main question for the group.
NVDA + Chrome test (ARIA mock-up: role=menu with a <button> between menuitems, arrow keys reaching it): NVDA stayed in focus mode on the button, so the arrow keys kept working. It said “New 1 of 4”, “Share button”, “Open Recent 2 of 4”, “Save 3 of 4”. So the button is announced, but the count skips it (4 items, 5 arrow stops). Counting it would need a position on a button, which ARIA doesn’t list as supported for that role. Only NVDA tested so far.
Will users be better served, across all the screen readers that you're familiar with, by menu elements falling back to some set of non-menu roles when there's interactive content (option a), or by trying to treat that interactive content as a menuitem? (option B)
Wrap violations in menuitems would not be good for SR users -- what would TAB do if they were focused on one of these menuitems with interactive descendants? The expect it would jump to the next form control (or something) on the page, not to a different place inside the menu.
ARIA, Handling author errors:
User agents are not responsible for logical validation, such as the following: […]
4. Elements that do not correctly observe required child / parent role relationships or that appear elsewhere than in their required parent.
So any repair is currently up to each browser.
ARIA already has a page, Browser accessibility heuristics, that documents stuff like:
aria-modal ignored (WebKit)<table> is data or
layoutaria-hidden on the root is ignored (now in the
spec)Where should menu repair go? HTML? HTML-AAM? ARIA? That documentation page?
Data vs. layout tables: browsers guess whether a <table> holds data or is only used for page layout. A data table is exposed as a table, with headers and cells a screen reader can navigate; a layout table is flattened so its cells read as ordinary content. Every major engine guesses from clues like <th>, <caption>, borders, size and nesting, the rules differ between engines, and none of it is specified. Menu repair would be the same kind of thing.
if Chromium repairs to trees and another engine repairs differently, screen-reader users get vastly different experiences on the same page.
Maybe if we find a good repair solution, we standardize, but if it's not great, we'll just document it, so as to not lock in other implementers?
Slides for the ARIA WG meeting at TPAC 2026. To start the slide show, press ‘A’. Return to the index with ‘A’ or ‘Esc’. In slide mode, press ‘?’ for a list of commands. Notes like this one are shown between slides in the index and on the second screen.