Skip to content

fix(a11y): label the notification toggles and drop the duplicate label node#80

Open
anilcancakir wants to merge 2 commits into
refactor/account-semantic-tokensfrom
fix/notification-toggle-a11y
Open

fix(a11y): label the notification toggles and drop the duplicate label node#80
anilcancakir wants to merge 2 commits into
refactor/account-semantic-tokensfrom
fix/notification-toggle-a11y

Conversation

@anilcancakir

Copy link
Copy Markdown
Contributor

What

Each notification-preference channel toggle (MSSwitch) had no semanticLabel and sat beside a visible WText of the same channel name. A screen reader announced a bare "switch", and the row exposed TWO Semantics nodes sharing the label, so an accessibility / E2E lookup resolved the inert text first (the tap landed on the label, not the toggle).

Fix

Give the switch semanticLabel: <channel name> and wrap the visible label in ExcludeSemantics, so the row exposes one correctly named toggle with a single stable target.

Notes

Copilot AI review requested due to automatic review settings July 17, 2026 23:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves accessibility and E2E stability for the notification preferences matrix by ensuring each channel toggle exposes a single, correctly named Semantics node (instead of an unlabeled switch plus a duplicate labeled text node).

Changes:

  • Add semanticLabel to each MSSwitch using the visible channel name so screen readers announce a meaningful label.
  • Wrap the visible channel WText in ExcludeSemantics to avoid duplicate Semantics nodes with the same label.
  • Document the fix under [Unreleased] in CHANGELOG.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/src/ui/views/notifications/magic_starter_notification_preferences_view.dart Labels the toggle via semanticLabel and excludes the sibling visible label from semantics to avoid duplicate nodes.
CHANGELOG.md Adds an Unreleased “Fixed” entry describing the notification toggle accessibility improvement.

@anilcancakir
anilcancakir force-pushed the fix/notification-toggle-a11y branch 2 times, most recently from 6a3198d to a206b44 Compare July 18, 2026 00:23
…l node

The per-channel MSSwitch had no semanticLabel, and its channel name lived in a
sibling WText. So the row exposed the toggle with NO accessible name (a screen
reader announced a bare "switch") and, for a label-based lookup, TWO issues:
the label-less switch handle went stale, and once labelled it collided with the
visible WText so a getByLabel / E2E lookup resolved the non-interactive
paragraph first and tapped the label instead of the toggle.

Give the switch its channel name as semanticLabel AND wrap the visible WText in
ExcludeSemantics, so the toggle is the single node carrying that name. This is
the standard 'label the control, exclude the visible copy' pattern (WFormInput
already does it). Verified: a driver tap now flips the toggle.
@anilcancakir
anilcancakir force-pushed the fix/notification-toggle-a11y branch from a206b44 to 7513f91 Compare July 18, 2026 00:39
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.

2 participants