Files
WCAG/2-operable/2.4.7-focus-visible.md
T
2025-12-23 21:04:52 -05:00

1.7 KiB

Back to 2 Operable index

2.4.7 Focus Visible

  • Level: AA
  • Guideline: 2.4 Navigable
  • Principle: 2 Operable

What it is

Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible.

How to test

  • Check: Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible.
  • Use the sufficient techniques below as acceptable methods when applicable.
  • Confirm none of the common failures apply.

Sufficient techniques (W3C)

  • G149: Using user interface components that are highlighted by the user agent when they receive focus
  • C15: Using CSS to change the presentation of a user interface component when it receives focus
  • G165: Using the default focus indicator for the platform so that high visibility default focus indicators will carry over
  • G195: Using an author-supplied, visible focus indicator
  • C40: Creating a two-color focus indicator to ensure sufficient contrast with all components
  • C45: Using CSS :focus-visible to provide keyboard focus indication
  • SCR31: Using script to change the background color or border of the element with focus

Common failures (W3C)

  • F55: Failure of Success Criteria 2.1.1, 2.4.7, 2.4.13, and 3.2.1 due to using script to remove focus when focus is received
  • F78: Failure of Success Criterion 1.4.11, 2.4.7 and 2.4.13 due to styling element outlines and borders in a way that removes or renders non-visible the visual focus indicator

Resources

Back to 2 Operable index