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

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

Issue 1099023005: Implement support for <audio> in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sliders atomic. Created 5 years, 8 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 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('|');
},
/**

Powered by Google App Engine
This is Rietveld 408576698