Files
hash-wallet/lib/new-ui
Seth For PrivacyandGitHub 930397cbe6 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
2026-08-05 09:16:58 +02:00
..
2026-03-11 04:26:57 +02:00