Skip to content

[BUG] "Grouped" options breaks screen readers #4277

@carsonpowers

Description

@carsonpowers

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.

image

To reproduce

  1. Navigate to the "Grouped" example on the main react-select homepage: https://react-select.com/home
    image
  2. Focus the grouped example element with NVDA (or JAWS) enabled.
  3. Click spacebar to open the menu.
  4. Click down the the keyboard arrow keys until the option "Purple" is selected.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/accessibilityIssues or PRs related to accessibilityissue/bug-confirmedIssues about a bug that has been confirmed by a maintainer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions