-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(Copy): add aria-live to announce text updates #5386
fix(Copy): add aria-live to announce text updates #5386
Conversation
Deploy preview for carbon-elements ready! Built with commit e4fa42b |
Deploy preview for carbon-components-react ready! Built with commit e4fa42b https://deploy-preview-5386--carbon-components-react.netlify.com |
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.
LGTM 👍 - Thanks @emyarod!
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.
Fix looks great! Confirmed on MacOS voiceover util, getting 1 "Copied!" when the button is clicked. No longer seeing the issue where CodeSnippet is announced as an editable text field as well so this should take care of #2523
Closes #5385
Closes #2523
This PR updates WAI-ARIA state so that changes in the
<CopyButton>
are read by screen readersChangelog
New
aria-live
regionChanged
aria-label
based on animation stateTesting / Reviewing
Interact with the copy button using a screen reader and observe if button label changes are immediately read