Skip to main content
Checks for appropriate tabindex values
Rule IDa11y/tabindex
CategoryAccessibility
ScopePer-page
Severitywarning
Weight5/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
[rules]
disable = ["a11y/tabindex"]

Disable all Accessibility rules

squirrel.toml
[rules]
disable = ["a11y/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/tabindex"]
disable = ["*"]