Focus Order
The sequence in which keyboard focus moves.
See it on the 3D treeGoing deeper
By default it follows the order of focusable elements in the markup, which may differ from the visual arrangement if CSS moves things. It should preserve meaning and usability, so related controls are reached together. When content opens or disappears, focus often needs moving to a sensible place.
Why it matters
Planning it prevents disorienting jumps and lost position for people who cannot point and click.
In practice
After a user deletes a list item, you move focus to the next item instead of letting it reset to the page start.
Common mistake
Forcing a custom sequence with positive tabindex values, which quickly becomes confusing and fragile.
Connected terms
- Focus TrapEntry, cycling and return are all part of a planned sequence.
- Keyboard NavigationFocus order determines the path a keyboard user travels through an interface.
- Focus StatePeople need to see where focus is as it moves.
- ModalOpening and closing dialogs requires focus to be moved and returned.