Skip to content

a11y: add accessible-navigation fallback button to ConfirmSwiper - #3464

Open
sethforprivacy wants to merge 1 commit into
devfrom
a11y/confirm-swiper
Open

a11y: add accessible-navigation fallback button to ConfirmSwiper#3464
sethforprivacy wants to merge 1 commit into
devfrom
a11y/confirm-swiper

Conversation

@sethforprivacy

Copy link
Copy Markdown
Contributor

Issue Number (if Applicable): Related to #3402, #3406 — Jira CW-1574

Description

Part 2 of the screen-reader accessibility remediation (VoiceOver/TalkBack). This removes the single hardest blocker: ConfirmSwiper — the swipe-to-confirm control gating send, bridge, WalletConnect session approval, and WalletConnect signing — was a bare GestureDetector requiring a horizontal drag. VoiceOver and TalkBack intercept horizontal swipes for navigation, so a screen-reader user could not complete any of those flows at all.

Changes

  • ConfirmSwiper: when MediaQuery.accessibleNavigation is true (i.e., a screen reader is active), it now renders a conventional full-width NewPrimaryButton instead of the swiper — the exact pattern the legacy UI already uses in StandardSlideButton (lib/src/widgets/standard_slide_button_widget.dart). New optional accessibleNavigationModeButtonText names the button; it falls back to swiperText.
  • The swipe branch is behaviorally unchanged for sighted users, but now exposes a single labeled semantics node instead of a label-less gesture area with two decorative child stops.
  • All four call sites pass an operation-specific button label using existing ARB keys only: Send → send, WalletConnect approve → wc_action_approve, bridge and WalletConnect sign → confirm.

Notes for reviewers

  • Bridge uses "Confirm" because no "Bridge" action verb exists in the ARB (only swipe_to_bridge, which would be misleading on a non-swipe button). A future bridge_action key would be a small improvement.
  • wc_signing_request_sheet.dart also uses "Confirm" since its swipe label is chosen dynamically by callers; threading an operation-specific label through would touch more surface than this PR wants to.
  • The new accessible button intentionally has no semantics onTap in the non-accessible branch — activation without the deliberate swipe is only possible when the OS reports accessible navigation, same as the legacy control.

Verification

  • flutter analyze (Flutter 3.41.9, same as CI) — zero new issues vs dev baseline.
  • No new strings; no visual changes outside accessible-navigation mode.
  • Widget tests covering the fallback land in the dedicated test PR at the end of this series.
  • On-device VoiceOver/TalkBack verification pending (see checklist).

Pull Request - Checklist

  • Initial Manual Tests Passed
  • Double check modified code and verify it with the feature/task requirements
  • Format code
  • Look for code duplication
  • Clear naming for variables and methods
  • Manual tests in accessibility mode (TalkBack on Android) passed

VoiceOver and TalkBack intercept horizontal drags, so the drag-only
ConfirmSwiper hard-blocked screen-reader users from confirming a send,
a bridge, a WalletConnect session approval, or a WalletConnect signing
request.

Mirror the existing StandardSlideButton pattern: when
MediaQuery.accessibleNavigation is true, render a NewPrimaryButton
labelled with the new optional accessibleNavigationModeButtonText
(defaulting to swiperText) that invokes onConfirmed directly. The swipe
path is untouched for sighted users, and now announces itself as one
node whose label is swiperText, with the flowing label and arrow knob
excluded so they no longer read as separate stops.

Call sites pass existing localized action labels: send for the send
sheet, wc_action_approve for WalletConnect connection approval, and
confirm for bridging and signing.
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