GitHub

Focus Visible

Checks for focus indicator styles

Checks for focus indicator styles

Rule IDa11y/focus-visible
CategoryAccessibility
ScopePer-page
Severitywarning
Weight5/10

Solution

Keyboard users need visible focus indicators to know where they are on the page. Never use outline: none without providing an alternative focus style. Modern approach: use :focus-visible to show focus only for keyboard users, not mouse clicks. Ensure focus indicators have at least 3:1 contrast. Test by tabbing through your page - can you always see where focus is?

Enable / Disable

Disable this rule

squirrel.toml
toml
[rules]
disable = ["a11y/focus-visible"]

Disable all Accessibility rules

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

Enable only this rule

squirrel.toml
toml
[rules]
enable = ["a11y/focus-visible"]
disable = ["*"]

Type to search…

↑↓ navigate ↵ open esc close