eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiCodeBlock] set custom aria-label for `Copy` button

Open alexwizp opened this issue 1 year ago • 0 comments

Description

During accessibility testing, our auditor pointed out that on some pages with two or more EuiCodeBlock components, there are multiple buttons with the aria-label="Copy". This violates the WCAG 2.2 guideline on "Info and Relationships".

Let's discuss the available options for addressing this issue.

I see 2 options:

  1. Update API to make possible to override aria-label attribute for Copy button
  2. Using the root level aria-label attribute (already in API), do something like: Copy {rootLevelAriaLabel} code snippet

Screen

Image

Related to: https://github.com/elastic/kibana/issues/195030

alexwizp avatar Sep 05 '24 07:09 alexwizp