JedWatson / JedWatson/react-select

Missing aria-required attribute

Open
#5,006 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Hello, I'm currently implementing a form using React-Select and I've been told that the required attribute isn't coming through for screen-reader users. I've tried using MacOS's VoiceOver feature, and it seems that it reports it as "Combo box" along with the title, but doesn't mention required.

I saw that aria-required was listed in a large page of props here so I assumed it was part of the accepted props. Does React-Select support this attribute, or should I find another way to achieve this?

I've forked a codesandbox here, and as you can see when inspecting the dom, there are no aria-required attributes on any of the dom nodes

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.

Research direction

Start with the linked CodeSandbox and its example.js file, then inspect the rendered DOM and the component props involved in the select input. Confirm whether aria-required is supported and identify the expected behavior for screen readers; the issue is done when the required state is correctly exposed or the supported alternative is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.