未验证 提交 e76089a4 编写于 作者: G Greg Spencer 提交者: GitHub

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.
上级 87177de4
...@@ -737,7 +737,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { ...@@ -737,7 +737,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider {
result.setChecked(semanticsNode.hasFlag(Flag.IS_TOGGLED)); result.setChecked(semanticsNode.hasFlag(Flag.IS_TOGGLED));
result.setClassName("android.widget.Switch"); result.setClassName("android.widget.Switch");
result.setContentDescription(semanticsNode.getValueLabelHint()); result.setContentDescription(semanticsNode.getValueLabelHint());
} else { } else if (!semanticsNode.hasFlag(Flag.SCOPES_ROUTE)) {
// Setting the text directly instead of the content description // Setting the text directly instead of the content description
// will replace the "checked" or "not-checked" label. // will replace the "checked" or "not-checked" label.
result.setText(semanticsNode.getValueLabelHint()); result.setText(semanticsNode.getValueLabelHint());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册