You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[a11y] Boot navigation: listitem elements are not contained by a list role, failing aria-required-parent #78803
In the new navigation screens (e.g. Site Editor admin.php?page=site-editor-v2 — Pages, Styles, Navigation views), each navigation entry is rendered via the Item component, which applies role="listitem". However, these items are not wrapped in any element with role="list" — their direct parent is a layout <div> with no list semantics.
Per WAI-ARIA, an element with role="listitem" requires an owning element with role="list". Without it, assistive technologies cannot convey the list structure (item count, position), and the markup fails the aria-required-parent check (WCAG 1.3.1, Info and Relationships).
Element:.boot-navigation-item (rendered as <div role="listitem" class="…itemWrapper">)
Current structure (simplified):
I have a working fix ready for this issue — it wraps the navigation items in a role="list" container so each listitem has its required parent, restoring valid list semantics for screen readers on the navigation screen. I can share a brief outline or open a PR once the approach is confirmed.
Before fix applied
After fix applied
Step-by-step reproduction instructions
Step-by-step reproduction instructions
Open the Site Editor navigation (admin.php?page=site-editor-v2).
Inspect any navigation entry (.boot-navigation-item).
Observe it has role="listitem" but no ancestor with role="list".
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Please confirm which theme type you used for testing.
Picking this up. Confirmed the current structure in trunk:
<divrole="list"><divclass="boot-dropdown-item"><!-- no role --><divrole="listitem">…toggle button…</div><divclass="boot-dropdown-item__children"><!-- no role --><divrole="listitem">…nav item…</div></div></div></div>
The boot-dropdown-item and children wrappers sit between role="list" and the listitems, so the toggle and child items are orphaned from their list parent.
Proposed fix make the dropdown a single listitem with a nested list for its children:
Add role="listitem" to the boot-dropdown-item wrapper.
Pass role="presentation" to the toggle Item so its default listitem wrapper doesn't create a nested listitem (the button stays the interactive toggle).
Add role="list" to the children motion wrapper so the child NavigationItems are owned correctly.
Does the above approach look right?
(One note on testing: since no menu item in default Gutenberg registers with parent_type: 'dropdown', this path doesn't render in the default editor, so I can't visually or axe-verify it the change would be code-level for correctness.)
Since #82509, Item only applies role="listitem" inside an ItemGroup, so on current trunk the boot navigation items render with no role at all, and the role="list" added in #78829 owns no list items. That also means the role="presentation" workaround for the dropdown toggle isn't needed anymore.
My proposed fix is to set role="listitem" explicitly on NavigationItem and DrilldownItem, and to make DropdownItem's wrapper a listitem with its children container as a nested role="list". @hi0001234d, I saw you picked this up. Happy to leave it to you, or to open a PR if you're no longer working on it. Let me know!
Activity
t-hamano commentedon Jun 2, 2026
I would like to reopen this issue as #78829 did not completely fix it. See #78829 (review)
hi0001234d commentedon Jun 23, 2026
Picking this up. Confirmed the current structure in trunk:
The
boot-dropdown-itemandchildrenwrappers sit betweenrole="list"and thelistitems, so the toggle and child items are orphaned from their list parent.Proposed fix make the dropdown a single
listitemwith a nestedlistfor its children:Concretely, in
dropdown-item/index.tsx:role="listitem"to theboot-dropdown-itemwrapper.role="presentation"to the toggleItemso its defaultlistitemwrapper doesn't create a nestedlistitem(the button stays the interactive toggle).role="list"to thechildrenmotion wrapper so the childNavigationItems are owned correctly.Does the above approach look right?
(One note on testing: since no menu item in default Gutenberg registers with
parent_type: 'dropdown', this path doesn't render in the default editor, so I can't visually or axe-verify it the change would be code-level for correctness.)Mustafabharmal commentedon Oct 6, 2026
Since #82509, Item only applies role="listitem" inside an ItemGroup, so on current trunk the boot navigation items render with no role at all, and the role="list" added in #78829 owns no list items. That also means the role="presentation" workaround for the dropdown toggle isn't needed anymore.
My proposed fix is to set role="listitem" explicitly on NavigationItem and DrilldownItem, and to make DropdownItem's wrapper a listitem with its children container as a nested role="list". @hi0001234d, I saw you picked this up. Happy to leave it to you, or to open a PR if you're no longer working on it. Let me know!