Home
Bookmarks
Leagues
LEARN
Courses
Career Paths
Assessments
Tutorials
Arcade
Glossary
GROW
Certifications
Log in
Glossary
Log inSign up
Courses/Accessible Interface Foundations/Keyboard paths and visible focus/
Exercise #2

The Crime of 'outline: none'

For decades, naive designers complained that the default browser focus ring was 'ugly' and demanded developers write:

*:focus { outline: none; } /* NEVER DO THIS */

Stripping focus rings without an accessible replacement is the digital equivalent of turning off the computer screen for keyboard users. They press Tab and have zero idea where on the page their focus is located. Clicking blind can trigger irreversible actions like account deletion or unverified charges.

The Modern Standard: WCAG 2.4.7 (Focus Visible) & 2.4.11 (Focus Appearance):

  • Focus rings must be clearly visible.
  • They must have at least a 3:1 contrast ratio against the adjacent background.
  • Use :focus-visible in CSS so rings appear when navigating by keyboard, but stay subtle on mouse clicks.

Topics

Sequential Focus Navigation & DOM Order
The Crime of 'outline: none'
The Three Tabindex Rules: 0, -1, and Never > 0
Skip Links: Bypassing Blocks (WCAG 2.4.1)
Modal Dialogues: The Sacred Focus Trap
Escape Key Dismissal: WCAG 1.4.13 & 2.1.2
Composite Widgets: Arrow Keys vs Tab Key
Single-Page App (SPA) Route Transitions
Target Size & Spacing (WCAG 2.5.5 / 2.5.8)
Master Challenge: Auditing a Broken Modal Dialogue

From lesson

2

Keyboard paths and visible focus

Level 1 · Accessible interaction basics

Top contributors

Community contribution details will appear here once real learner activity is available.

Share