Why this matters
Sighted keyboard users need to see where focus is. Without a visible focus indicator, they can't tell which element is active, making the interface unusable for keyboard navigation.
Common failures
These are the most frequent ways this criterion is violated in real-world websites:
- CSS outline:none without a replacement focus style
- Focus styles that are nearly invisible (thin dotted outline in low contrast)
- Focus styles removed on buttons or links for aesthetic reasons
- Custom focus styles that don't provide sufficient contrast
How to fix
- Never remove outline without providing a visible alternative
- Use :focus-visible for styles that only appear during keyboard navigation
- Ensure focus indicators have at least 3:1 contrast and are clearly visible
- Example: :focus-visible { outline: 2px solid #4338f0; outline-offset: 2px; }
Related axe-core rules
xsbl uses axe-core to automatically detect violations of this criterion. The following rules are checked:
Check your site for 2.4.7 violations
xsbl scans your rendered pages in a real browser and finds violations of this criterion automatically.
Scan your site freeOfficial reference: Understanding WCAG 2.4.7: Focus Visible (W3C)