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

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: 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..3c411fdb5cca7e53f1fb5fec00c9b4acadd50d70 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -230,8 +230,7 @@ Output.ROLE_INFO_ = {
msgId: 'role_menubar',
},
menuItem: {
- msgId: 'role_menuitem',
- earconId: 'BUTTON'
dmazzoni 2016/06/15 19:15:06 This looks like part of a previous patch?
+ msgId: 'role_menuitem'
},
menuItemCheckBox: {
msgId: 'role_menuitemcheckbox',
@@ -404,7 +403,7 @@ Output.INPUT_TYPE_MESSAGE_IDS_ = {
Output.RULES = {
navigate: {
'default': {
- speak: '$name $value $role $description',
+ speak: '$name $value $activeDescendant $role $description',
braille: ''
},
abstractContainer: {
@@ -464,13 +463,18 @@ 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) ' +
'@describe_index($indexInParent, $parentChildCount) ' +
'$description'
},
+ menuItemCheckBox: {
+ speak: '$if($checked, $earcon(CHECK_ON), $earcon(CHECK_OFF)) ' +
+ '$name $role $checked $description'
+ },
menuListOption: {
speak: '$name @role_menuitem ' +
'@describe_index($indexInParent, $parentChildCount) $description'
@@ -479,7 +483,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 +1046,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