Managing roving tabindex in Widgets
Let arrow keys move within a composite control.
One Stop for a Whole Widget
In a toolbar or radio group, Tab should reach the widget once, not every item. Roving tabindex is the pattern that makes this work.
The Core Idea
Exactly one item holds tabindex="0" at a time. Every other item gets tabindex="-1", so Tab enters the group at a single point.
All lessons in this course
- tabindex 0, -1, and Never Positive
- Moving Focus After an Action
- Returning Focus When a Layer Closes
- Managing roving tabindex in Widgets