test(e2e): add iOS repro for issue #1409 (accessibilityLabel hides text)#3310
Open
proksh wants to merge 1 commit into
Open
test(e2e): add iOS repro for issue #1409 (accessibilityLabel hides text)#3310proksh wants to merge 1 commit into
proksh wants to merge 1 commit into
Conversation
Adds a Flutter screen mirroring React Native's
<Pressable accessibilityLabel="easy-button"><Text>Click me!</Text></Pressable>
pattern via Semantics(container, button, label, excludeSemantics) over a
GestureDetector. On iOS this produces a single accessibility element whose
label is "easy-button" with empty title/value, and the inner Text("Click me!")
is removed from the accessibility tree entirely.
Maestro's Filters.textMatches (Filters.kt) already falls back to
accessibilityText for plain tapOn selectors, so tapOn: "easy-button" already
works on main. The failure this flow guards is the literal #1409 case:
tapOn: "Click me!" - the visible inner text - which iOS has truly hidden.
That string lives in no element's text/label/accessibilityText and cannot be
recovered by IOSDriver.mapViewHierarchy fallbacks (e.g. the one in #3165);
only a screenshot/OCR fallback could.
Tagged failing, ios so the regression suite asserts the failure. Touchable
is positioned top-left (not centered) so a parent-bounds-center tap fallback
would land outside the touchable region.
Heads-up: e2e/run_tests skips demo_app on iOS in CI (documented OOM on GHA),
so verification is local-only today.
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 this adds
A Flutter screen + Maestro flow that reproduces #1409.
Why it fails
When
accessibilityLabelis set on a touchable, iOS replaces its children with that label. So:…looks like this to iOS (and to Maestro): a button labeled
"easy-button". The string"Click me!"only exists as pixels on screen — it's gone from any tree Maestro can read. SotapOn: "Click me!"fails.The flow mirrors this in Flutter and is tagged
failing, iosso the regression suite asserts the failure.Note on PR #3165
The case PR #3165 targets (label == visible text) already works on
main—Filters.textMatchesfalls back toaccessibilityText, which is populated fromelement.label. The literal #1409 case (label ≠ visible text) is harder and can't be fixed by any label-fallback. Only OCR can recover text iOS has truly hidden.How to verify
iOS
demo_appis skipped in CI (documented OOM on GHA), so verify locally:Expected: fails at
Tap on "Click me!"withElement not found: Text matching regex: Click me!. Verified locally on iPhone 16, iOS 18.2.