Skip to content

feat(a11y+vocab): single dialog landmark, focus trap, copy scrub - #5

Merged
gitchadd merged 1 commit into
mainfrom
feat/v1-a11y-vocab-pass
May 15, 2026
Merged

gitchadd merged 1 commit into
mainfrom
feat/v1-a11y-vocab-pass

Conversation

@gitchadd

Copy link
Copy Markdown
Collaborator

Summary

  • A11y: Modal is now the single owner of the dialog landmark (role=dialog, aria-modal, aria-labelledby). Focus is trapped between focusables and returned to the launcher on close. Nested role="dialog" removed from ContactSupport's loading/error views and Support's DialogContent so screen readers see a single valid landmark per surface.
  • User-facing copy scrub: protocol/crypto vocab removed from rendered strings. "merchant"/"mediator"/"fulfillment partner" → neutral wording. "Your report is on chain" → "Your support request is registered". "Finding merchant" badge → "Matching". Stepper label "Merchant" → "Matching". Tx hash dropped from SubmittedView. "View dispute" launcher → "View report". OFP/FPM disclosure paragraph removed.

Test plan

  • npm run typecheck (clean)
  • npm test (55 passed)
  • node --experimental-strip-types --test 'src/core/*.test.ts' (70 passed)
  • npm run build (CJS + DTS success)
  • Manual smoke on demo merchant-app: open report flow, verify focus trap, ESC + backdrop close, screen-reader announces single dialog landmark, no "merchant"/"on chain" text visible

🤖 Generated with Claude Code

…y scrub

Modal now owns the dialog landmark (role, aria-modal, aria-labelledby),
traps Tab between focusables, captures and restores focus on open/close.
Removes the nested role="dialog" from ContactSupport's ChatLoadingView,
ChatErrorView, and Support's DialogContent so screen readers see a single
valid dialog per surface.

User-facing copy scrubbed for internal terms:
- "merchant" / "mediator" / "fulfillment partner" → neutral language
  ("support team", "your order", "the other side")
- "Your report is on chain" → "Your support request is registered"
- Drops the tx hash from SubmittedView (chain detail not user-relevant)
- "Finding merchant" badge → "Matching"
- Stepper label "Merchant" → "Matching"
- "View dispute" launcher → "View report"
- Drops the OFP/FPM disclosure paragraph from the Support dialog

Tests + types + build all green. Vitest 55 passed, node:test 70 passed.
@gitchadd
gitchadd merged commit 6d4c4d7 into main May 15, 2026
0 of 2 checks passed
vvictor-dev pushed a commit to vvictor-dev/widgets that referenced this pull request Aug 22, 2026
…y scrub (p2pdotme#5)

Modal now owns the dialog landmark (role, aria-modal, aria-labelledby),
traps Tab between focusables, captures and restores focus on open/close.
Removes the nested role="dialog" from ContactSupport's ChatLoadingView,
ChatErrorView, and Support's DialogContent so screen readers see a single
valid dialog per surface.

User-facing copy scrubbed for internal terms:
- "merchant" / "mediator" / "fulfillment partner" → neutral language
  ("support team", "your order", "the other side")
- "Your report is on chain" → "Your support request is registered"
- Drops the tx hash from SubmittedView (chain detail not user-relevant)
- "Finding merchant" badge → "Matching"
- Stepper label "Merchant" → "Matching"
- "View dispute" launcher → "View report"
- Drops the OFP/FPM disclosure paragraph from the Support dialog

Tests + types + build all green. Vitest 55 passed, node:test 70 passed.

Co-authored-by: gitchadd <gitchad@icloud.com>
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