Skip to content

VBC-212: keyboard-focus-awareness

warning

Category: ux-dx
Analysis: Regex (line by line)
File types: .css, .scss
Scope: source code only, ignoring anything inside strings and comments
Tags: accessibility

What it reports

Suppressing focus outline without providing an alternative at line {line}. This makes keyboard navigation impossible.

Flagged

css
a:focus { outline: none; }

Not flagged

css
a:focus { outline: 2px solid; }

Pattern

regex
:focus\s*\{.*?outline:\s*none

Released under the MIT License.