Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e76089a

Browse files
authored
Stop setting the accessibility text if a node has SCOPES_ROUTE set. (#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.
1 parent 87177de commit e76089a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shell/platform/android/io/flutter/view/AccessibilityBridge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId) {
737737
result.setChecked(semanticsNode.hasFlag(Flag.IS_TOGGLED));
738738
result.setClassName("android.widget.Switch");
739739
result.setContentDescription(semanticsNode.getValueLabelHint());
740-
} else {
740+
} else if (!semanticsNode.hasFlag(Flag.SCOPES_ROUTE)) {
741741
// Setting the text directly instead of the content description
742742
// will replace the "checked" or "not-checked" label.
743743
result.setText(semanticsNode.getValueLabelHint());

0 commit comments

Comments
 (0)