Chromium Code Reviews| 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) { |