This document defines the voice and tone for all user-facing strings in the wallet connection flow. Every string should follow these principles before being shipped.
Lead with a human-friendly acknowledgement that something didn't go as expected. Avoid blaming the user.
| Instead of | Use |
|---|---|
| "Failed" | "We couldn't connect your wallet" |
| "Error" | "Something went wrong" |
| "Invalid" | "That didn't work" |
Explain what happened in plain language. Users need to understand the problem before they can fix it.
| Instead of | Use |
|---|---|
| "Not supported" | "We couldn't find a wallet extension" |
| "Timeout" | "The wallet took too long to respond" |
| "Rejected" | "You cancelled the connection" |
Always tell the user what to do next. An error without a next step is a dead end.
| Instead of | Use |
|---|---|
| "Try again" | "Try connecting again" |
| "Install extension" | "Install one from your browser's store, then try again" |
| "Check network" | "Switch your wallet to match this app and try again" |
- Target grade level: ≤ 7 (Flesch-Kincaid)
- Sentence length: ≤ 20 words per sentence
- Vocabulary: Plain English; avoid jargon unless the term is standard wallet terminology (e.g., "extension", "network")
- No colour-only meaning: All status indicators use icons + text (WCAG 1.4.1)
- Screen-reader labels: Every interactive element has an
aria-labelor visible text - Live regions: Dynamic content uses
aria-live="polite"for connection status - Focus management: Dialog traps focus; close button is keyboard-accessible
All strings live in components/connect-wallet-modal.messages.ts. This file:
- Groups strings by semantic purpose (status, errors, labels)
- Exports a
friendlyConnectionError()helper for normalising raw SDK errors - Is the single source of truth — no string should appear inline in components
- Add the string constant to
connect-wallet-modal.messages.ts - Follow the three-part pattern: acknowledgement + cause + action
- Keep it under 20 words
- Import and use in the component — never hardcode
Scenario: User's wallet is on the wrong Stellar network.
Acknowledgement: "Your wallet is on a different network."
Cause: "This app runs on testnet, but your wallet is set to mainnet."
Action: "Switch your wallet's network and try again."
Combined (≤ 20 words):
"Your wallet is on a different network. Switch it to match this app and try again."
| Scenario | Message |
|---|---|
| Unknown wallet ID | "Something went wrong while connecting. Please try again." |
| Extension locked | "Your wallet extension is locked. Unlock it and try connecting again." |
| Network mismatch | "Your wallet is on a different network. Switch it to match this app and try again." |
| User dismissed popup | "You cancelled the connection. If this was a mistake, try connecting again." |
| Timeout | "The wallet took too long to respond. Check that the extension isn't paused and try again." |
| Extension not installed | "We couldn't find a wallet extension. Install one from your browser's store, then try again." |
Every error path must be covered by a snapshot or integration test that:
- Asserts the correct message key is displayed
- Verifies the message is not a raw SDK error string
- Confirms
aria-liveregions announce the message
Run tests with:
pnpm test -- --testPathPattern=connect-wallet-modalLast Updated: June 2026 Status: Active Version: 1.0