utilities.dev

Focus Style Checker

Inspect CSS for :focus and :focus-visible declarations and flag patterns that remove outlines without a visible replacement.

All CSS analysis runs in your browser; no stylesheets are sent to a server or stored.

CSS Input
Paste CSS to check focus styles
Check Results
Focus style issues found
1 issue found
  • No visible replacementLine 1

    Outline is removed without a visible focus indicator. Add border, box-shadow, or another visible style for keyboard users.

    button:focusbutton:focus { outline: none; }

How to use this tool

  1. Paste your CSS into the input area.
  2. Review the checker output for outline removal without visible replacement.
  3. Add border, box-shadow, or another visible focus indicator where flagged.

About Focus Style Checker

This tool helps developers avoid removing focus outlines without providing an alternative, which harms keyboard users. It uses heuristics and does not replace testing with actual keyboard navigation.

Common use cases

  • Auditing CSS for outline: none or outline-width: 0 in focus rules
  • Ensuring :focus-visible has a visible indicator before shipping
  • Catching global outline removal that affects all focusable elements

FAQ

What does this focus style checker do?
It scans CSS for :focus and :focus-visible rules and flags cases where outline is removed (outline: none, outline: 0) without a visible replacement like border or box-shadow.
Does this tool send my CSS to a server?
No, all analysis runs locally in your browser. Your CSS is never sent to a server or stored.
What counts as a visible focus replacement?
The checker treats border, box-shadow, background, or a non-zero outline as visible replacements. It uses simple pattern matching and may miss custom indicators.
Why does outline: none need a replacement?
Keyboard users rely on the focus outline to see which element is focused. Removing it without an alternative makes navigation difficult or impossible for some users.

Related tools