Skip to main content
Perceivly: Perceivly home

2.4.7 Focus Visible

Level AA · added in WCAG 2.0

When you move through a page with the keyboard, you must be able to see which element has focus. Links, buttons, form fields and custom widgets all need a visible focus indicator.

Who it helps

Keyboard users, including many people with motor disabilities, need to see where they are before they press Enter or Space. Screen magnifier users and people with attention or memory difficulties also rely on a clear focus position.

How to meet it

Examples

Fails:A global reset that removes the focus outline
*:focus {
  outline: none;
}
Fails:A focus style that is nearly invisible against the button
.button {
  background: #1a5fb4;
  color: #fff;
}
.button:focus {
  outline: 1px dotted #1d62b8;
}
Passes:A clear outline on keyboard focus, offset from the element
:focus-visible {
  outline: 3px solid #1a5fb4;
  outline-offset: 2px;
}
Passes:A two-tone ring that shows on light and dark buttons
.button {
  background: #1a5fb4;
  color: #fff;
}
.button:focus-visible {
  outline: 3px solid #111;
  box-shadow: 0 0 0 6px #fff;
}

Can a scanner detect this?

No

axe-core has no rule for focus visibility, because a script cannot reliably judge whether a focus style is visible to a person. You need to tab through the page and look at each focused element.

No automated rule tests this criterion. Check it by hand.

Common mistakes

Official W3C explanation of 2.4.7

Check your own page

See which automated WCAG checks your page fails, with the failing elements and how to fix them.

Enter a page address, for example example.com/shop.

Reviewed November 2, 2026