a11y: add title attribute to TruncatedAddress copy button (Closes #868) - #977
Open
waterWang wants to merge 1 commit into
Open
a11y: add title attribute to TruncatedAddress copy button (Closes #868)#977waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
Adds the missing `title` attribute to the copy button inside TruncatedAddress.tsx so sighted mouse users see a tooltip on hover. The `aria-label` was already present; this fix completes the accessible name pair for both screen-reader and mouse users. Closes scout-off#868
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 the missing
titleattribute to the copy button insideTruncatedAddress.tsxso sighted mouse users see a tooltip on hover. Thearia-labelwas already present; this change completes the accessible name pair for both screen-reader and keyboard users.Changes
components/ui/TruncatedAddress.tsx: Addedtitle="Copy full address to clipboard"to the copy button, matching the existingaria-label.__tests__/components/TruncatedAddress.test.tsx: Added an assertion verifying thetitleattribute is present on the copy button.Acceptance Criteria
aria-label("Copy full address to clipboard")titleattribute with the same value is present for sighted mouse usersnpm testpasses (verified withNODE_ENV=developmentsince the project's globalNODE_ENV=productionbreaks React'sact()in tests)__tests__/components/TruncatedAddress.test.tsxasserts the accessible name and titleCloses #868