downshift-js / downshift-js/downshift
[useMenuButton] Create hooks for menu and menu button
- Dominant language
- JavaScript
- Stars
- 12.3k
- Forks
- 936
- PR merge metrics
- No merged PRs in 30d
Description
Hi there, thanks for your great work on Downshift!
We're currently using the `useCombobox` hook and will definitely be using `useSelect` for our custom select components.
I'm currently tasked with implementing an accessible menu button component for our product and was thinking about whether Downshift could be used for this purpose, too. There seems to be quite a bit of overlap between the ARIA design patterns of select/listbox and menu/menu button, so `useSelect` may be workable. Do you have any examples of this being done, or any advice on whether you think this is a good or bad idea? Do you maybe already have plans for a `useMenuButton` hook?
If I went with `useSelect`, I'd expect it to be necessary to override some of its defaults, for example the role of the menu will have to be `menu`, not `listbox`. But otherwise the functionality seems reasonably similar. Any pointers?
Contributor guide
Assessment
This issue has not been assessed yet.