a11y: decorative/meaningful image semantics, labeled icon buttons, audible addresses - #3465
a11y: decorative/meaningful image semantics, labeled icon buttons, audible addresses#3465sethforprivacy wants to merge 3 commits into
Conversation
CakeImageWidget gains an optional semanticsLabel that is honoured in all four
render branches (precompiled asset SVG, asset raster, network SVG, network
raster). It defaults to null, which now means "decorative": the image is fully
excluded from the semantics tree instead of producing an unnamed node. The
built-in loading spinner and the error placeholder are likewise excluded so they
cannot become unnamed focus stops, while a caller-supplied errorWidget keeps its
own semantics (several call sites render the asset's initials there).
TokenImageWidget passes the same label through, decorative by default.
FloatingIconButton now requires a localized semanticLabel and exposes exactly
one button node; all six call sites are migrated to the existing paste /
scan_qr_code / address_book keys.
RoundedCheckbox exposes its checked/unchecked state (previously the unchecked
case rendered nothing at all, making selection invisible). It merges into the
enclosing row rather than adding a focus stop, and takes an excludeFromSemantics
escape hatch for rows that already announce their own selection.
The receive QR block becomes a single labelled button carrying the existing
qr_fullscreen hint; QrImage's matrix, embedded logo and badge are excluded, and
the payjoin badge reads as one node and drops out of the tree while hidden.
AddressFormatter announces the full untruncated address instead of the
four-character chunks ("pseudo-words") and the literal "...", so an address can
be verified by ear.
|
Heads-up from the test PR (#3469): the |
| // The QR matrix, the embedded logo and its badge are all purely visual: the | ||
| // data they encode is announced by the labelled control hosting this widget, | ||
| // so nothing in here should become a focus stop of its own. | ||
| return ExcludeSemantics( |
There was a problem hiding this comment.
we shouldn't exclude semantics here, we should still say that there is a qr here (which is already handled in the QR package, and also because tapping it opens the full screen, so the user should know that there is a QR on this screen
Issue Number (if Applicable): Related to #3402, #3406 — Jira CW-1574
Description
Part 3 of the screen-reader accessibility remediation (VoiceOver/TalkBack): image and compact-icon primitives.
Changes
CakeImageWidget(186 call sites): new optionalsemanticsLabel, honored in all four render branches (precompiled vector asset, raster asset, network SVG, network raster).null— the default — now means genuinely decorative: the image contributes no accessibility node instead of an unnamedimagenode. Built-in loading spinners and the error placeholder no longer create unlabeled focus stops; caller-suppliederrorWidgets keep their own semantics (several call sites render meaningful initials there).FloatingIconButton: new requiredsemanticLabel, exposed as one labeled button node. All 6 call sites migrated (paste ×4, scan QR, address book) using existing ARB keys.RoundedCheckbox: previously the unchecked state renderedOffstage()— selection state was completely invisible to screen readers. It now always exposeschecked:state (no visual change), with anexcludeFromSemanticsescape hatch for rows that announce their own selection (used by the receive address-type list PR in this series).qr_fullscreenkey), with the QR matrix, embedded logo, badge and wordmark excluded; the payjoin badge merges icon+text into one node.AddressFormatter: both segmented-addressRichTextbuilders now carry the full address as their semantics label, so screen readers read the actual address instead of 4-character pseudo-words ("beesh onekay…") or "dot dot dot" for the truncation ellipsis. This is the security-critical fix that makes destination-address verification by ear possible.qr_code_receive_address.Notes for reviewers
Verification
flutter analyze(Flutter 3.41.9, same as CI) — zero new issues vsdevbaseline. flutter_svg 2.2.x API names verified against the resolved package.ValueKeys preserved.Pull Request - Checklist