Adds semantics tooltip support#27893
Conversation
9b66963 to
d4155eb
Compare
shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java
Show resolved
Hide resolved
shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java
Show resolved
Hide resolved
shell/platform/android/io/flutter/view/AccessibilityBridge.java
Outdated
Show resolved
Hide resolved
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { | ||
| if (semanticsNode.tooltip != null) { | ||
| content = content != null ? content : ""; | ||
| content = content + "\n" + semanticsNode.tooltip; |
There was a problem hiding this comment.
comment about why a new line and the intended behavior would be appreciated.
Is it possible to test this logic?
| } | ||
| } | ||
|
|
||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { |
There was a problem hiding this comment.
what is the intended behavior below this version? The code in L832 required !semanticsNode.hasFlag(Flag.SCOPES_ROUTE), is it always true in API level < Build.VERSION_CODES.P.
If not, why?
There was a problem hiding this comment.
SCOPES_ROUTE doesn't need content description because it is not a11y focusable. This is already the case before the change.
There was a problem hiding this comment.
and unfortunately, I don't know how to set up test to be run in older API level. It complains about missing binary if i set the config in Robolectric test.
There was a problem hiding this comment.
could we add comments? Sorry, I think this will help the next person trying to contribute :)
Imagine that someone jumps into this code for this first time, and that person is trying to make sense of each case, etc...
shell/platform/android/io/flutter/view/AccessibilityBridge.java
Outdated
Show resolved
Hide resolved
|
The build is failing because it needs a three way transition to roll into flutter, will do that once both engine and framework change is approved @blasten I either replied to the comment or resolved them, PTAL |
| CharSequence content = semanticsNode.getValueLabelHint(); | ||
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { | ||
| if (semanticsNode.tooltip != null) { | ||
| // For backward compatibility, the tooltip is appended |
There was a problem hiding this comment.
backward compatibility with which API level, or with Flutter SDK?
|
@blasten PTAL :) |
|
This pull request is not suitable for automatic merging in its current state.
|
This reverts commit 14e27f9.
This reverts commit 14e27f9.
framework part: flutter/flutter#87684
issue flutter/flutter#86577
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.