headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

React warning when using `aria-labelledby` prop with `<Checkbox>` component

Open breadadams opened this issue 1 year ago • 1 comments

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

2.2.0

What browser are you using?

N/A

Reproduction URL

https://codesandbox.io/p/devbox/headlessui-aria-labelledby-warning-y9yjjy

Describe your issue

When providing an aria-labelledby prop to the <Checkbox> component it doesn't work, you have to use aria-labelledBy (uppercase B), which causes the following warning in the console:

image

We've also noticed that the aria-labelledby isn't autosuggested like other aria-* props are, for example aria-label.

Can confirm that the same occurs with at least the <Switch> component.

breadadams avatar Nov 21 '24 10:11 breadadams