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

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

Issue 2072503002: Correctly fire active descendant changes for more roles Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 4 years, 6 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/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 c556d59aed984ef9eb3677a760d940927a28bbf3..65b621c7421eb74c01c24148f9172b335b900dad 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -404,7 +404,7 @@ Output.INPUT_TYPE_MESSAGE_IDS_ = {
Output.RULES = {
navigate: {
'default': {
- speak: '$name $value $role $description',
+ speak: '$name $value $activeDescendant $role $description',
braille: ''
},
abstractContainer: {
@@ -464,7 +464,8 @@ Output.RULES = {
},
menu: {
enter: '$name $role',
- speak: '$name $role @@list_with_items($countChildren(menuItem))'
+ speak: '$name $activeDescendant ' +
+ '$role @@list_with_items($countChildren(menuItem))'
},
menuItem: {
speak: '$name $role $if($haspopup, @has_submenu) ' +
@@ -479,7 +480,7 @@ Output.RULES = {
speak: '$descendants'
},
popUpButton: {
- speak: '$value $name $role @aria_has_popup ' +
+ speak: '$value $name $activeDescendant $role @aria_has_popup ' +
'$if($collapsed, @aria_expanded_false, @aria_expanded_true) ' +
'$description'
},
@@ -1042,6 +1043,12 @@ Output.prototype = {
Object.getOwnPropertyNames(node.state).forEach(function(s) {
this.append_(buff, s, options);
}.bind(this));
+ } else if (token == 'activeDescendant') {
+ if (node.activeDescendant) {
+ var prev = opt_prevNode || node.activeDescendant;
+ this.node_(node.activeDescendant, prev,
+ Output.EventType.NAVIGATE, buff);
+ }
} else if (token == 'find') {
// Find takes two arguments: JSON query string and format string.
if (tree.firstChild) {

Powered by Google App Engine
This is Rietveld 408576698