Skip to content

Remove usage of tabindex values greater than 0 #53

@Taucher2003

Description

@Taucher2003

A tabindex value greater than 0 removes an element from the default tab flow and moves it before all elements with a tabindex of 0.
This creates accessibility problems as the tab order is different from the DOM order.

If tabindex is used, only 0 and -1 should be used as value because these values don't have that problem.
With 0, the element is made focusable and stays in the default tab order that is based on the DOM order.
When -1 is used, the element is not added to the default tab order, but is focusable with JS.

https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#keyboardnavigationbetweencomponents(thetabsequence)


The Menu is currently the only place where tabindex with a value greater than 0 (in this case 1). The accessibility scanner did not report this problem because the story loads with the menu already open and the tabindex is only set when the menu is closed.

Metadata

Metadata

Assignees

Labels

accessibilityRelates to accessibility problems or improvements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions