Tabindex Values
Checks for appropriate tabindex values
Checks for appropriate tabindex values
| Rule ID | a11y/tabindex |
| Category | Accessibility |
| Scope | Per-page |
| Severity | warning |
| Weight | 5/10 |
Solution
Avoid positive tabindex values (1, 2, 3…) as they override natural tab order and confuse keyboard users. Use tabindex=‘0’ to add elements to tab order, tabindex=’-1’ to make elements focusable via JavaScript only. Rely on natural document order for tab sequence.
Enable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["a11y/tabindex"]Disable all Accessibility rules
squirrel.toml
toml[rules]
disable = ["a11y/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["a11y/tabindex"]
disable = ["*"]