Skip to main content
Perceivly: Perceivly home

Focus order

Also called: Tab order

The sequence in which keyboard focus moves through the interactive elements of a page.

Definition

WCAG 2.4.3 Focus Order, Level A: if a web page can be navigated sequentially and the navigation sequences affect meaning or operation, focusable components receive focus in an order that preserves meaning and operability.

By default the order follows the DOM: the order of elements in the HTML source. CSS that moves things visually (flex order, grid placement, absolute positioning) and a positive tabindex can make focus jump around the screen.

Why it matters

A keyboard user who tabs from a search field to the footer and then back to the search button loses track of the page. Screen magnifier users, who see only a small part of the screen, may not find where focus went at all. A modal that opens without moving focus into it, or a closed menu whose links are still in the tab order, causes the same problem.

How to test or meet it

  • Keep the DOM order the same as the visual order, instead of rearranging with CSS.
  • Avoid positive tabindex values.
  • Move focus into a dialog when it opens and back to the button that opened it when it closes.
  • Remove hidden content from the tab order (hidden, display: none or inert).

Only a person can judge whether an order preserves meaning: tab through every page and template and compare the path with what you see. Tools can point to likely causes, such as positive tabindex values.

WCAG criteria

Sources

  1. Understanding 2.4.3 Focus Order (W3C)

By the Perceivly team · Published . This explains a term; it is not legal advice.

Check a page for free

The free accessibility checker tests one page against WCAG 2.2 A and AA in about 10 seconds and lists what still needs a manual review. No sign-up.

All glossary terms