• Success Criterion 2.4.7
  • Conformance level AA
  • W3C reference F55

Element Losing Keyboard Focus the Instant It’s Reached

2.4.7 — Focus Visible

Scenario

Setting

A video streaming service's show detail page

What’s wrong

As soon as an element receives keyboard focus, a script throws focus away (blur) — keyboard users can never actually reach or use it.

Example

Here's a real case from a video streaming service's show detail page: as soon as an element receives keyboard focus, a script throws focus away (blur) — keyboard users can never actually reach or use it.

Why it matters

Sighted keyboard users and low-vision users who must see where focus is. In this case (a video streaming service's show detail page), they can't complete the task using a keyboard alone.

How to test

Tab to an element and check if it loses focus immediately (blur() firing on focus): if so, no indicator has a chance to display and it fails.

How to fix

Never call blur() on focus — let elements keep focus until the user moves it.

Outcome

Once corrected, a video streaming service's show detail page lets them keep track of where they are on the page.

Who is affected

Sighted keyboard users and low-vision users who must see where focus is.

Learn more