Accessibility · Cluster
Keyboard and Focus
Navigation order and focus management.
- 01 How the Browser Computes the Tab Sequence The tree walk behind the Tab key: tabindex partitioning, the sequential focus navigation starting point, and why a positive tabindex can send focus backwards through the page.
- 02 Which Elements Can Actually Take Focus The closed list of natively focusable elements, the three independent exclusions that remove an element from that list, and why a call to focus() can return without moving focus at all.
- 03 Focus Rings, :focus-visible, and the Heuristic Behind Them Why browsers began suppressing focus indicators on mouse clicks, how the :focus-visible heuristic decides, and what a custom indicator must do to survive forced-colors mode and clipping.
- 04 Containing Focus Inside a Modal Surface How the dialog element traps Tab natively, what a hand-rolled focus trap has to reimplement, and why returning focus to the opener is part of the containment contract.
- 05 Roving tabindex and Active Descendant Compared Two ways to give a composite widget one tab stop: moving tabindex among items, or keeping focus on a container and pointing at an item with aria-activedescendant.
- 06 Restoring Focus After the Focused Element Disappears When a focused node is removed the browser falls back to the body, and the next Tab press restarts at the top of the page. How to choose a restoration target from structure rather than from memory.
- 07 Skip Links and the Sequential Navigation Starting Point Why a bypass link works even though it usually points at a non-focusable heading, how the browser positions the tab sequence at the fragment target, and what single-page routing breaks.
- 08 Focus Across Shadow Roots and Frame Boundaries Where document.activeElement points when focus enters a shadow tree or an embedded document, what delegatesFocus changes, and why a custom element that contains a field is not a tab stop by default.
- 09 The Order of Focus and Blur Events Focus moves in a fixed sequence of four events, only two of which bubble. How relatedTarget identifies the other end of the move, and why calling focus() from inside a blur handler behaves unexpectedly.
- 10 Keeping Focus Stable in Virtualized and Reordered Lists Why windowing libraries lose focus when they recycle nodes, how sorting a list breaks a tab stop, and what content-visibility does to the focusability of skipped subtrees.