-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
category/accessibilityIssues or PRs related to accessibilityIssues or PRs related to accessibilityissue/bug-confirmedIssues about a bug that has been confirmed by a maintainerIssues about a bug that has been confirmed by a maintainer
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.
ebonow
Metadata
Metadata
Assignees
Labels
category/accessibilityIssues or PRs related to accessibilityIssues or PRs related to accessibilityissue/bug-confirmedIssues about a bug that has been confirmed by a maintainerIssues about a bug that has been confirmed by a maintainer