Blocked aria-hidden on an element because its descendant retained focus.
Describe the bug DropdownMenu print this error when opened first time on a page:
Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden.
Element with focus: button
Ancestor with aria-hidden: <div id="app" aria-hidden="true">...
To Reproduce Steps to reproduce the behavior:
- Go to official document page
- Open DevTool
- Click on first example button
- Check error in the console
Expected behavior No error should be printed.
Screenshots
Desktop (please complete the following information):
- OS: macOS
- Browser Chrome
- Version 131.0.6778.205
I saw the same error console too when I'm using <Dialog>. But I cannot reproduce it so it might happen rarely? I guess there's some common behavior between dialog and drop down 🤔
Yes, I am experiencing the same problem so I can +1 on this issue!
Same problem with <Dialog>
+1 with <Dialog>.
+1 with <Select>.