Fix extra numbers showing up when enabling VoiceControl (#163593)
Fixes https://github.com/flutter/flutter/issues/158477 and https://github.com/flutter/flutter/issues/156368. The excess numbers in both PRs are caused by all `SemanticObjects` returning `YES` for `accessibilityRespondsToUserInteraction`, even if it has no semantic actions. For example, a SemanticObject with just a label has semantic information (the label) but no action. This PR adds a check, ensuring that an `SemanticObjects` has at least one accessible action before returning `YES` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [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 documentation (doc comments with `///`). - [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.
Showing
- engine/src/flutter/lib/ui/semantics/semantics_node.h 8 additions, 3 deletionsengine/src/flutter/lib/ui/semantics/semantics_node.h
- engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm 13 additions, 0 deletions...l/platform/darwin/ios/framework/Source/SemanticsObject.mm
- engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm 156 additions, 0 deletions.../darwin/ios/framework/Source/accessibility_bridge_test.mm
Please register or sign in to comment