fix(a11y): label the notification toggles and drop the duplicate label node#80
Open
anilcancakir wants to merge 2 commits into
Open
fix(a11y): label the notification toggles and drop the duplicate label node#80anilcancakir wants to merge 2 commits into
anilcancakir wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
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
semanticLabelto eachMSSwitchusing the visible channel name so screen readers announce a meaningful label. - Wrap the visible channel
WTextinExcludeSemanticsto avoid duplicate Semantics nodes with the same label. - Document the fix under
[Unreleased]inCHANGELOG.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
force-pushed
the
fix/notification-toggle-a11y
branch
2 times, most recently
from
July 18, 2026 00:23
6a3198d to
a206b44
Compare
…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
force-pushed
the
fix/notification-toggle-a11y
branch
from
July 18, 2026 00:39
a206b44 to
7513f91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Each notification-preference channel toggle (
MSSwitch) had nosemanticLabeland sat beside a visibleWTextof 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 inExcludeSemantics, so the row exposes one correctly named toggle with a single stable target.Notes
lib/src/ui/views/notifications/magic_starter_notification_preferences_view.dart.[Unreleased] > Fixed.refactor/account-semantic-tokens(refactor(ui): map raw gray classes to semantic tokens across account views #79), which touches the same view. GitHub will retarget this tomainonce refactor(ui): map raw gray classes to semantic tokens across account views #79 merges. Review this PR's own diff (the last commit) for the a11y change.