Repository navigation
[combobox][menu][select] Move aria-orientation to the role owners - #5551
Conversation
The grid role does not support aria-orientation (axe: aria-allowed-attr), but AriaCombobox passed orientation:'horizontal' to useListNavigation when grid was enabled, rendering aria-orientation='horizontal' on the grid. Autocomplete reuses AriaCombobox, so both were affected. Don't pass orientation when grid is active; grid navigation is handled by gridNavigation. Add a test asserting the grid has no aria-orientation.
commit: |
Bundle size
PerformanceTotal duration: 988.29 ms +8.48 ms(+0.9%) | Renders: 76 (+0) | Paint: 1,588.86 ms -22.51 ms(-1.4%) No significant changes — details Check out the code infra dashboard for more information about this PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1aa0f97591
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Preserve orientation:'horizontal' for grid navigation (horizontal arrow keys) but strip the resulting aria-orientation attribute from the list props, since the grid role does not support it (axe: aria-allowed-attr).
|
Addressed. I kept |
Fixes #5548
Grid Combobox and Autocomplete lists rendered
aria-orientation="horizontal", but thegridrole does not support that property. The navigation hook still needs a horizontal orientation to implement two-dimensional keyboard movement, so role-specific ARIA now belongs to the components that assign the final role.Changes
useListNavigationfrom emittingaria-orientation.