Skip to content

fix(a11y): give explorer links a descriptive aria-label - #625

Open
16navigabraham wants to merge 1 commit into
Sorokit:mainfrom
16navigabraham:fix/explorer-link-accessible-labels
Open

fix(a11y): give explorer links a descriptive aria-label#625
16navigabraham wants to merge 1 commit into
Sorokit:mainfrom
16navigabraham:fix/explorer-link-accessible-labels

Conversation

@16navigabraham

Copy link
Copy Markdown

Summary

Closes #563.

Most of this issue's acceptance criteria were already implemented in prior PRs — TransactionHistory's rows already link to stellar.expert based on the active network, and TransactionPanel's success hash already links to it too, both with target="_blank" rel="noopener noreferrer". The one gap left was the aria-label.

What changed

  • src/components/TransactionHistory.tsxTxRow's existing row aria-label (hash/status/fee) now also says — view on Stellar Expert (opens in a new tab) whenever the row actually renders as a link. When the network is unrecognized and the row falls back to a plain, non-clickable <div>, the label is unchanged.
  • src/components/TransactionPanel.tsx — both explorer links in the success panel (the hash itself, and the "View on Stellar Expert" text link beside the Successful badge) now have an explicit aria-label naming the transaction and noting it opens in a new tab. The hash text inside the first link is marked aria-hidden so its accessible name comes from the aria-label instead of being announced twice.
  • Tests: 2 new cases in TransactionHistory.test.tsx (row aria-label mentions the explorer link when it is one, and doesn't when it isn't) and 1 new case in TransactionPanel.test.tsx (both explorer links expose an accessible name containing the hash and "opens in a new tab").

Acceptance criteria

  • Each transaction hash in TransactionHistory is a clickable link (already implemented before this PR)
  • Links point to stellar.expert with the correct network (testnet vs mainnet) (already implemented before this PR)
  • Links open in a new tab with rel="noopener noreferrer" (already implemented before this PR)
  • The success hash in TransactionPanel is also linked (already implemented before this PR)
  • The link has an aria-label describing it for screen readers

Testing

  • npx vitest run src/components/TransactionHistory.test.tsx → 36/36 pass.
  • npx vitest run src/components/TransactionPanel.test.tsx → same 23/34 pass as main plus my 1 new test (24 total passing here); the 11 failures are pre-existing and unrelated — see note below.
  • npm run typecheck → clean.

Note for maintainers

main currently has 11 pre-existing, unrelated failures in TransactionPanel.test.tsx (confirmed via git stash against a clean checkout) — every test that completes a submission through the confirmation modal fails with "Wallet not connected", because the shared useSorokit() mock at the top of the file predates the "context client" refactor and never sets a client field. My new test works around it locally (client: getClient()), but the shared, already-broken tests are untouched here since fixing them is out of scope for this issue.

TransactionHistory already links each row to stellar.expert (added in
a prior PR) and TransactionPanel already links the success hash, but
neither surfaced that fact through an aria-label a screen reader user
can rely on:

- TransactionHistory's row aria-label described the transaction
  (hash/status/fee) but never mentioned it was also a link to an
  external explorer, or that it opens in a new tab.
- TransactionPanel's two explorer links (the hash itself, and the
  'View on Stellar Expert' badge link) had no aria-label at all.

- TransactionHistory.tsx: append '— view on Stellar Expert (opens in
  a new tab)' to a row's aria-label only when it actually renders as
  a link (network unrecognized -> plain row, label unchanged).
- TransactionPanel.tsx: add an aria-label to both explorer links,
  and mark the hash text inside the first one aria-hidden so the
  link's accessible name comes from the aria-label instead of being
  read twice.

Closes Sorokit#563
Copilot AI lite review requested due to automatic review settings August 29, 2026 11:21
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@16navigabraham Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Transaction hashes have no link to a block explorer in TransactionHistory or TransactionPanel

2 participants