[Bug]: Combobox does not have aria-invalid
attr
#33490
Labels
Component: Combobox
Fluent UI react (v8)
Issues about @fluentui/react (v8)
Needs: Attention
Type: Bug 🐛
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: