-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Milestone
Description
Summary
Add an activation prop to Radio.Root matching the pattern established in Tabs.Root.
Background
The Tabs component introduced an activation prop with two modes:
automatic(default): Selection occurs on focus (arrow key navigation)manual: Selection occurs on explicit Enter/Space key press
WAI-ARIA Research
Standard Behavior
Per WAI-ARIA APG, radio groups should have selection follow focus by default:
"When arrow keys move focus to a radio button, it simultaneously unchecks the previously focused button and checks the newly focused button."
This is the standard behavior, not optional like tabs.
Exception: Toolbar Context
Radio groups inside toolbars should NOT auto-select:
"When navigating through a radio group in a toolbar with arrow keys, the button that is checked does not change."
Rationale for Adding Prop
While automatic activation is the ARIA standard, providing activation="manual" allows:
- Toolbar radio group implementations
- User preference for deliberate selection
- Consistency with Tabs API
Proposed API
<Radio.Root v-model="selected" activation="manual">
<Radio.Item value="a">Option A</Radio.Item>
<Radio.Item value="b">Option B</Radio.Item>
</Radio.Root>Implementation Notes
- Add
activationprop toRadioRoot.vuewith type'automatic' | 'manual' - Default to
'automatic'(standard ARIA behavior) - Modify
RadioItem.vueonFocushandler to check activation mode - Add manual activation via Enter/Space in
onKeydown
Industry Alignment
| Library | Prop Name | Default |
|---|---|---|
| React Aria | keyboardActivation |
'automatic' |
| Radix UI | activationMode |
'automatic' |
| Vuetify v0 | activation |
'automatic' |
Related
- Tabs implementation:
packages/0/src/components/Tabs/TabsRoot.vue - WAI-ARIA Tabs Pattern
- WAI-ARIA Radio Group Pattern
Checklist
- Add
activationprop to RadioRoot - Update RadioItem event handlers
- Add tests for both activation modes
- Update documentation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels