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 f19913fb28a39a92d5448ed93be4b16be93317c1..0b6ce577a9d1ec167f0e307249fcb958e40cb7d3 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js |
@@ -162,6 +162,9 @@ Output.RULES = { |
alert: { |
speak: '!doNotInterrupt $role $descendants' |
}, |
+ button: { |
+ speak: '$name $value $description $role', |
dmazzoni
2015/04/24 13:41:08
As suggested in the other CL, how about:
$name $d
|
+ }, |
checkBox: { |
speak: '$name $role $checked' |
}, |
@@ -207,7 +210,7 @@ Output.RULES = { |
'@describe_radio_unselected($name))' |
}, |
slider: { |
- speak: '@describe_slider($value, $name)' |
+ speak: '@describe_slider($value, $name) $help' |
}, |
staticText: { |
speak: '$value $name' |
@@ -303,13 +306,26 @@ Output.EventType = { |
Output.prototype = { |
/** |
* Gets the output buffer for speech. |
+ * @param {string=} opt_separator Used to join components of the output. |
* @return {!cvox.Spannable} |
*/ |
- toSpannable: function() { |
+ toSpannable: function(opt_separator) { |
+ opt_separator = opt_separator || ''; |
return this.buffer_.reduce(function(prev, cur) { |
+ if (prev === null) |
+ return cur; |
+ prev.append(opt_separator); |
prev.append(cur); |
return prev; |
- }, new cvox.Spannable()); |
+ }, null); |
+ }, |
+ |
+ /** |
+ * Gets the output buffer for speech with separator '|'. |
+ * @return {!cvox.Spannable} |
+ */ |
+ toSpannableForTest: function() { |
+ return this.toSpannable('|'); |
}, |
/** |