-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option for custom aria-describedby #5871
base: master
Are you sure you want to change the base?
Add option for custom aria-describedby #5871
Conversation
|
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. |
Hey @Superman2971 I think your test is correct but you just need to run
should be on two lines to so that it goes under the max line length of prettiest default setting |
Thank you @plahteenlahti! That was a good catch 👍 Now fixed 😄 ✅ |
My team is waiting on this merge! |
We need this merge as well! |
'aria-describedby': | ||
this.props['aria-describedby'] || | ||
this.getElementId('placeholder'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be:
'aria-describedby': | |
this.props['aria-describedby'] || | |
this.getElementId('placeholder'), | |
'aria-describedby': [ | |
this.props['aria-describedby'], | |
this.getElementId('placeholder'), | |
] | |
.filter(Boolean) | |
.join(' '), |
Provides support for issues: #5562 and #1570
I've tested my fork on local repository to confirm this does indeed pass the provided
aria-describedby
to the react-select. Also tested and passed theyarn lint
,yarn type-check
, andyarn test
per CONTRIBUTING.MDOur team needs this implemented to meet a11y support for our use of react-select. We have some custom hint and error messaging that is related to the Select and needs to be accessibly connected through aria-describedby. I'm hoping we can contribute to the library and make this available in a minor update to the package. Please let me know what I can do to assist in getting this PR approved and ready to merge :) Cheers!