Barrierepruefung.de Web Accessibility Checker

WCAG 2.4.3 Focus Order: explained simply

If a page can be navigated sequentially and the sequence affects meaning or operation, focus must move in an order that preserves both. It does not necessarily have to follow the visual layout. Where several orders would work, providing one of them is enough.

Last reviewed: Sources

What does the criterion require?

Keyboard users press Tab to move from one control to the next. The element they are on has focus, and the sequence is called focus order or tab order. The criterion applies when a page can be navigated sequentially in this way and the sequence affects meaning or operation. Focusable components must then receive focus in an order that preserves meaning and operability.

This matters to people who depend on the keyboard. People with reading disabilities or visual impairments can become disoriented when focus lands somewhere unexpected. And someone using a screen magnifier at high magnification sees only a small part of the page, so they may read a field in the wrong context.

The W3C's Understanding document explains how much room there is:

  • Not always the layout. Focus order does not necessarily have to follow the visual presentation. It has to be logical and preserve the hierarchy and relationships that the presentation implies. If two columns are independent of each other and meaning and operation are not affected, reaching the right-hand one first is not a failure. The W3C still advises reinforcing the reading order that the layout suggests.
  • One is enough. Moving through a table by row or by column can both be logical. If more than one order preserves meaning and operability, the page needs to offer only one.
  • Text may receive focus. The criterion does not say what should be focusable; it assesses the order. Elements that cannot be operated may receive focus as long as they do not impede operation or make the order confusing. The W3C advises against it, because it is likely to make keyboard use tedious.
  • Not arrow keys in a tree. Using arrow keys to move through an expandable tree is not the sequential navigation meant here.

The order in which a screen reader reads content is the subject of 1.3.2 Meaningful Sequence. The two orders need not be identical, as long as people can still understand and operate the page.

Common failures

  • Order set with tabindex. This attribute lets authors set the tab order by hand. If the values do not match the relationships in the content, focus may jump from the home page link to chapter 3, then chapter 2, then chapter 1. A common cause is editing a page without updating the values: a new field without tabindex ends up last (F44).
  • A dialog at the end of the page. A button opens a dialog, focus stays where it was, and the dialog is not next in the sequence either. Users have to tab through the rest of the page first (F85).
  • Focus lost on closing. A menu or dialog closes and focus is back at the start of the page instead of on the control that opened it. If that control no longer exists, another logical place for focus is fine (F85).
  • Jumping between parts of a form. The Understanding document describes a form where focus goes from the name to a newsletter checkbox, then to the street address, then to another checkbox.
  • Nested focusable elements. According to the Understanding document it is a failure if a control appears to receive focus several times because of nesting, such as a button inside a div that is focusable as well.

One way to avoid this is to place the controls in the source so that their sequence already follows the relationships in the content (G59).

Checked automatically and checked by you

What the automated check detects

Coverage: selective

The automated check covers individual aspects of this criterion.

Positive tabindex values are detected. Whether the order is coherent is asked as a question.

Rules

What you check yourself

You answer this question in the manual checks of your scan.

Is the focus order sensible?

  1. Reload the page and press the Tab key repeatedly.
  2. Watch whether focus follows the visible reading order: top to bottom, and left to right within a row.
  3. Open a menu or dialog: focus must move into it and, after closing, return to where it came from.

Classification

Level
A
Introduced in
WCAG 2.0
W3C explanation
Understanding 2.4.3