fix(web): copy code component accessibility#2868
Conversation
|
|
@yanthomasdev is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
3a72838 to
187e0ff
Compare
|
Look like community PRs need approval in the Vercel dashboard to be deployed, I think they do have options to make it more flexible. Let me know if I can help somehow. |
|
@yanthomasdev not waiting for the deployments, they shouldn't be required to merge, just CodeQL and cubic that are just not running for some reason |
|
@gabrielmfern oh, I have an idea what might be the issue. Could you take a look at the branch protection rules? Since it only affected me (contributor) but doesn't seem to affect you and other maintainers (that might be able to bypass branch protection rules) depending on the branch, it might be because it requires some workflow to run that doesn't exist anymore. Here's a GitHub discussion on this issue: https://github.com/orgs/community/discussions/26698 |
|
@yanthomasdev yeah I think it's something along those lines, maybe because those two workflows only run for maintainers, I'll take a look, for now I've removed the requirement for them to succeed before merging |
Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
This PR adds screen reader-only text to the
copy-code.tsxcomponent witharia-liveto give feedback once the content is copied.This is meant to make it compliant with WCAG's Success Criterion 1.1.1: Non-text Content (Level A), ensuring the button's purpose and state, represented by an icon, can be understood by users of assistive technologies.
Changes were tested on Windows 11, Chrome, NVDA. For reference, before the announcement would be "button", now "button, copy to clipboard" and "copied" after clicked.
I haven't opened an issue since it wasn't clear if they should be opened for issues/bugs outside the library itself. Let me know if one's necessary.
Summary by cubic
Adds a screen reader–only live region to the copy-code button so assistive tech announces “Copy to clipboard” and “Copied.” This clarifies the button’s purpose and state and aligns with WCAG 1.1.1.
Written for commit 4f7cb18. Summary will update on new commits.