Skip to content

test(wallet): cover wallet page; a11y: focus rings, icon labels, skip link - #614

Open
JosephOladele wants to merge 1 commit into
kellymusk:devfrom
JosephOladele:feature/473-474-475-476-a11y-and-wallet-tests
Open

test(wallet): cover wallet page; a11y: focus rings, icon labels, skip link#614
JosephOladele wants to merge 1 commit into
kellymusk:devfrom
JosephOladele:feature/473-474-475-476-a11y-and-wallet-tests

Conversation

@JosephOladele

@JosephOladele JosephOladele commented Aug 31, 2026

Copy link
Copy Markdown

Summary

Four issues, all assigned to me:

  • test(wallet): write tests for wallet page (create + view states) #473app/(app)/wallet/page.tsx had no tests. Added coverage for the loading spinner, the "set up your payment address" state when GET /wallet returns 400, the loaded wallet-address view, and the copy-to-clipboard button's confirmation state.
  • a11y: add visible focus indicators to all interactive elements #474 — Audited every outline-none usage across the app plus the login/charge/transactions/withdraw pages' full component trees. Found and fixed two inputs with no focus-visible alternative at all (landing Pricing's country <select>, AmountWidget's amount <input>). Also found — via actually tabbing through the login page in a browser, not just static review — that the default Button variant's focus ring (ring-ring/50) is nearly invisible against its own bg-primary background on primary-colored buttons like "Sign in"; added ring-offset-2/ring-offset-background so the ring is visually separated regardless of button color. Everything else (Input, Select, links, other Button variants) already paired outline-none with a working focus-visible: alternative.
  • a11y: ensure all icon-only buttons have accessible labels #475 — Audited every <Button>/<button> in the app for icon-only content with no accessible name. The two examples the issue names (charge page's backspace key, wallet page's copy button) already have visible text/aria-labels. Found three that didn't, all in the send flow: the header back button, the QR-scan button, and the numpad backspace key — added aria-label to each.
  • a11y: add skip-to-main-content link for keyboard users #476 — Added a visually-hidden "Skip to main content" link as the first focusable element in app/(app)/layout.tsx, visible on focus, targeting a new main#main-content.

Closes #473
Closes #474
Closes #475
Closes #476

A blocking bug found along the way

components/session-provider.tsx didn't compile on dev — a bad merge between the Freighter-auth PR and the session-persistence PR left duplicate imports, a duplicate local Session type shadowing the one imported from @/lib/api, and two interleaved signOut implementations (the second literally opening inside the first's unclosed body). This blocks anything importing useAuthenticatedSession, including the wallet page under test here. Reconciled it to the cookie-based api.getSession()/api.logout() restoration path (the direction issue #582 already points toward) plus the Freighter sign-in flow.

What I couldn't verify

Test plan

  • npx jest — 44/44 passing, including the pre-push hook's own full run
  • New tests: 4 for the wallet page, 3 for the skip link (first-focusable, targets #main-content, hidden while session isn't ready), 3 for the two send-flow icon-button labels + backspace key, 2 for the focus-ring className presence on the two fixed inputs
  • npx eslint on every changed file — clean (one pre-existing jsx-a11y/label-has-associated-control error in send-page-client.tsx predates this PR, confirmed via git stash, not touched here — different a11y concern than the three issues above)
  • npx tsc --noEmit — no new errors
  • Manually verified in a real browser: tabbed through the entire /login page confirming every focusable element gets a clearly visible ring, confirmed the Pricing select and AmountWidget input rings render correctly. Before the ring-offset fix, the "Sign in" button's ring was the same hue as its own background and hard to see; after, there's a clear gap around the button regardless of its color.

… link

- Add tests for the wallet page's loading spinner, "set up" (400) state,
  loaded wallet address, and the copy-to-clipboard confirmation. (kellymusk#473)

- Add focus-visible rings to the two inputs missing one entirely (landing
  Pricing's country <select>, AmountWidget's amount <input>), and give the
  default Button variant a ring-offset so its focus ring isn't the same
  hue as its own background — confirmed via live keyboard nav that the
  ring was nearly invisible on primary-colored buttons (e.g. "Sign in")
  before this. Everything else audited (Input, Select, links, other Button
  variants) already pairs outline-none with a focus-visible alternative. (kellymusk#474)

- Add aria-label to the three icon-only buttons found on audit that had
  none: the send flow's header back button, its QR-scan button, and its
  numpad backspace key. The two examples named in the issue itself (charge
  page's backspace, wallet page's copy button) already had accessible
  names — this covers what was actually still missing repo-wide. (kellymusk#475)

- Add a visually-hidden "Skip to main content" link as the first focusable
  element in app/(app)/layout.tsx, targeting a new main#main-content. (kellymusk#476)

Along the way, fixed components/session-provider.tsx: a bad merge between
the Freighter-auth branch and the session-persistence branch had left
duplicate imports, a duplicate Session type, and two interleaved, broken
signOut implementations — the file didn't compile, which blocked every
test here (including the wallet page test, since it depends on
useAuthenticatedSession). Reconciled to the cookie-session restoration
path plus Freighter sign-in.

app/(app)/transactions/page.tsx has the same bad-merge pattern (duplicate
imports, dozens of now-undefined names) and doesn't compile, so keyboard-nav
verification on the transactions page specifically wasn't possible; kellymusk#589 and
kellymusk#472 already track downstream symptoms of it. Everything it shares with the
other three pages (Button, Input, Select) is already fixed here.

Closes kellymusk#473
Closes kellymusk#474
Closes kellymusk#475
Closes kellymusk#476
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@JosephOladele is attempting to deploy a commit to the kelly musk's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@JosephOladele 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

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.

1 participant