From 63258e472e42ddb8f00702a92215c9504fcaabad Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Wed, 2 Oct 2019 10:35:28 -0700 Subject: [PATCH] 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. --- .../platform/android/io/flutter/view/AccessibilityBridge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java index 8303a9e11e..c542da80f1 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -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());