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

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

Issue 2433823003: Further refine div output when a div receives focus (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
index f049a6d8fe2610f0392fbf6622a45668bdebad79..bc747ff5a4e69df8d0f5c9ff730dcbfe7ebcb877 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -447,7 +447,7 @@ Output.RULES = {
},
div: {
enter: '$nameFromNode',
- speak: '$name $description $descendants'
+ speak: '$textContent $description'
dmazzoni 2016/10/19 19:56:29 This is similar to nameOrDescendants except that i
},
embeddedObject: {
speak: '$name'
@@ -537,7 +537,7 @@ Output.RULES = {
speak: '$if($name, $name, $docUrl)'
},
region: {
- speak: '$descendants'
+ speak: '$textContent'
},
row: {
enter: '$node(tableRowHeader)'
@@ -1199,6 +1199,14 @@ Output.prototype = {
return;
var related = node[tree.firstChild.value];
this.node_(related, related, Output.EventType.NAVIGATE, buff);
+ } else if (token == 'textContent') {
+ if (node.name) {
+ this.format_(node, '$name', buff);
+ } else {
+ node.findAll({role: RoleType.staticText}).forEach(function(text) {
+ this.node_(text, text, Output.EventType.NAVIGATE, buff);
+ }.bind(this));
+ }
} else if (node[token] !== undefined) {
options.annotation.push(token);
var value = node[token];
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698