Focusable Elements Where Visual Focus Indication Has Been Removed

Focusable Elements Where Visual Focus Indication Has Been Removed

WCAG Focus: WCAG 2.4.7 (AA), 2.4.11 (AA)

Many WordPress themes include CSS resets such as a:focus, button:focus { outline: none; } to suppress browser focus rings for aesthetic reasons. While mouse users rarely notice the removal, sighted keyboard navigators—including people with motor disabilities, temporary injuries, or power users—are left completely blind as to which link, button, or input currently holds focus.

Why This Pattern Violates WCAG

WCAG 2.4.7 Focus Visible (Level AA) mandates that any keyboard-operable user interface has a mode of operation where the keyboard focus indicator is visible.

WCAG 2.4.11 Focus Not Obscured (Minimum, Level AA in WCAG 2.2) adds that when an element receives keyboard focus, it must not be entirely hidden behind sticky WordPress headers or cookie banners.

Code Comparison

Inaccessible Theme CSS Reset

a:focus,
button:focus,
input:focus {
  outline: none;
}

Compliant High-Contrast Focus Ring

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

How to Fix It in WordPress

  • Search style.css and child theme stylesheets for outline: none or outline: 0 without a replacement box-shadow or border style.
  • Use :focus-visible with at least a 2px high-contrast outline and offset so focus remains clear against dark and light backgrounds.
  • Ensure sticky WordPress headers do not cover focused elements by adding scroll-margin-top to target sections.

Finding This Issue Automatically

CSS resets tucked inside parent themes, Gutenberg block styles, and WooCommerce extensions make tracking down every outline: none declaration tedious. Scanning your site with the WP ADA Compliance Check plugin immediately surfaces elements stripping visible focus—and its built-in content filters will automatically fix the issue by removing inline styles that obscure focus outlines and adding outline styles to all focusable elements to restore visible keyboard focus.

WCAG References & Supporting Materials

WCAG Success Criteria

Supporting Documentation & Guides

Subscribe

Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

Cart Accessibility Tools
hide