Repository navigation
[a11y] Fixes SnackBar showing more Voice Control labels than expected - #194614
Merged
auto-submit[bot] merged 3 commits intoOct 24, 2026
Merged
Conversation
LouiseHsu
marked this pull request as ready for review
October 19, 2026 22:02
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates accessibilityRespondsToUserInteraction in SemanticsObject.mm to return true only if the node contains actions other than system, scroll, or dismiss actions, and adds a corresponding unit test. Feedback on the changes points out a memory leak in the new test where MockAccessibilityBridge is allocated on the heap but never deleted, suggesting allocating it on the stack instead.
LongCatIsLooong
self-requested a review
October 23, 2026 21:54
LongCatIsLooong
approved these changes
Oct 23, 2026
This was referenced Oct 24, 2026
This was referenced Oct 26, 2026
suryaKommana2662
pushed a commit
to suryaKommana2662/flutter
that referenced
this pull request
Oct 29, 2026
…flutter#194614) Fixes flutter#157630 SnackBar incorrectly had an VoiceControl label attributed to it, because SnackBar technically has 3 actions attributed to it - kDismiss, kScrollUp, and kScrollDown. In this PR I exclude kDismiss and kScrollUp/Down/Left/Right from ever receiving VoiceOver labels. - kDismiss: only maps to Escape, not Tap. It's only used in `accessibilityPerformEscape`, which is the VoiceOver 2 finger Z-scrub or verbal "Go back" command. - kScrollUp/Down/Left/Right: Scrollables are rendered as a native UIScrollView, not as an SemanticsObject, so shouldn't receive a VoiceControl label. <img width="814" height="1770" alt="image" src="https://github.com/user-attachments/assets/cdf02512-d947-4473-9549-a280151f25bc" /> ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
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.
Fixes #157630
SnackBar incorrectly had an VoiceControl label attributed to it, because SnackBar technically has 3 actions attributed to it - kDismiss, kScrollUp, and kScrollDown.
In this PR I exclude kDismiss and kScrollUp/Down/Left/Right from ever receiving VoiceOver labels.
accessibilityPerformEscape, which is the VoiceOver 2 finger Z-scrub or verbal "Go back" command.Pre-launch Checklist
///).