mui / mui/material-ui

[Select] "required" state is not being recognized by screen readers (mac voiceover)

Open
#33,936 1 comment 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

accessibility scope: select
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Current behavior 😯

Since the active focused element is button and we are missing required attribute on it screen readers (mac voiceover) is not recognizing that the "select" field is required.

Notice that we are missing "required" state on MuiSelect-select button.
Screen Shot 2022-08-15 at 3 41 33 PM

To fix this we need to add the following

 SelectDisplayProps: {
     'aria-required': props?.required
}
Expected behavior 🤔

"required" or "aria-required" to be set appropriately when we set required prop on "Select"

<TextField select required />

or 

<Select required />

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.