WCAG 2.1 AA — release blocker
Keyboard
| Key | Action |
|---|---|
Tab | Move focus to the next toggle / group item. |
Enter / Space | Toggle the focused item on or off. |
Arrow Left / Right | Move focus within a ToggleGroup (roving tabindex). |
Screen reader
Togglerenders witharia-pressedreflecting its on/off state.ToggleGrouprendersrole="group"so assistive tech announces the set.ToggleGroupItemrenders witharia-pressed.- Icon-only toggles require an explicit
aria-label— the icon alone is not an accessible name.
Focus management
- Individual
Togglebuttons receive standard button focus. - Inside a
ToggleGroup, only the active item hastabIndex={0}; others havetabIndex={-1}. Arrow keys move focus between items. - Disabled items are skipped during keyboard navigation.
React Native
- Uses
accessibilityRole="button"withaccessibilityState={{ selected }}. - Disabled items set
accessibilityState={{ disabled: true }}.
Color is never the only signal
- The pressed state uses a distinct background (
bg-accent) in addition toaria-pressed. Do not rely on color alone. - Disabled toggles have reduced opacity AND the semantic
disabledattribute.
Audit checklist
-
aria-pressedreflects on/off state - Enter / Space activates
- Arrow keys navigate within
ToggleGroup - Icon-only items have
aria-label - 4.5:1 contrast on pressed and unpressed states
- Disabled items skipped by keyboard navigation