-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RadioGroup is unreachable with keyboard if none of the options are checked #378
Comments
Hey! Thank you for your bug report! The issue you are seeing is because you are using Here is a small React application that showcases that To fix it in your case, I would recommend you to change your If you have any more questions, please let me know! |
But you are right that this feels incorrect. In fact, not being able to |
Also did some general cleanup which in turn fixed an issue where the RadioGroup is unreachable when a value is used that doesn't exist in the list of options. Fixes: #378
Also did some general cleanup which in turn fixed an issue where the RadioGroup is unreachable when a value is used that doesn't exist in the list of options. Fixes: #378
* add `disabled` prop to RadioGroup and RadioGroup Option Also did some general cleanup which in turn fixed an issue where the RadioGroup is unreachable when a value is used that doesn't exist in the list of options. Fixes: #378 * update changelog
Hey! Thank you for your bug report! This should be fixed, and will be available in the next release. Here is your reproduction CodeSandbox with the newest dev version applied: https://codesandbox.io/s/inspiring-volhard-5uljb |
* add `disabled` prop to RadioGroup and RadioGroup Option Also did some general cleanup which in turn fixed an issue where the RadioGroup is unreachable when a value is used that doesn't exist in the list of options. Fixes: #378 * update changelog
* add `disabled` prop to RadioGroup and RadioGroup Option Also did some general cleanup which in turn fixed an issue where the RadioGroup is unreachable when a value is used that doesn't exist in the list of options. Fixes: #378 * update changelog
* Fixed typos (#350) * chore: Fix typo in render.ts (#347) * Better vue link (#353) * Better vue link * add better React link Co-authored-by: Robin Malfait <[email protected]> * Enable NoScroll feature for the initial useFocusTrap hook (#356) * enable NoScroll feature for the initial useFocusTrap hook Once you are using Tab and Shift+Tab it does the scrolling. Fixes: #345 * update changelog * Revert "Enable NoScroll feature for the initial useFocusTrap hook (#356)" This reverts commit 19590b0. Solution is not 100% correct, so will revert for now! * Improve search (#385) * make search case insensitive for the listbox * make search case insensitive for the menu * update changelog * add `disabled` prop to RadioGroup and RadioGroup Option (#401) * add `disabled` prop to RadioGroup and RadioGroup Option Also did some general cleanup which in turn fixed an issue where the RadioGroup is unreachable when a value is used that doesn't exist in the list of options. Fixes: #378 * update changelog * Fix type of `RadioGroupOption` (#400) Match RadioGroupOption value types to match modelValue allowed types for RadioGroup * update changelog * fix typo's * chore(CI): update main workflow (#395) * chore(CI): update main workflow * Update main.yml * fix dialog event propagation (#422) * re-export the `screen` utility for quick debugging purposes * stop event propagation when clicking inside a Dialog Fixes: #414 * improve dialog escape (#430) * Make sure that `Escape` only closes the top most Dialog * update changelog * add defaultOpen prop to Disclosure component (#447) * add defaultOpen prop to Disclosure component * update changelog Co-authored-by: Shuvro Roy <[email protected]> Co-authored-by: Alex Nault <[email protected]> Co-authored-by: Eugene Kopich <[email protected]> Co-authored-by: Nathan Shoemark <[email protected]> Co-authored-by: Michaël De Boey <[email protected]>
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v1.0.0
What browser are you using?
Chrome
Reproduction repository
https://codesandbox.io/s/elated-yonath-thyp7?file=/src/App.js
Description
Because all
RadioGroup.Option
elements havetabindex=-1
unless they are checked it's not currently possible to reach a RadioGroup by keyboard if the default value of the RadioGroup is null. Normal browser behaviour is to focus the first option if tabbing forward and focus the last element if tabbing backwardsThe text was updated successfully, but these errors were encountered: