a11y: receive flow semantics (copy control, pickers, selection state) (#3467)

* Add strings for receive-flow accessibility labels

New English keys: info, long_press_to_copy, standard, token. They replace
hard-coded English in the receive amount modal, the payjoin copy modal and
the addresses long-press menu, and name the copy hint.

* Collapse copy-to-clipboard controls to one accessible button

CopyWrapper gains an optional controlBuilder that hands the copy callback to
the control it builds instead of stacking its own gesture layer on top, and it
now announces the copy through SemanticsService so screen-reader users get the
same feedback the copied state gives sighted users. When there is nothing to
copy it no longer leaves a gesture detector behind that reads as actionable
but does nothing. Its own tap/long-press wrapper is exposed as one merged
button node with a copy hint and a Copy custom action, so tap-to-copy stays
reachable on rows that also navigate.

The receive copy button used an outer gesture detector for the real work while
the visible ModernButton had a no-op onPressed behind two IgnorePointers.
It is now a single ModernButton whose onPressed copies, or opens the payjoin
copy modal when there is no direct URI to copy; the AnimatedSwitcher copied
state is unchanged. The payjoin modal announces the copy and no longer
hard-codes "Standard".

* Add screen-reader semantics to receive flow and address pickers

Every control touched here becomes exactly one merged semantics node with a
localized name, the right role and, where it exists, its selection state:

- receive page: the label chip is a button hinted with set_label and is kept
  out of the semantics tree while it is collapsed to zero height.
- amount modal: token picker and currency picker are buttons named by
  select_token / select_fiat_currency_title, the amount field carries the
  amount label instead of relying on its placeholder, and the visible captions
  are excluded so they are not announced twice.
- amount display: amount, symbol and fiat equivalent are announced together.
- info box: Dismiss is a real button, the info icon and the illustrative
  currency stack are decorative (the message text carries their meaning).
- address type: the row and its chevron triggered the same picker; only the row
  is exposed now, named by address_type.
- address type selector: More Options exposes its expanded state, each option
  row reports selected + inMutuallyExclusiveGroup (its checkbox is excluded so
  the state is announced once), and the collapsed options are unreachable.
- label modal quick-label chips are buttons.
- addresses page: rows are buttons reporting selection, with the long-press
  actions (set label, hide/unhide, info) also exposed as custom semantics
  actions; the checkmark is decorative; the search field keeps a name once it
  has text; show-hidden-addresses is a button.
- currency picker: search field, clear button, currency rows, chain chips and
  network rows get names, roles and selection state; icons and chevrons are
  decorative.

No visual or pointer behaviour changes.

* Drop single-use locals to keep the diff minimal

* Address review: replace deprecated copy announcements with semantic state
This commit is contained in:
Seth For Privacy
2026-08-05 09:16:58 +02:00
committed by GitHub
parent 061f36a6b8
commit 930397cbe6
18 changed files with 938 additions and 691 deletions
+4
View File
@@ -557,6 +557,7 @@
"incorrect_seed": "The text entered is not valid.",
"incorrect_seed_option": "Incorrect. Please try again",
"incorrect_seed_option_back": "Incorrect. Please make sure your seed is saved correctly and try again.",
"info": "Info",
"infobox_auto_address": "Your receive address will rotate every time you receive a transaction",
"infobox_multichain": "Use this address to receive any token or collectible on",
"infobox_rotation": "Your receive address will rotate every time you close and reopen this screen",
@@ -623,6 +624,7 @@
"long_press_edit_address": "Long press to edit address",
"long_press_hide_balance": "Long press card to hide balance",
"long_press_show_balance": "Long press card to show balance",
"long_press_to_copy": "Long press to copy",
"low_fee": "Low fee",
"low_fee_alert": "You currently are using a low network fee priority. This could cause long waits, different rates, or canceled trades. We recommend setting a higher fee for a better experience.",
"made_easy": "made easy",
@@ -1134,6 +1136,7 @@
"sort_by": "Sort by",
"spend_key_private": "Spend key (private)",
"spend_key_public": "Spend key (public)",
"standard": "Standard",
"starting_tor_proxy": "Starting Tor proxy",
"status": "Status: ",
"step": "Step",
@@ -1211,6 +1214,7 @@
"to_lightning": "to Lightning",
"to_on_chain": "to on-chain",
"today": "Today",
"token": "Token",
"token_already_exists": "Token already exists",
"token_decimal": "Token decimal (eg: 6 for USDT)",
"token_name": "Token name (eg: Tether)",