Focus Order
Focus order is the path keyboard focus follows through a page. It should match the reading and task order.
Another example
At checkout, Tab moves through contact details, shipping, payment, review, and then “Place order.” A coupon panel does not jump ahead. When the address dialog closes, focus returns to the button that opened it.
Main parts
- 01Entry point
- 02Sequential stops
- 03Focus return
Use it when
Keep DOM order the same as the reading and task order. Move focus yourself only when the interaction changes context.
Do not use it when
Avoid positive tabindex values. Do not use CSS ordering when it makes the visual and keyboard paths differ.
Name used in code
DOM order + tabindex=0/-1 + deliberate focus restoration Before you ship
Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states.
Outcome: Use Focus Order to solve this user need without losing the current context. User context: At checkout, Tab moves through contact details, shipping, payment, review, and then “Place order.” A coupon panel does not jump ahead. When the address dialog closes, focus returns to the button that opened it. Recommended pattern: Focus Order. Why it fits: Keep DOM order the same as the reading and task order. Move focus yourself only when the interaction changes context. Do not use it when: Avoid positive tabindex values. Do not use CSS ordering when it makes the visual and keyboard paths differ. Product requirements: Define the default, loading, empty, error, success, and recovery states. Keep user input. Give clear feedback after every action. Accessibility and resilience: Use semantic HTML, full keyboard access, and visible focus. Make the layout work when zoomed and support reduced motion. Follow the project’s current rules. Do not add a new UI library unless the project already uses it. Acceptance criteria: The main task works with keyboard only and at 320px width. Focus and status changes are announced. Check loading, failure, retry, cancel, and reduced-motion paths. Evidence and limits (evidence boundary): The standard covers only the listed scope. It does not choose the visual style, product decision, or Vibulary example. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
Check this request
Review the current use of Focus Order. Definition: Focus order is the path keyboard focus follows through a page. It should match the reading and task order. Release checks: Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.