-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What problem are you trying to solve?
Authors routinely hand-code “roving tabindex” logic for composite widgets like toolbars, tablists, menus, listboxes, and grids. In practice, this means providing a single tab stop to enter the control, then using arrow keys to move focus between items.
This ad‑hoc scripting:
- Produces inconsistent keyboard behavior across sites.
- Increases accessibility risk; missed ARIA roles, incorrect tabindex management, broken tab order.
- Adds boilerplate and maintenance burden in every design system and framework.
What solutions exist today?
- Hand-authored JS roving tabindex patterns (MDN-documented technique) duplicated per project.
- Library abstractions (e.g., FocusZone (Fluent UI), Tabster, react-aria, react-roving-tabindex, a11y utilities in multiple frameworks).
How would you solve it?
Introduce a focusgroup HTML attribute with scoped behavior tokens for recognized composite patterns plus optional modifiers (axis limits, wrap, memory control, opt‑out), providing native arrow-key focus movement, a guaranteed entry tab stop, and last-focused restoration.
Explainer in OpenUI
Anything else?
A previous, unscoped version of this attribute was brought up years ago, but was blocked on accessibility issues. This "Scoped Focusgroup" feature limits usage to a set of behaviors that can supply a minimum aria role when needed, ensuring compatibility with ATs by-default.
- whatwg issue for the unscoped focusgroup feature
- OpenUI Explainer for the unscoped focusgroup feature