Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js |
index f054868b831967ccd7c8826b5d814b9260790741..15c561e21183f0c7a925232f8e5ac40462eaf13f 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js |
@@ -168,11 +168,13 @@ AutomationPredicate.leafWithText = function(node) { |
}; |
/** |
- * Non-inline textbox nodes which have an equivalent in the DOM. |
+ * Matches against leaves or static text nodes. Useful when restricting |
+ * traversal to non-inline textboxes while still allowing them if navigation |
+ * already entered into an inline textbox. |
* @param {!AutomationNode} node |
* @return {boolean} |
*/ |
-AutomationPredicate.leafDomNode = function(node) { |
+AutomationPredicate.leafOrStaticText = function(node) { |
return AutomationPredicate.leaf(node) || |
node.role == RoleType.staticText; |
}; |
@@ -187,7 +189,7 @@ AutomationPredicate.leafDomNode = function(node) { |
*/ |
AutomationPredicate.object = function(node) { |
return node.state.focusable || |
- (AutomationPredicate.leafDomNode(node) && |
+ (AutomationPredicate.leafOrStaticText(node) && |
(/\S+/.test(node.name) || |
(node.role != RoleType.lineBreak && |
node.role != RoleType.staticText && |