Skip to content

Focus Lost ​

The Focus Lost check verifies that keyboard users can always tell where they are on a page. When someone presses Enter, Space or another activation key on a button, link or checkbox, the browser's focus indicator must stay on a visible, meaningful element.

If focus disappears — it lands on something hidden, jumps to the top of the page, or vanishes entirely — keyboard and screen reader users lose their place. This check reports every control where that happens.

WCAG criterion: 2.4.3 Focus Order (Level AA)


Why it matters ​

Losing focus is disorienting in a way that is hard to appreciate with a mouse. The user pressed a button, something happened, and now the highlight is gone. There is no way to know where the next Tab press will land — often it means starting again from the top of the page.


How the check behaves ​

The tool visits every interactive control on the page and, for each one:

  1. Scrolls to it and confirms it is visible.
  2. Presses the key that control is expected to respond to.
  3. Waits for the page to settle.
  4. Checks whether a visible element still holds the focus.
  5. Restores the page to its original state before moving on.

A second pass then handles controls that only exist after something is opened. Some buttons reveal hidden controls when activated — a Menu button that opens a navigation panel containing a Close button, for example. Those cannot be found on the initial page, so the tool activates each remaining visible button, compares which buttons are on screen before and after, and tests any newly revealed ones. It also checks whether the triggering button itself loses focus, which happens with things like a video play button that hides itself once clicked.

Keys tested per control ​

ControlKeys
ButtonEnter, Space
Same-page link (#, javascript:)Enter
CheckboxSpace
Radio buttonSpace
DropdownEnter, Space
Custom button (role="button")Enter, Space
Custom checkbox (role="checkbox")Space

What the check covers ​

ControlNotes
ButtonsStandard clickable controls
Same-page linksLinks that do not navigate away from the page
Checkboxes and radio buttonsForm controls
Custom ARIA controlsWidgets using role="button", role="checkbox" and similar
Controls revealed in overlaysClose or dismiss buttons inside menus and modals

What it skips, and why ​

SkippedReason
External linksThey navigate away from the page — that is expected
<main> or role="main"Receiving focus here is the correct behaviour for a skip link
Disabled controlsThey cannot be activated
Invisible elementsThey cannot be interacted with
Native dialogsThey capture focus by design

Common false positives ​

ScenarioWhy it is not a real problem
A skip link moves focus to <main>Explicitly excluded — this is what a skip link is for
An anchor pointing at a valid #idAllowed
A button opens a browser alertNot measurable on the page
A button opens a native dialogDetected and skipped
An external link loses focusExpected behaviour

How to verify it by hand ​

  1. Tab to the control in question.
  2. Press Enter or Space.
  3. Look at where the focus outline is now. If nothing on screen is highlighted, or the highlight is on something you cannot see, that is a focus loss.

WCAG reference ​

Success Criterion 2.4.3 Focus Order (Level A)