Skip to main content
Browse documentation

Focus Order Audit

When someone moves through a page with the Tab key, focus should travel in an order that keeps the content’s meaning and lets them operate it. WCAG 2.4.3 Focus Order requires this. It does not require focus to follow the visual layout, and the criterion’s own guidance gives examples where a different order is correct.

A page’s layout can’t show whether an order preserves meaning, so this audit never reports a pass or a failure. It looks for focus that keeps jumping a long way back up the page, and asks you to check that page with the keyboard.

Experimental status

This audit is experimental while we validate it against more real-world sites. It runs on every scan. Because it never reports a confirmed failure, its findings are always listed under Manual Checks Needed, and they don’t affect your accessibility score.

How the audit works

The audit presses Tab through the page and records where each focused element sits. It then works through each move from one element to the next, reading positions in the page’s reading order, so “backwards” means the same thing on right-to-left pages and in vertical writing.

It looks for three patterns:

  • A backwards jump. Focus climbs more than one screen height back up the page, or crosses most of the screen’s width backwards while also moving up. Jumps forward, such as a skip link, are always fine.
  • A backwards drift. Three or more short moves in a row that each climb a little and together climb more than a screen height. A list reversed with CSS is a common cause.
  • Column thrash. Focus keeps alternating between two areas far apart on the screen while climbing, as it does when columns of different heights are read across each other.

Text set in CSS columns climbs from the bottom of one column to the top of the next. That is the reading order, so the audit doesn’t count it as a jump.

A page is flagged when it has at least three backwards jumps, a backwards drift, or column thrash together with a jump. A single jump is enough when it goes to or from an element with a positive tabindex, since that is what took it out of the source order. One or two short upward moves are normal in most layouts and are never counted.

Elements with no size, elements fixed or sticky on the screen, and elements inside a dialog are left out, because their position on the page says nothing about where someone sees them.

Reading the results

A flagged page lists the moves that caught the audit’s attention, in tab order. Each one names the element focus left and the element it moved to, with a CSS selector and a sample of each element’s HTML. When an element has a positive tabindex, the result mentions it as a likely cause.

To check a result, put your cursor before the first element listed and press Tab. If the order makes sense for the content, for example a sidebar that is meant to be read after the main column, you can record your decision with the ignore feature.

Limitations

The audit judges the order from where elements appear, not from what they mean, so it can’t confirm that an order is right or wrong. A page it doesn’t flag can still have a confusing focus order, for example two controls next to each other that are reached in the wrong order.

It only sees the page as it loads. Focus order inside menus, dialogs and panels that open later isn’t checked. If the page navigates away while the audit is tabbing, the result can’t be judged and nothing is reported. Positive tabindex values on their own are reported by axe-core’s tabindex rule, not by this audit.