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

Unified Diff: chrome/browser/resources/chromeos/chromevox/common/aria_util.js

Issue 1306773003: Make earcon ids strings instead of numbers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_unused_earcons
Patch Set: Fixed test Created 5 years, 4 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/common/aria_util.js
diff --git a/chrome/browser/resources/chromeos/chromevox/common/aria_util.js b/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
index c1b7dc3e09427b0fe3afceed190f6112cd6386f6..7018b3d3f8b21539dd895fe4422563299835918b 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
@@ -905,7 +905,7 @@ cvox.AriaUtil.isGrid = function(node) {
* Returns the id of an earcon to play along with the description for a node.
*
* @param {Node} node The node to get the earcon for.
- * @return {number?} The earcon id, or null if none applies.
+ * @return {cvox.Earcon?} The earcon id, or null if none applies.
*/
cvox.AriaUtil.getEarcon = function(node) {
if (!node || !node.getAttribute) {
@@ -914,26 +914,26 @@ cvox.AriaUtil.getEarcon = function(node) {
var role = cvox.AriaUtil.getRoleAttribute(node);
switch (role) {
case 'button':
- return cvox.AbstractEarcons.BUTTON;
+ return cvox.Earcon.BUTTON;
case 'checkbox':
case 'radio':
case 'menuitemcheckbox':
case 'menuitemradio':
var checked = node.getAttribute('aria-checked');
if (checked == 'true') {
- return cvox.AbstractEarcons.CHECK_ON;
+ return cvox.Earcon.CHECK_ON;
} else {
- return cvox.AbstractEarcons.CHECK_OFF;
+ return cvox.Earcon.CHECK_OFF;
}
case 'combobox':
case 'listbox':
- return cvox.AbstractEarcons.LISTBOX;
+ return cvox.Earcon.LISTBOX;
case 'textbox':
- return cvox.AbstractEarcons.EDITABLE_TEXT;
+ return cvox.Earcon.EDITABLE_TEXT;
case 'listitem':
- return cvox.AbstractEarcons.BULLET;
+ return cvox.Earcon.BULLET;
case 'link':
- return cvox.AbstractEarcons.LINK;
+ return cvox.Earcon.LINK;
}
return null;

Powered by Google App Engine
This is Rietveld 408576698