JedWatson / JedWatson/react-select

[Accessibility]: Inputs uses incorrect aria labeling

Open
#6,092 0 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

Version 5.10 freshly updated generates an input control as such:

<div class="css-1jqq78o-placeholder" id="react-select-2-placeholder">
Select...
</div>
<div class="css-19bb58m" data-value="">
<input class="" style="color: inherit; background: 0px center; opacity: 1; width: 100%; grid-area: 1 / 2; font: inherit; min-width: 2px; border: 0px; margin: 0px; padding: 0px;" autocapitalize="none" autocomplete="off" autocorrect="off" id="react-select-2-input" spellcheck="false" tabindex="0" type="text" aria-autocomplete="list" aria-expanded="false" aria-haspopup="true" role="combobox" aria-describedby="react-select-2-placeholder" value="">

This uses aria-describedby="react-select-2-placeholder" which is not valid for applying a 'label' for accessbility compliance. It should be aria-labelledby.

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

Use the rendered input markup in the issue as the starting point and trace where the placeholder relationship is assigned in the Select input implementation. Verify the accessibility behavior and generated markup, with the completed change using the appropriate label relationship instead of aria-describedby.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.