Skip to content
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(CopyButton): adjust aria-live, add closeOnActivation #13460

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

tw15egan
Copy link
Collaborator

@tw15egan tw15egan commented Apr 3, 2023

Closes #13163

removes the aria-live that was causing the voiceover to read the copy text twice. This seems like a holdover from before we used IconButton under the hood. Since IconButton has proper aria roles and labels, it can handle the voiceover itself.

Also noticed an issue where the popover content was being closed immediately upon activation, rendering the feedback text useless

2023-04-03 16 04 34

To fix this, I've added the closeOnActivation prop as configurable in iconButton, rather than setting it to always be false. It is passed in as false from Copy

2023-04-03 16 07 15

Changelog

Changed

  • closeOnActivation can be configured in iconButton

Removed

  • aria-live was removed from CopyButton

Testing / Reviewing

Ensure there are no a11y violations. Ensure the voiceover only reads the feedback text once.

@netlify
Copy link

netlify bot commented Apr 3, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8b6575d
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/642bef1e8098c000086a785f
😎 Deploy Preview https://deploy-preview-13460--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 3, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 8b6575d
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/642bef1e8098c000086a7864
😎 Deploy Preview https://deploy-preview-13460--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@aledavila aledavila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. no a11y violations and it doesn't keep repating copied

Copy link
Contributor

@andreancardona andreancardona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎

@kodiakhq kodiakhq bot merged commit 37ec3d1 into carbon-design-system:main Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[a11y]: CopyButton announces "Copied!" multiple times when pressing the copy button
3 participants