Positive tabindex changes the tab order
Why it matters
A tabindex above 0 pulls an element to the front of the tab order and creates a confusing jump around the page.
How to fix it
Use tabindex="0" or no tabindex, and put things in the DOM in the order you want them focused.
<!-- Before -->
<input tabindex="5">
<!-- After -->
<input> Read the W3C guidance: Understanding 2.4.3 Focus Order.
Related rules
- ARIA role is not valid (WCAG 4.1.2)
- ARIA attribute is not valid (WCAG 4.1.2)
- Hidden element can still be focused (WCAG 4.1.2)
- Focusable element is marked as presentational (WCAG 4.1.2)
Find this on your own site. A11yMate scans every page and lists where it happens. See pricing or browse all rules.