-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Feature: <Dropdown.Menu/> custom aria-labelledby
property
#6249
Comments
On the other hand, I can see how it could work with a "recursive" <label id="label-1"/>
<div class="dropdown">
<button id="react-aria-2" aria-labelledby="label-1">Green</button>
<div aria-labelledby="react-aria-2">...</div>
</div> If a screen reader supports recursive Except they say screen readers don't resolve Quote: The role of A simple demonstration of this is as follows: <input id="my_name" aria-labelledby="my_name" aria-label="Your name is?" type="text" />
Which results in the Name “Your name is?”. The reason being, the algorithm first checks for the presence of This logic also allows the algorithm to handle more complex naming calculations, such as the following: <div id="parentId" >
<button aria-labelledby="parentId" aria-label="Remove event:" > X </button>
<span class="event"> Blindfolded Dart Throwing Contest </span>
</div> Which results in the button Name “Remove event: Blindfolded Dart Throwing Contest”, because the algorithm detects the presence of Source: https://www.levelaccess.com/how-the-w3c-text-alternative-computation-works/ |
Tested in NVDA: it doesn't resolve |
Have you tried creating a custom component and using it with |
Potential dupe of #4204 |
Is your feature request related to a problem? Please describe
Currently,
<Dropdown.Menu/>
component doesn't accept a customaria-labelledby
property.The properties generated by
@restart/ui
useDropdownMenu()
hook overwrite any custom-passsedaria-labelledby
property with a toggler elementid
which is not correct:react-restart/ui#50
Describe the solution you'd like
The solution would be
@restart/ui
adding an opt-out flag or something.Or maybe
<Dropdown.Menu/>
component re-applying a customaria-labelledby
property over the one generated by@restart/ui
useDropdownMenu()
hook.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: