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

Switch does not support tabindex #2915

Closed
tristanlins opened this issue Jan 4, 2024 · 1 comment · Fixed by #2966
Closed

Switch does not support tabindex #2915

tristanlins opened this issue Jan 4, 2024 · 1 comment · Fixed by #2966
Assignees

Comments

@tristanlins
Copy link

What package within Headless UI are you using?

@headlessui/vue

What version of that package are you using?

v1.6.5

What browser are you using?

Chrome, Firefox

Reproduction URL

https://codesandbox.io/p/sandbox/nice-davinci-9xvtxj

Describe your issue

The <Switch> <button> element always has tabindex=0, setting <Switch tabindex="X"> will not change the tabindex!

@RobinMalfait
Copy link
Collaborator

Hey!

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

You can already try it using:

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

Note: you can pass anything but -1 because we still need the Switch to be focusable via the keyboard.

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 a pull request may close this issue.

2 participants