tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.81k stars 1.07k forks source link

V2 Bug - Disabled checkbox selected when navigating by tab #3212

Closed guhndr closed 4 months ago

guhndr commented 4 months ago

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.0.3

What browser are you using?

Chrome

Reproduction URL

https://codesandbox.io/p/devbox/hardcore-khayyam-jmlf94?file=%2Fsrc%2FApp.jsx%3A13%2C28

Describe your issue

When tabbing between elements the checkbox are being selected even if it's disabled. I'd expect it to be skipped like other disabled elements (e.g buttons, inputs, switches)

RobinMalfait commented 4 months ago

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

You can already try it using: