JedWatson / JedWatson/react-select
Unable to change the role of select
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
My company is using react-select but we need to change the role because of certain conflicts with the role being set to combobox. When we add the prop role="listbox" into the component, it continues to show 'combobox', and there seems to be no way around this. Is there perhaps something we are missing or are we unable to change the role right now?
The version we're using is 5.7.4.
Here is an example:
<RSelect
{...inputAttributes}
aria-label={generatedAriaLabel}
unstyled
role="listbox"
// rest of code...
What dev tools shows:
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
Reproduce the supplied RSelect example with react-select 5.7.4 and inspect the rendered role in browser dev tools. Trace where the component's role is selected and add or update coverage for the requested role behavior. Done means the documented role prop produces the intended rendered role without breaking the select behavior.
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