Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2225)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js

Issue 816093002: Support alert nodes by introducing $descendant and !ttsProps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Simplify Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c14c6a92245c8b811bbc82985f75e4d9c37c3f15..3e6fe190fc10822c5f1432f83c733bacbed0718c 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -55,9 +55,11 @@ AutomationPredicate.link =
* @return {boolean}
*/
AutomationPredicate.leaf = function(node) {
- return !node.firstChild || node.children.every(function(n) {
- return n.state.invisible;
- });
+ return !node.firstChild ||
+ node.role == chrome.automation.RoleType.button ||
+ node.children.every(function(n) {
+ return n.state.invisible;
+ });
};
/**

Powered by Google App Engine
This is Rietveld 408576698