Why outline: none is Dangerous
You'll learn why removing the default focus outline creates serious accessibility barriers and can expose your website to legal risk.
The Temptation to Remove Outlines
Many developers consider the default browser focus outline "ugly" and are tempted to write CSS like this:
* {
outline: none;
}
This removes the visual indicator that shows which element currently has keyboard focus. While it might seem to create a "cleaner" design, it's actually extremely dangerous for accessibility.
The Real-World Impact
Think of focus outlines like the blinking cursor in a text field—they show you where you are. When you remove outlines, keyboard users (including people with motor disabilities, vision impairments who use magnification, or anyone who prefers keyboard navigation) literally cannot see where they are on your page.
Imagine trying to navigate a building in complete darkness with no lights or signs. That's what keyboard navigation feels like without focus indicators.
Legal and Ethical Implications
Under WCAG 2.1 (which you learned is the accessibility standard), Success Criterion 2.4.7 requires visible focus indicators at Level AA. Websites must meet AA conformance to comply with laws like the Americans with Disabilities Act (ADA) and similar international regulations.
Removing focus outlines can:
- Make your site fail accessibility audits
- Expose your organization to lawsuits
- Exclude millions of users from accessing your content
The Right Approach
You can style focus indicators to match your design (using the :focus and :focus-visible pseudo-classes you learned), but you must never simply remove them entirely.
Key Takeaway: Using outline: none without providing an alternative focus indicator excludes keyboard users and creates legal liability—always provide visible focus states for interactive elements.