Commit 0ac9c0ba authored by David Tseng's avatar David Tseng Committed by Commit Bot

Map focusable state

- some Android apps require focusable nodes have either focus or
  makeVisible actions performed on them for some UI to show up
  (e.g. Assistant)

- ChromeVox, as a result, needs to observe more containers. For
  focusable nodes, ChromeVox will not typically descend into their
  descendants unless the node's role is explicitly known to be a
  container. In Android, this is mostly nodes with role 'list'.

their contents shown Navigate in other apps with many focusable
containers e.g. Play Store. Verify navigation continues into
descendants.

Test: navigate in Assistant. Verify that invisible listItem nodes have
Bug: 788650
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I3a6b512b3d133f6bae9e89dd11488229c0fe4660
Reviewed-on: https://chromium-review.googlesource.com/792098Reviewed-by: default avatarYuki Awano <yawano@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519813}
parent 235cb69f
...@@ -253,9 +253,8 @@ void PopulateAXState(arc::mojom::AccessibilityNodeInfoData* node, ...@@ -253,9 +253,8 @@ void PopulateAXState(arc::mojom::AccessibilityNodeInfoData* node,
// These mappings were taken from accessibility utils (Android -> Chrome) and // These mappings were taken from accessibility utils (Android -> Chrome) and
// BrowserAccessibilityAndroid. They do not completely match the above two // BrowserAccessibilityAndroid. They do not completely match the above two
// sources. // sources.
// The FOCUSABLE state is not mapped because Android places focusability on
// many ancestor nodes.
MAP_STATE(AXBooleanProperty::EDITABLE, ui::AX_STATE_EDITABLE); MAP_STATE(AXBooleanProperty::EDITABLE, ui::AX_STATE_EDITABLE);
MAP_STATE(AXBooleanProperty::FOCUSABLE, ui::AX_STATE_FOCUSABLE);
MAP_STATE(AXBooleanProperty::MULTI_LINE, ui::AX_STATE_MULTILINE); MAP_STATE(AXBooleanProperty::MULTI_LINE, ui::AX_STATE_MULTILINE);
MAP_STATE(AXBooleanProperty::PASSWORD, ui::AX_STATE_PROTECTED); MAP_STATE(AXBooleanProperty::PASSWORD, ui::AX_STATE_PROTECTED);
MAP_STATE(AXBooleanProperty::SELECTED, ui::AX_STATE_SELECTED); MAP_STATE(AXBooleanProperty::SELECTED, ui::AX_STATE_SELECTED);
......
...@@ -265,8 +265,8 @@ AutomationPredicate.linebreak = function(first, second) { ...@@ -265,8 +265,8 @@ AutomationPredicate.linebreak = function(first, second) {
AutomationPredicate.container = function(node) { AutomationPredicate.container = function(node) {
return AutomationPredicate.match({ return AutomationPredicate.match({
anyRole: [ anyRole: [
Role.GENERIC_CONTAINER, Role.DOCUMENT, Role.GROUP, Role.LIST_ITEM, Role.GENERIC_CONTAINER, Role.DOCUMENT, Role.GROUP, Role.LIST,
Role.TOOLBAR, Role.WINDOW Role.LIST_ITEM, Role.TOOLBAR, Role.WINDOW
], ],
anyPredicate: [ anyPredicate: [
AutomationPredicate.landmark, AutomationPredicate.structuralContainer, AutomationPredicate.landmark, AutomationPredicate.structuralContainer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment