Skip to content

a11y: add title attribute to TruncatedAddress copy button (Closes #868) - #977

Open
waterWang wants to merge 1 commit into
scout-off:mainfrom
waterWang:a11y/truncated-address-copy-title
Open

a11y: add title attribute to TruncatedAddress copy button (Closes #868)#977
waterWang wants to merge 1 commit into
scout-off:mainfrom
waterWang:a11y/truncated-address-copy-title

Conversation

@waterWang

Copy link
Copy Markdown

Summary

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 change completes the accessible name pair for both screen-reader and keyboard users.

Changes

  • components/ui/TruncatedAddress.tsx: Added title="Copy full address to clipboard" to the copy button, matching the existing aria-label.
  • __tests__/components/TruncatedAddress.test.tsx: Added an assertion verifying the title attribute is present on the copy button.

Acceptance Criteria

  • The copy button has a non-empty aria-label ("Copy full address to clipboard")
  • A title attribute with the same value is present for sighted mouse users
  • npm test passes (verified with NODE_ENV=development since the project's global NODE_ENV=production breaks React's act() in tests)
  • __tests__/components/TruncatedAddress.test.tsx asserts the accessible name and title

Closes #868

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
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 this pull request may close these issues.

Add title attribute to TruncatedAddress copy button

1 participant