Daily Accessibility ReviewNavigation Group Link Has tabindex="-1", Inaccessible to Keyboard Users #17760
Unanswered
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
In
shell/components/nav/Group.vue, when a navigation group has an "overview" (i.e., clicking the group header navigates to a route), the<router-link>inside the header hastabindex="-1". This means the link is not reachable via keyboard Tab navigation.The parent
<div class="header">element hasrole="button"andtabindex="0", which means keyboard users can focus it and press Enter to activate the link. However, the actual<a>element (the router-link) is explicitly removed from the tab order withtabindex="-1". This breaks the expected keyboard navigation semantics: screen readers may announce the element as a "button" rather than a "link", and the URL destination is not communicated to the user.WCAG 2.2 Violations
<router-link>(which renders as<a>) in arole="button"div and hiding the link from assistive technologies misrepresents the interactive element's role.Relevant Code
shell/components/nav/Group.vue(lines 259–283):Impact
This affects the primary "Cluster" navigation item in the secondary sidebar. When a user with keyboard-only navigation focuses the "Cluster" group header, the browser announces it as a button (not a link), and the destination URL is not announced.
Recommended Fix
Restructure the header to use the
<router-link>as the primary focusable element withtabindex="0", and remove therole="button"wrapper or convert it to a non-focusable container. Thearia-expandedandaria-controlsattributes for the accordion behavior can be placed on the toggle chevron button, which already has its ownrole="button"andtabindex="0".Beta Was this translation helpful? Give feedback.
All reactions