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

copy button is not accessible #335

Closed
Mantish opened this issue Mar 22, 2023 · 0 comments · Fixed by #341
Closed

copy button is not accessible #335

Mantish opened this issue Mar 22, 2023 · 0 comments · Fixed by #341

Comments

@Mantish
Copy link
Contributor

Mantish commented Mar 22, 2023

Hi,
We're using the copy button feature which is really useful but is not accessible.

The problem is that they're not actual HTML buttons, so they can't be used by keyboard / screen reader users.

I think the easiest solution is to use a <button> element with the proper attributes like aria-label.
If that is not possible, a button role should be assigned, but also there needs to be a focus outline with keyboard, along with a tabindex of 0. In addition, it would need a hook or listener that looks for enter or spacebar to activate the copy item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant