fix: add aria-label and error handling to copy profile URL button#309
Open
mrunalC27 wants to merge 1 commit into
Open
fix: add aria-label and error handling to copy profile URL button#309mrunalC27 wants to merge 1 commit into
mrunalC27 wants to merge 1 commit into
Conversation
|
@mrunalC27 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Thanks for your first PR on DevTrack! 🎉
A maintainer will review it within 48 hours. While you wait:
- Make sure CI is passing (type-check + lint)
- Double-check the PR description is filled out and the issue is linked
- Feel free to ask questions in Discussions if you need help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
aria-label="Copy profile URL"to the copy button in the settings page, and adds proper.then().catch()error handling tonavigator.clipboard.writeText()so "Copied!" only shows when the copy actually succeeds.Closes #218
Type of Change
Changes Made
aria-label="Copy profile URL"to the copy button for screen reader accessibilitytype="button"to prevent accidental form submissionnavigator.clipboard.writeText()in.then().catch()sosetCopied(true)only runs on success.catch(() => {})to silently handle clipboard failuresHow to Test
http://localhost:3000/dashboard/settingsaria-label="Copy profile URL"is presentnavigator.clipboard.writeText = () => Promise.reject('denied')to simulate clipboard failure, then click Copy — button should NOT show "Copied!"Screenshots (if UI change)
No visual change — the button looks the same but is now accessible and reliable.
Checklist
npm run lintpasses locallynpm run type-check)