-
Notifications
You must be signed in to change notification settings - Fork 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
[insiders] ARIA attribute manually set on Listbox.Button
is not rendered
#3114
Comments
Can recreate an issue, work on it. |
Solution: #3119 |
Hey! In this case I think the better thing to do is to use our <div className="App">
<Field>
<Description>hello world</Description>
<Listbox value={listboxValue} onChange={setListboxValue}>
<Listbox.Button>{listboxValue}</Listbox.Button>
<Listbox.Options>
<Listbox.Option value="Option 1">Option 1</Listbox.Option>
<Listbox.Option value="Option 2">Option 2</Listbox.Option>
<Listbox.Option value="Option 3">Option 3</Listbox.Option>
</Listbox.Options>
</Listbox>
</Field>
</div> This way you don't have to worry about managing the The reason it is currently not rendered on the Going to close this for now, but let me know if you really want to use custom |
Thank you for the thoughtful response @RobinMalfait. The solution doesn't quite work for my use case, but that's OK because it works with
Should this issue be re-opened as a feature request, then? 😁 |
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
0.0.0-insiders.dcbcd79
What browser are you using?
Chrome
Reproduction URL
https://codesandbox.io/p/sandbox/amazing-glitter-forked-ctqf7f?file=%2Fsrc%2FApp.tsx%3A13%2C25
Describe your issue
Notice that the
aria-describedby="description"
attribute onListbox.Button
is not rendered.However, if I add
as={Fragment}
toListbox.Button
and put the attribute on the child<button>
, then it is rendered correctly.The text was updated successfully, but these errors were encountered: