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

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: Rebase 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 e14ce4e91e2831a48846073044108f62b1b271cf..45b0f50621d7d20b66a401dc4b9c956dece6b4a4 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -156,7 +156,7 @@ Output.STATE_INFO_ = {
Output.RULES = {
navigate: {
'default': {
- speak: '$name $value $role',
+ speak: '$name $value $description $role',
braille: ''
},
alert: {
@@ -207,7 +207,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 +303,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