- Success Criterion 2.1.1
- Conformance level A
- W3C reference F55
Element That Loses Focus the Instant It’s Reached by Keyboard
2.1.1 — Keyboard
Scenario
Setting
A car-rental site's checkout flow
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
<div onclick="submitForm()">Submit</div> Why it matters
Blind users, people with motor disabilities, and anyone operating the interface without a pointer.
How to test
Tab to any element and check whether it loses focus immediately (blur() firing on focus): if so, you can never interact with it via keyboard.
How to fix
Never call blur() on focus — let elements keep focus until the user moves it.
<button onclick="submitForm()">Submit</button>A native button is focusable and triggers on Enter/Space automatically; a div needs all of that added by hand.
Outcome
On a car-rental site's checkout flow, this barrier is gone for blind users, people with motor disabilities — they no longer have to work around this.
Who is affected
Blind users, people with motor disabilities, and anyone operating the interface without a pointer.
Learn more
- Understanding Understanding document (opens in a new tab)
- Technique Related technique (opens in a new tab)
Related scenarios
- Feature That Only Responds to Mouse Events, Not the Keyboard
- Clickable Element Acting Like a Link With No Real Keyboard Role
- Clickable Div With No Keyboard Focus or Key Handling at All
- Focusable Element That Enter and Space Don’t Actually Activate
- Custom Dropdown That Can’t Be Operated by Keyboard Arrows
- Drag-and-Drop Feature With No Keyboard Alternative