#91645Incorrect keyboard focus order in tab menus
Description
When you have a tab menu, e.g. with the modal “Create new content element”, you see a tab menu with “Typical page content”, “Form elements”, “Menu”, etc.
The tab order for this component ist incorrect. First you tab through the tab menu, then you tab through the content of the focussed tab.
Correct would be: when focussing a tab menu, the next focusable element should be the content of this tab. Navigating through the tab menu should work with arrow keys.
*The following keyboard rules should be implemented for tab menus:*
- Tab: When focus moves into the tab list, places focus on the active tab element. When the tab list contains the focus, moves focus to the next element in the page tab sequence outside the tablist, which is typically either the first focusable element inside the tab panel or the tab panel itself.
When focus is on a tab element in a horizontal tab list:
- Left Arrow: moves focus to the previous tab. If focus is on the first tab, moves focus to the last tab. Optionally, activates the newly focused tab (See note below).
- Right Arrow: Moves focus to the next tab. If focus is on the last tab element, moves focus to the first tab. Optionally, activates the newly focused tab (See note below).
When focus is on a tab in a tablist with either horizontal or vertical orientation:
- Space or Enter: Activates the tab if it was not activated automatically on focus.
- Home (Optional): Moves focus to the first tab. Optionally, activates the newly focused tab (See note below).
- End (Optional): Moves focus to the last tab. Optionally, activates the newly focused tab (See note below).
See implementation example here:
https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html
Reviews 2
Related issues 2
Files 1
History 915
-
Elisabeth Zeilinger changed Related to #91518 <span data-processor="relativetime" data-value="2020-06-15T09:17:37+00:00" > 06/15/20, 09:17 </span>
-
Elisabeth Zeilinger changed Related to #91701 <span data-processor="relativetime" data-value="2020-06-23T21:06:07+00:00" > 06/23/20, 21:06 </span>
-
Georg Ringer changed status
NewAccepted <span data-processor="relativetime" data-value="2020-10-20T22:28:18+00:00" > 10/20/20, 22:28 </span> -
Riccardo De Contardi changed parent task #89595 <span data-processor="relativetime" data-value="2020-10-24T17:52:09+00:00" > 10/24/20, 17:52 </span>
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2020-12-22T11:15:52+00:00" > 12/22/20, 11:15 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 90096 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2025-07-18T12:41:36+00:00" > 07/18/25, 12:41 </span> -
Gerrit Code Review pushed patch set 2 for main to change 90096 <span data-processor="relativetime" data-value="2025-07-18T12:44:55+00:00" > 07/18/25, 12:44 </span>
-
Andreas Nedbal commented <span data-processor="relativetime" data-value="2025-07-18T12:54:33+00:00" > 07/18/25, 12:54 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 90096 <span data-processor="relativetime" data-value="2025-07-18T14:08:22+00:00" > 07/18/25, 14:08 </span>
-
Andreas Nedbal commented <span data-processor="relativetime" data-value="2025-07-18T14:13:29+00:00" > 07/18/25, 14:13 </span>
I consulted someone with deeper knowledge into WCAG Patterns and got my answers. I also got referred to the Tabs pattern documentation: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/
Following things are done now:
- I now specify
aria-orientationasverticalexplicitly to denote direction of navigation and only use up/down directional arrow keys. - The tab toggles now have
role="tab"as well asaria-selected - If the menu is displayed (a new case for this is the Form element selection, where the menu is not shown) the content area is properly denoted as
role="tabpanel" - Navigating with the arrow keys between the navigation item now also directly toggles them, following the recommendation of the Tabs pattern.
- I now specify
-
Gerrit Code Review pushed patch set 4 for main to change 90096 <span data-processor="relativetime" data-value="2025-09-11T12:43:21+00:00" > 09/11/25, 12:43 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 90665 <span data-processor="relativetime" data-value="2025-09-11T14:00:08+00:00" > 09/11/25, 14:00 </span>
-
Gerrit Code Review pushed patch set 2 for 13.4 to change 90665 <span data-processor="relativetime" data-value="2025-09-11T14:51:14+00:00" > 09/11/25, 14:51 </span>
-
Andreas Nedbal commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-09-11T15:10:10+00:00" > 09/11/25, 15:10 </span>Applied in changeset commit:a39d7ec8b85aad46d44cbe00a20f78822b6cf328.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:36:46+00:00" > 12/02/25, 14:36 </span>
Design-wise the active state of the navigation button is also sub-optimal, it’s not discernible that we entered tab-state in the navigation, and we only notice once we use the directional keys that we’re inside it.