Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aria-orientation to the Listbox component #683

Merged
merged 2 commits into from
Jul 13, 2021

Conversation

RobinMalfait
Copy link
Member

By default the Listbox will have an orientation of vertical. When
you pass the horizontal prop to the Listbox component then the
aria-orientation will be set to horizontal.

Additionally, we swap the previous/next keys:

  • Vertical: ArrowUp/ArrowDown
  • Horizontal: ArrowLeft/ArrowRight

@vercel
Copy link

vercel bot commented Jul 13, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-vue – ./packages/@headlessui-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/HPtUjFkwVf9QsjH5mxzLkPjDeBqx
✅ Preview: https://headlessui-vue-git-listbox-orientation-tailwindlabs.vercel.app

headlessui-react – ./packages/@headlessui-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/ox4Dq1yHoBiAjVeLfrDaj1fEH4vq
✅ Preview: https://headlessui-react-git-listbox-orientation-tailwindlabs.vercel.app

By default the `Listbox` will have an orientation of `vertical`. When
you pass the `horizontal` prop to the `Listbox` component then the
`aria-orientation` will be set to `horizontal`.

Additionally, we swap the previous/next keys:

- Vertical: ArrowUp/ArrowDown
- Horizontal: ArrowLeft/ArrowRight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant