JedWatson / JedWatson/react-select
[BUG] "Grouped" options breaks screen readers
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Using the "grouped" feature breaks screen readers.
Because group sub-component elements exist as the first item underneath menuList; aria readers will think that the dropdown list contains however many group elements there are, NOT however many option items there are, like it should.

To reproduce
- Navigate to the "Grouped" example on the main react-select homepage: https://react-select.com/home

- Focus the grouped example element with NVDA (or JAWS) enabled.
- Click spacebar to open the menu.
- Click down the the keyboard arrow keys until the option "Purple" is selected.
- Screen-reader will call out that the element is in position "0 of 2" despite the fact that there are 14 items in the list and purple is the third member of that list; it should read "3 of 14".
It's saying 0 of 2 because it's counting the number of group elements under menuList (Colors and Flavors), not the Options nested further down inside Group.
Note> Adding role="presentation" to group may fix this issue.
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 at the grouped select implementation, especially the Group and menuList elements, and reproduce the issue from the Grouped example on react-select.com/home with NVDA or JAWS. Verify that the grouped options are exposed as one list and that selecting Purple is announced as 3 of 14 rather than 0 of 2.
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