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

Tab index 0 is set on every radio input inside a popover when interacting via keyboard #1140

Closed
rmales opened this issue Feb 23, 2022 · 2 comments · Fixed by #1440
Closed

Comments

@rmales
Copy link

rmales commented Feb 23, 2022

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v1.4.3

What browser are you using?

N/A

Reproduction URL

https://codesandbox.io/s/funny-field-zp1cie?file=/src/App.js

Describe your issue

When I have radio inputs inside a popover and I open the popover via the keyboard and tab to them, all the radio inputs have their tab index attribute set to zero. This inserts them into the tab order, which is not expected as groups of radio inputs are normally navigated using the arrows keys (as I'm sure you're aware). I guess this is more an annoyance than a bug.

@hodela
Copy link

hodela commented Mar 9, 2022

I have the same problem, I have a registration form inside the dialog, when I enter "Nguyễn Hải" in the name input and press Tab key, the word "Hải" is immediately filled in the email input below and focus on the password input. I use a simple telex keyboard on my Mac

@RobinMalfait
Copy link
Member

Hey! Thank you for your bug report!
Much appreciated! 🙏

This should be fixed by #1440, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants