squirrelscan
GitHub

Focus Visible

Checks for focus indicator styles

Checks for focus indicator styles

Rule ID a11y/focus-visible
Category Accessibility
Scope Per-page
Severity warning
Weight 5/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

[rules]
disable = ["a11y/focus-visible"]

Disable all Accessibility rules

[rules]
disable = ["a11y/*"]

Enable only this rule

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

Type to search…

↑↓ navigate↵ openesc close