Focus trail
A real role=dialog with aria-modal, a Tab and Shift+Tab focus trap, Escape to close and focus returned to the invoker, next to a live log of every focus move by element label with timestamps, including trap wraps and the return. The entrance animation is skipped with reduced motion. Aria-modal is set but the rest of the page is not made inert, and it has not been tried with a screen reader.
- Focus Management
- ARIA
- Dialog
- prefers-reduced-motion
focus-trail
Project name: Untitled project
Open the dialog, then press Tab repeatedly. The trail on the right adds a line for every element that receives focus.
Focus trail
Nothing yet. Tab to a control, or press “Rename project”.
Times are performance.now() since the first move in the trail. Only moves inside this demo are listed. Newest first.
Accessibility
Works with
- Cursor
- Reacts to where the pointer is, not just whether it's over the element.
- Touch
- Follows your finger while it's down, then settles a moment after you lift.
- Keyboard
- Focus lights it up the way the cursor does. Every action has a key.
- Reduced motion
- Nothing moves or springs. Colour still answers, without drifting.