Commit e5a24f4b authored by David Tseng's avatar David Tseng Committed by Commit Bot

Plumb through isImportantForAccessibility==false as ax::mojom::Role::kIgnored

In Android, accessibility services can respect the |isImportantForAccessibility| property.

Chrome-side, this best matches the concept of an ignored role.

In particular, this means, during linear navigation, a service should ignored this node while looking for the next directed node to visit.

Note that this should have no impact on descendants, unless, of course, they also have isImportantForAccessibility set to false.

Bug: 889074
Change-Id: I33ace3fc1e88450a9d2ce3798bd92feed2e08a19
Reviewed-on: https://chromium-review.googlesource.com/1243486Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594130}
parent 61e34c2a
...@@ -632,6 +632,11 @@ void AXTreeSourceArc::PopulateAXRole(AXNodeInfoData* node, ...@@ -632,6 +632,11 @@ void AXTreeSourceArc::PopulateAXRole(AXNodeInfoData* node,
class_name); class_name);
} }
if (!GetProperty(node, AXBooleanProperty::IMPORTANCE)) {
out_data->role = ax::mojom::Role::kIgnored;
return;
}
if (GetProperty(node, AXBooleanProperty::EDITABLE)) { if (GetProperty(node, AXBooleanProperty::EDITABLE)) {
out_data->role = ax::mojom::Role::kTextField; out_data->role = ax::mojom::Role::kTextField;
return; return;
......
...@@ -355,7 +355,7 @@ AutomationPredicate.container = function(node) { ...@@ -355,7 +355,7 @@ AutomationPredicate.container = function(node) {
AutomationPredicate.structuralContainer = AutomationPredicate.roles([ AutomationPredicate.structuralContainer = AutomationPredicate.roles([
Role.ALERT_DIALOG, Role.CLIENT, Role.DIALOG, Role.ROOT_WEB_AREA, Role.ALERT_DIALOG, Role.CLIENT, Role.DIALOG, Role.ROOT_WEB_AREA,
Role.WEB_VIEW, Role.WINDOW, Role.EMBEDDED_OBJECT, Role.IFRAME, Role.WEB_VIEW, Role.WINDOW, Role.EMBEDDED_OBJECT, Role.IFRAME,
Role.IFRAME_PRESENTATIONAL, Role.UNKNOWN Role.IFRAME_PRESENTATIONAL, Role.IGNORED, Role.UNKNOWN
]); ]);
/** /**
......
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