-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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.
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.