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

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

Issue 1362223003: Improve braille related message descriptions and clean up message handling in Chromevox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputtypeexception
Patch Set: Move another braille message to Msgs.Untranslated Created 5 years, 3 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 7c9ee8e6c40c1c52f44345412a7ffd33de1c0220..677030882eab8fc0ff4b4a6acdeaf4375eca2406 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -92,51 +92,51 @@ Output.SPACE = ' ';
*/
Output.ROLE_INFO_ = {
alert: {
- msgId: 'aria_role_alert',
+ msgId: 'role_alert',
earconId: 'ALERT_NONMODAL',
},
alertDialog: {
- msgId: 'aria_role_alertdialog'
+ msgId: 'role_alertdialog'
},
article: {
- msgId: 'aria_role_article',
+ msgId: 'role_article',
inherits: 'abstractContainer'
},
application: {
- msgId: 'aria_role_application',
+ msgId: 'role_application',
inherits: 'abstractContainer'
},
banner: {
- msgId: 'aria_role_banner',
+ msgId: 'role_banner',
inherits: 'abstractContainer'
},
button: {
- msgId: 'tag_button',
+ msgId: 'role_button',
earconId: 'BUTTON'
},
buttonDropDown: {
- msgId: 'tag_button',
+ msgId: 'role_button',
earconId: 'BUTTON'
},
cell: {
- msgId: 'aria_role_gridcell'
+ msgId: 'role_gridcell'
},
checkBox: {
- msgId: 'input_type_checkbox'
+ msgId: 'role_checkbox'
},
columnHeader: {
- msgId: 'aria_role_columnheader',
+ msgId: 'role_columnheader',
inherits: 'abstractContainer'
},
comboBox: {
- msgId: 'aria_role_combobox'
+ msgId: 'role_combobox'
},
complementary: {
- msgId: 'aria_role_complementary',
+ msgId: 'role_complementary',
inherits: 'abstractContainer'
},
contentInfo: {
- msgId: 'aria_role_contentinfo',
+ msgId: 'role_contentinfo',
inherits: 'abstractContainer'
},
date: {
@@ -144,143 +144,143 @@ Output.ROLE_INFO_ = {
inherits: 'abstractContainer'
},
definition: {
- msgId: 'aria_role_definition',
+ msgId: 'role_definition',
inherits: 'abstractContainer'
},
dialog: {
- msgId: 'dialog'
+ msgId: 'role_dialog'
},
directory: {
- msgId: 'aria_role_directory',
+ msgId: 'role_directory',
inherits: 'abstractContainer'
},
document: {
- msgId: 'aria_role_document',
+ msgId: 'role_document',
inherits: 'abstractContainer'
},
form: {
- msgId: 'aria_role_form',
+ msgId: 'role_form',
inherits: 'abstractContainer'
},
grid: {
- msgId: 'aria_role_grid'
+ msgId: 'role_grid'
},
group: {
- msgId: 'aria_role_group'
+ msgId: 'role_group'
},
heading: {
- msgId: 'aria_role_heading',
+ msgId: 'role_heading',
},
image: {
- msgId: 'aria_role_img',
+ msgId: 'role_img',
},
inputTime: {
msgId: 'input_type_time',
inherits: 'abstractContainer'
},
link: {
- msgId: 'tag_link',
+ msgId: 'role_link',
earconId: 'LINK'
},
listBox: {
- msgId: 'aria_role_listbox',
+ msgId: 'role_listbox',
earconId: 'LISTBOX'
},
listBoxOption: {
- msgId: 'aria_role_listitem',
+ msgId: 'role_listitem',
earconId: 'LIST_ITEM'
},
listItem: {
- msgId: 'aria_role_listitem',
+ msgId: 'role_listitem',
earconId: 'LIST_ITEM'
},
log: {
- msgId: 'aria_role_log',
+ msgId: 'role_log',
},
main: {
- msgId: 'aria_role_main',
+ msgId: 'role_main',
inherits: 'abstractContainer'
},
marquee: {
- msgId: 'aria_role_marquee',
+ msgId: 'role_marquee',
},
math: {
- msgId: 'aria_role_math',
+ msgId: 'role_math',
inherits: 'abstractContainer'
},
menu: {
- msgId: 'aria_role_menu'
+ msgId: 'role_menu'
},
menuBar: {
- msgId: 'aria_role_menubar',
+ msgId: 'role_menubar',
},
menuItem: {
- msgId: 'aria_role_menuitem'
+ msgId: 'role_menuitem'
},
menuItemCheckBox: {
- msgId: 'aria_role_menuitemcheckbox'
+ msgId: 'role_menuitemcheckbox'
},
menuItemRadio: {
- msgId: 'aria_role_menuitemradio'
+ msgId: 'role_menuitemradio'
},
menuListOption: {
- msgId: 'aria_role_menuitem'
+ msgId: 'role_menuitem'
},
menuListPopup: {
- msgId: 'aria_role_menu'
+ msgId: 'role_menu'
},
navigation: {
- msgId: 'aria_role_navigation',
+ msgId: 'role_navigation',
inherits: 'abstractContainer'
},
note: {
- msgId: 'aria_role_note',
+ msgId: 'role_note',
inherits: 'abstractContainer'
},
popUpButton: {
- msgId: 'tag_button',
+ msgId: 'role_button',
earcon: 'LISTBOX'
},
radioButton: {
- msgId: 'input_type_radio'
+ msgId: 'role_radio'
},
radioGroup: {
- msgId: 'aria_role_radiogroup',
+ msgId: 'role_radiogroup',
},
region: {
- msgId: 'aria_role_region',
+ msgId: 'role_region',
inherits: 'abstractContainer'
},
rowHeader: {
- msgId: 'aria_role_rowheader',
+ msgId: 'role_rowheader',
inherits: 'abstractContainer'
},
scrollBar: {
- msgId: 'aria_role_scrollbar',
+ msgId: 'role_scrollbar',
},
search: {
- msgId: 'aria_role_search',
+ msgId: 'role_search',
inherits: 'abstractContainer'
},
separator: {
- msgId: 'aria_role_separator',
+ msgId: 'role_separator',
inherits: 'abstractContainer'
},
spinButton: {
- msgId: 'aria_role_spinbutton',
+ msgId: 'role_spinbutton',
earconId: 'LISTBOX'
},
status: {
- msgId: 'aria_role_status'
+ msgId: 'role_status'
},
tab: {
- msgId: 'aria_role_tab'
+ msgId: 'role_tab'
},
tabList: {
- msgId: 'aria_role_tablist'
+ msgId: 'role_tablist'
},
tabPanel: {
- msgId: 'aria_role_tabpanel'
+ msgId: 'role_tabpanel'
},
textBox: {
msgId: 'input_type_text',
@@ -295,16 +295,16 @@ Output.ROLE_INFO_ = {
inherits: 'abstractContainer'
},
timer: {
- msgId: 'aria_role_timer'
+ msgId: 'role_timer'
},
toolbar: {
- msgId: 'aria_role_toolbar'
+ msgId: 'role_toolbar'
},
tree: {
- msgId: 'aria_role_tree'
+ msgId: 'role_tree'
},
treeItem: {
- msgId: 'aria_role_treeitem'
+ msgId: 'role_treeitem'
}
};
@@ -363,11 +363,10 @@ Output.STATE_INFO_ = {
*/
Output.INPUT_TYPE_MESSAGE_IDS_ = {
'email': 'input_type_email',
- 'file': 'input_type_file',
'number': 'input_type_number',
'password': 'input_type_password',
'search': 'input_type_search',
- 'tel': 'input_type_tel',
+ 'tel': 'input_type_number',
'text': 'input_type_text',
'url': 'input_type_url',
};
@@ -440,7 +439,7 @@ Output.RULES = {
'@describe_index($indexInParent, $parentChildCount)'
},
menuListOption: {
- speak: '$name $value @aria_role_menuitem ' +
+ speak: '$name $value @role_menuitem ' +
'@describe_index($indexInParent, $parentChildCount)'
},
paragraph: {
@@ -513,7 +512,7 @@ Output.RULES = {
alert: {
default: {
speak: '!doNotInterrupt ' +
- '@aria_role_alert $name $earcon(ALERT_NONMODAL) $descendants'
+ '@role_alert $name $earcon(ALERT_NONMODAL) $descendants'
}
}
};
@@ -895,9 +894,9 @@ Output.prototype = {
var info = Output.ROLE_INFO_[node.role];
if (info) {
if (this.formatOptions_.braille)
- msg = cvox.ChromeVox.msgs.getMsg(info.msgId + '_brl');
+ msg = Msgs.getMsg(info.msgId + '_brl');
else
- msg = cvox.ChromeVox.msgs.getMsg(info.msgId);
+ msg = Msgs.getMsg(info.msgId);
} else {
console.error('Missing role info for ' + node.role);
}
@@ -910,7 +909,7 @@ Output.prototype = {
'input_type_text';
if (this.formatOptions_.braille)
msgId = msgId + '_brl';
- this.append_(buff, cvox.ChromeVox.msgs.getMsg(msgId), options);
+ this.append_(buff, Msgs.getMsg(msgId), options);
} else if (token == 'tableRowIndex' ||
token == 'tableCellColumnIndex') {
var value = node[token];
@@ -942,7 +941,7 @@ Output.prototype = {
var msgId =
this.formatOptions_.braille ? resolvedInfo.msgId + '_brl' :
resolvedInfo.msgId;
- var msg = cvox.ChromeVox.msgs.getMsg(msgId);
+ var msg = Msgs.getMsg(msgId);
this.append_(buff, msg, options);
} else if (tree.firstChild) {
// Custom functions.
@@ -999,10 +998,10 @@ Output.prototype = {
curArg = curArg.nextSibling;
}
}
- var msg = cvox.ChromeVox.msgs.getMsg(msgId, msgArgs);
+ var msg = Msgs.getMsg(msgId, msgArgs);
try {
if (this.formatOptions_.braille)
- msg = cvox.ChromeVox.msgs.getMsg(msgId + '_brl', msgArgs) || msg;
+ msg = Msgs.getMsg(msgId + '_brl', msgArgs) || msg;
} catch(e) {}
if (!msg) {

Powered by Google App Engine
This is Rietveld 408576698