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

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

Issue 1049853002: Support output of heading levels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split
Patch Set: 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 1b509f03daa3a1a090e179932b0ef00868695ffa..f19913fb28a39a92d5448ed93be4b16be93317c1 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -169,8 +169,8 @@ Output.RULES = {
enter: '$name $role'
},
heading: {
- enter: '@aria_role_heading',
- speak: '@aria_role_heading $name='
+ enter: '@tag_h+$hierarchicalLevel',
+ speak: '@tag_h+$hierarchicalLevel $name='
},
inlineTextBox: {
speak: '$value='
@@ -623,6 +623,14 @@ Output.prototype = {
}
}
} else if (prefix == '@') {
+ // Tokens can have substitutions.
+ var pieces = token.split('+');
+ token = pieces.reduce(function(prev, cur) {
+ var lookup = cur;
+ if (cur[0] == '$')
+ lookup = node.attributes[cur.slice(1)];
+ return prev + lookup;
+ }.bind(this), '');
var msgId = token;
var msgArgs = [];
var curMsg = tree.firstChild;

Powered by Google App Engine
This is Rietveld 408576698