-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Bug]: Combobox does not have aria-invalid
attr
#33490
Comments
ComboboxDropdownLooks like a bug, but I will let @smhigley to check 🐱 |
aria-invalid
attr
I don't think this makes sense. If there is an error, there should be an aria-invalid indicating this. |
@Thomas-Neuhauser yes, sorry I noticed it already. I updated my message 👍 |
Ok I'm sorry now if my response doesn't fit exactly to what you wrote, since you finally now state "Looks like a bug..." |
Oh yeah, that's definitely a bug, thanks for finding it! Looks like the v8 Dropdown is actually also not setting I'll make a PR that fixes both. Thanks again! |
Package
react
Package version
8.120.5
React version
16.14.0
Environment
Current Behavior
We are facing accessibility issues using the ComboBox control.
This control is not setting an aria-invalid attribute corresponding to the presence of an error message set via errorMessage.
You can check the render output and behavior here:
https://developer.microsoft.com/en-us/fluentui#/controls/web/combobox
If you check the same for a DropDown or TextField you can see, that these controls always set an aria-invalid attribute to either false or true:
https://developer.microsoft.com/en-us/fluentui#/controls/web/dropdown
https://developer.microsoft.com/en-us/fluentui#/controls/web/textfield
Expected Behavior
All controls should consistently use the combination of aria-describedby, role="alert" and aria-invalid in order to let screen readers correctly react to error situations.
For the ComboBox we built a workaround using autofill for setting aria-invalid at the inner input field depending on the presence of an error message for the time being.
Reproduction
https://developer.microsoft.com/en-us/fluentui#/controls/web/combobox
Steps to reproduce
Are you reporting an Accessibility issue?
yes
Suggested severity
Medium - Has workaround
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
The text was updated successfully, but these errors were encountered: