Skip to content

Confirm copies to screen readers and say when copying fails #343

Open

Description

@abhishekgahlot2

MessageCopyButton confirms success only with an icon; code-block copying changes its text and accessible name to "Copied". Neither provides a dedicated live confirmation, and neither shows clipboard failures.

Where to start

  1. The thread has two copy implementations: MessageCopyButton swallows errors and disables itself while it shows the check; the code block CopyButton has no error handling at all.
  2. Make one small shared copy helper (copied and failed state plus a polite live-region message) and use it in both.
  3. Show a short "Couldn't copy" state on failure, and keep the button enabled while it shows "Copied".

Code to look at:

Done when

  • Both buttons go through one helper.
  • A unit test mocks navigator.clipboard to resolve and to reject and checks both states.
  • VoiceOver or NVDA reads "Copied" after a copy.

Free to try

Sign up free at app.useagent.org. New accounts get free model credits (GLM or Claude Opus, up to a limit) and free cloud sandbox time, enough to finish this task without paying or adding a key.

Send it a small task in plain words and watch it work. You'll see the screens this issue is about. The link in the sign-up email works for 24 hours. Not there? Check spam.

Stuck? Comment here with a screenshot and we'll help.

Keep private details out of here

This page is public. Don't post your real email, phone number, address, payment details, API keys, or screenshots that show any of them. Send anything private, including how you'd like to be paid, to [email protected] with a link to your comment here.

Claim it

Comment /take and the issue is assigned to you. First come, first served.

Rules

  • Use the app while you work, and put before and after screenshots or a short recording in your pull request. For backend or docs work, show the result end to end.
  • One change per pull request. Run the checks in CONTRIBUTING.md.
  • AI help is fine, blind AI output is not. You must understand, run and explain every line you submit.
  • Untested or generated pull requests, and pull requests on an issue someone else claimed, are closed without a reply and don't count for Hacktoberfest.

Activity

  1. sharmis-tp commented on Oct 21, 2026

    @sharmis-tp

    I can pick this up. I'd make one small shared copy helper with copied and failed states plus a polite live-region message, use it in both MessageCopyButton and the code block CopyButton, show a short "Couldn't copy" state on failure and keep the button enabled while it shows "Copied", with tests that mock the clipboard for success and rejection. Could you assign it to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityBarrier affecting people with disabilitieshacktoberfestOpen for Hacktoberfest contributorshelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions