You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ToggleGroup orientation prop does not affect keyboard navigation #4487
ToggleGroup accepts an orientation prop, but that prop is not forwarded to CompositeRoot. As a result, it affects the rendered state/data attributes, but not the composite keyboard navigation behavior.
Today, arrow key navigation still works on both axes because CompositeRoot falls back to its default orientation behavior.
Current behavior
ToggleGroup accepts an orientation prop (default 'horizontal'), but it is not forwarded to CompositeRoot. This means the prop only affects the rendered data-orientation attribute — it has no effect on keyboard navigation.
Since CompositeRoot defaults to orientation: 'both', arrow keys in all four directions always navigate between toggles, regardless of what orientation is set to.
// orientation="vertical" is set, but Left/Right arrows still navigate<ToggleGrouporientation="vertical"defaultValue={['bold']}><Togglevalue="bold">B</Toggle><Togglevalue="italic">I</Toggle><Togglevalue="underline">U</Toggle></ToggleGroup>
Expected behavior
If orientation="vertical" is provided, I would expect navigation to be constrained to the vertical axis:
ArrowUp / ArrowDown move focus
ArrowLeft / ArrowRight should not be captured by the composite navigation
If orientation="horizontal" is provided, I would expect the inverse:
ArrowLeft / ArrowRight move focus
ArrowUp / ArrowDown are not handled by the group
Provide a clear and concise description of the expected behavior.
Reproducible example
Link to a CodeSandbox, StackBlitz, or other IDE.
Base UI version
For example v1.0.2
Which browser are you using?
Chrome/Safari/Firefox/Safari iOS etc.
Which OS are you using?
Mac OS/Windows/Other etc.
Which assistive tech are you using (if applicable)?
Voiceover/JAWS etc.
Additional context
Provide any additional context that might help us identify the problem and find a solution.
changed the title [-]ToggleGroup orientation prop not forwarded to CompositeRoot[/-][+]ToggleGroup orientation prop does not affect keyboard navigation[/+]on Mar 30, 2026
Not sure if this was intentional, but I think orientation should affect styling/layout only, not keyboard navigation.
To me, multi-axis navigation here seems reasonable, so the main issue is user expectations, if current behavior is intentional, it should be documented more clearly i guess. Radio component seems to work multi-axis as well although there isnt a orientation prop there.
Also, Toolbar already ties keyboard navigation to orientation, and I think that can create issues with embedded controls.
For example, a vertical toolbar containing a Select may want ArrowDown to open the select, but that same key can also be interpreted as toolbar navigation, causing focus trap on the select trigger.
So to me, this is another reason not to couple orientation too strictly to navigation.
Activity
[-]ToggleGroup orientation prop not forwarded to CompositeRoot[/-][+]ToggleGroup orientation prop does not affect keyboard navigation[/+]CiscoFran10 commentedon Mar 30, 2026
Not sure if this was intentional, but I think
orientationshould affect styling/layout only, not keyboard navigation.To me, multi-axis navigation here seems reasonable, so the main issue is user expectations, if current behavior is intentional, it should be documented more clearly i guess. Radio component seems to work multi-axis as well although there isnt a orientation prop there.
CiscoFran10 commentedon Mar 30, 2026
Also,
Toolbaralready ties keyboard navigation toorientation, and I think that can create issues with embedded controls.For example, a vertical toolbar containing a
Selectmay wantArrowDownto open the select, but that same key can also be interpreted as toolbar navigation, causing focus trap on the select trigger.So to me, this is another reason not to couple
orientationtoo strictly to navigation.peoray commentedon Mar 30, 2026
That'd make sense. I just wanted to make sure it was a design decision and not a bug.
Currently working on the toggle components for Base UI Vue
mj12albert commentedon Mar 30, 2026
Keyboard navigation on both axes is fine situationally according to the spec which addresses this point:
But here it's a bug and not intentional; both Radix/RA support only one axis at a time and we intended to match that
github-actions commentedon Apr 1, 2026
This fix will be available in the next npm release of Base UI.
In the meantime, you can try it out on our Canary release channel: