Avoid positive tabindex values
Rule
tabindex-positive· Document, language & navigation · impact moderate · Static + live
Why it matters
A positive tabindex forces an element to the front of the tab order, overriding DOM order and almost always producing a confusing, inconsistent focus sequence.
How to fix
Remove the positive value (use 0 to make something focusable, -1 for programmatic focus) and order elements in the DOM instead.
Example
<input tabindex="3">
<input tabindex="0">
WCAG success criteria
2.4.3 Focus Order — Level A
Focus must move in an order that preserves meaning and operability.
Standards
This rule contributes to the following standards:
WCAG A EN 301 549 Best practice
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.2.4.3 |