react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Add appropriate roles to option and listbox elements

Open MssKnd opened this issue 2 years ago • 3 comments

This pull request aims to improve the accessibility of react-select by adding appropriate roles to the option and listbox elements.

Changes:

  • Added the option role and aria-selected to the option-equivalent elements
  • Added the listbox role to the listbox-equivalent elements

I noticed that while using react-select in my own project, I couldn't use getByRole with react-testing-library to target the option-equivalent elements. This led me to create this PR to address the issue.

By merging this PR, we can make react-select more accessible and provide a better experience for users with assistive technologies. Please let me know if any further changes or tests are needed. I look forward to contributing to this project and making it more inclusive for all users.

MssKnd avatar Apr 30 '23 05:04 MssKnd

⚠️ No Changeset found

Latest commit: 50930cd72f9fe41c56c8fd2a74f774bed38d179c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Apr 30 '23 05:04 changeset-bot[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

codesandbox-ci[bot] avatar Apr 30 '23 05:04 codesandbox-ci[bot]

@AriPerkkio Thank you for your nice information! I am dealing with the same work-around right now.

MssKnd avatar Aug 24 '23 19:08 MssKnd

This should be fixed by #5758 by the way

csandman avatar Jun 12 '24 04:06 csandman

@csandman Thanks for letting me know! I will close this PR.

MssKnd avatar Jun 17 '24 01:06 MssKnd