JedWatson / JedWatson/react-select
Lack of disabled attribute on select element causing color contrast issue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
When isDisabled is set to true, the disabled attribute is correctly added to the <input> element that makes up react select.
https://codesandbox.io/s/codesandboxer-example-forked-dsc99j

Unfortunately, the actual select element (or rather the div that represents the select) is not properly identified as disabled and, as a result, tools like Accessibility Insights for Web complain that color contrast requirements are not met. Color contrast requirements do not need to be met for disabled controls, but tools are not seeing the select as disabled because it is not marked up properly.

This can be solved by added aria-disabled="true" to the control--is--disabled node.

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
Use the linked CodeSandbox reproduction and inspect the select's control--is--disabled node in the rendered markup. Check the result with Accessibility Insights for Web, and consider the issue complete when the disabled select is marked with aria-disabled="true" and the contrast warning no longer treats it as enabled.
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
- 45/100