JedWatson / JedWatson/react-select
Placeholder linked to Input through aria-describedby
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Placeholder and Input from react-select are linked not via label, aria-label or aria-labeledby, but through aria-describedby - which is absolutely incorrect.
Raw HTML from https://react-select.com/home examples
<div id="react-select-11-placeholder">Select...</div>
<div>
<input class="" autocapitalize="none" autocomplete="off" autocorrect="off" id="react-select-11-input" spellcheck="false" tabindex="0" type="text" aria-autocomplete="list" aria-expanded="false" aria-haspopup="true" role="combobox" aria-describedby="react-select-11-placeholder">
</div>
See the difference:
- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby
- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby
The aria-describedby attribute should be used for hints and error messages, not for placeholder.
I believe the current implementation should be redone to make Placeholder linked to Input via aria-labeledby
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the raw markup from the react-select home examples and tracing how the Placeholder and Input are rendered. Compare the generated relationship with the linked MDN guidance; done means the placeholder is associated with the input using the appropriate labeling mechanism rather than aria-describedby, with the rendered markup verified.
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
- 38/100