Stop setting the accessibility text if a node has SCOPES_ROUTE set. (flutter/engine#12730)
This keeps us from setting the text on a node if it is a SCOPES_ROUTE node, and sends the "TYPE_VIEW_FOCUSED" event when we update the semantics information and a view has the input focus.
This commit is contained in:
@@ -737,7 +737,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider {
|
||||
result.setChecked(semanticsNode.hasFlag(Flag.IS_TOGGLED));
|
||||
result.setClassName("android.widget.Switch");
|
||||
result.setContentDescription(semanticsNode.getValueLabelHint());
|
||||
} else {
|
||||
} else if (!semanticsNode.hasFlag(Flag.SCOPES_ROUTE)) {
|
||||
// Setting the text directly instead of the content description
|
||||
// will replace the "checked" or "not-checked" label.
|
||||
result.setText(semanticsNode.getValueLabelHint());
|
||||
|
||||
Reference in New Issue
Block a user