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 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); |