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

ColorPicker: Add accessible label for copy button #67094

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

mirka
Copy link
Member

@mirka mirka commented Nov 18, 2024

Alternative to #57168
Addresses ##57157 (maybe not a full fix)

What?

Adds an accessible label for the copy button in ColorPicker.

Why?

The icon button was only associated with an ARIA description via the Tooltip, and didn't have an ARIA label. This is a pretty big bug which fix was stalled in #57168, so I'm proposing we address this now in a less controversial way.

Testing Instructions for Keyboard

See the Storybook story for ColorPicker and check that the copy button is accessibly labeled.

@mirka mirka added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components labels Nov 18, 2024
@mirka mirka self-assigned this Nov 18, 2024
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@@ -65,6 +65,11 @@ export const ColorCopyButton = ( props: ColorCopyButtonProps ) => {
>
<CopyButton
size="small"
aria-label={
Copy link
Member Author

Choose a reason for hiding this comment

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

This shouldn't result in a redundant ARIA description, thanks to #65989.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant