JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.54k stars 4.12k forks source link

Add appropriate roles to option and listbox elements #5625

Closed MssKnd closed 3 months ago

MssKnd commented 1 year ago

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

Changes:

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.

changeset-bot[bot] commented 1 year ago

⚠️ 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

codesandbox-ci[bot] commented 1 year ago

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.

MssKnd commented 1 year ago

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

csandman commented 3 months ago

This should be fixed by #5758 by the way

MssKnd commented 3 months ago

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