-
Notifications
You must be signed in to change notification settings - Fork 392
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
Possibility to set 'id' attribute #1121
Comments
Why is it not possible? It should be possible, are you staying that passing an I'd doesn't end up anywhere? |
Exactly. |
This is a critical accessibility bug. If we set a Setting the <div
role="combobox"
id="myID_input"
aria-owns="myID_listbox"
aria-controls="myID_listbox"
aria-expanded="false"
aria-haspopup="listbox"
aria-busy="false"
aria-autocomplete="list"
aria-disabled="false"
aria-readonly="false"
tabindex="-1"
data-intent="mouse"
class="rw-dropdown-list rw-widget"
>
<div tabindex="-1" class="rw-widget-input rw-widget-picker rw-widget-container">
<div class="rw-dropdown-list-input">
<input name="myName" tabindex="-1" aria-hidden="true" class="rw-detect-autofill rw-sr" value="">
<input class="rw-dropdownlist-search" autocomplete="off" size="2" value="">
<span class="rw-dropdown-list-value"></span>
</div>
<span aria-hidden="true" class="rw-btn rw-picker-caret"></span>
</div>
</div> As you can see it uses a |
If you look at how labels behave on built-in HTML inputs, you'll see that clicking on the label will shift the user focus to the input element. For example, clicking a checkbox's label will check the checkbox and make it focused and clicking a text input's label will make the text input focused. That means the proper fix for the DropdownList is for the |
I tried setting id of the underlying input to associate it with a label, using the following, but it didn't work:
InvestigationThe key-value pairs are copied from the object at:
However due to destructuring of specific keys, it just ignores attributes such as react-widgets/packages/react-widgets/src/DropdownListInput.tsx Lines 31 to 49 in 2ee7dc0
react-widgets/packages/react-widgets/src/DropdownListInput.tsx Lines 101 to 112 in 2ee7dc0
|
It is not possible currently to set the
id
attribute ofCombobox
,NumberPicker
etc. Because of that, it is not possible to link a<label>
to them usinghtmlFor
attribute.The text was updated successfully, but these errors were encountered: