[Select] Required and Error states not correctly configured for screen readers #44740
Labels
accessibility
a11y
component: select
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
Steps to reproduce
Steps:
Error state is not set on the div with
role="combobox".
It should havearia-invalid="true"
. See the MDN Aria docs for more details.Required state is not set on the div with
role="combobox"
. It should havearia-required="true"
. See the MDN Aria docs for more details.Current behavior
Error state is not set on the div with
role="combobox".
It is set on theinput
component, but since this isaria-hidden="true"
, screen readers do not report this to users.Required state is not set on the div with
role="combobox".
It is set on theinput
component, but since this isaria-hidden="true"
, screen readers do not report this to users.Note that other MUI form fields do both of these correctly by having the standard
required
or thearia-invalid="true"
properties on the correctinput
component which is NOTaria-hidden="true"
. This is only a problem with the Select component.Expected behavior
Error state is set on the div with
role="combobox".
Required state is set on the div with
role="combobox".
Context
This is important for screen readers to read and interact with Select components. It's necessary to pass an accessibility audit.
Your environment
npx @mui/envinfo
Search keywords: accessibility aria-required aria-invalid select
The text was updated successfully, but these errors were encountered: