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

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

Issue 2507063007: Use aria range values for sliders (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6981549d8859b56bdcdbdb8cd41124d79f371459..8c7cf1b81b46e65fef29b652ee4b93f98bdd2718 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -527,7 +527,11 @@ Output.RULES = {
speak: '$descendants $state'
},
slider: {
dmazzoni 2016/11/17 23:07:41 You should expose range value attributes for these
David Tseng 2017/01/20 22:18:05 It would be, but it also prevents us from fine-tun
- speak: '$earcon(SLIDER) @describe_slider($value, $name) $description ' +
+ speak:
+ '$if($valueForRange, $valueForRange) ' +
dmazzoni 2016/11/17 23:07:41 I think $value is almost always better because it
David Tseng 2017/01/20 22:18:05 ok, done.
+ '$if($minValueForRange, @aria_value_min($minValueForRange)) ' +
+ '$if($maxValueForRange, @aria_value_max($maxValueForRange)) ' +
+ '$earcon(SLIDER) @describe_slider($value, $name) $description ' +
'$state'
},
staticText: {
@@ -1069,6 +1073,12 @@ Output.prototype = {
if (earcon)
options.annotation.push(earcon);
this.append_(buff, node.name, options);
+ } else if (token == 'description') {
+ if (node.name == node.description)
+ return;
+
+ options.annotation.push(token);
+ this.append_(buff, node.description, options);
} else if (token == 'urlFilename') {
options.annotation.push('name');
var url = node.url;
@@ -1260,7 +1270,7 @@ Output.prototype = {
if (token == 'if') {
var cond = tree.firstChild;
var attrib = cond.value.slice(1);
- if (node[attrib] || node.state[attrib])
+ if (node[attrib] !== undefined || node.state[attrib])
this.format_(node, cond.nextSibling, buff);
else
this.format_(node, cond.nextSibling.nextSibling, buff);
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698