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

Unified Diff: chrome/browser/resources/chromeos/chromevox/common/aria_util.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/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 734a5bbc843c88d7f2df28c367d9ce89d7ba2900..09b36bdf1a10b0c087f4871bb154336a56260ee2 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
@@ -31,41 +31,41 @@ cvox.AriaUtil = function() {
* @type {Object<string>}
*/
cvox.AriaUtil.WIDGET_ROLE_TO_NAME = {
- 'alert' : 'aria_role_alert',
- 'alertdialog' : 'aria_role_alertdialog',
- 'button' : 'aria_role_button',
- 'checkbox' : 'aria_role_checkbox',
- 'columnheader' : 'aria_role_columnheader',
- 'combobox' : 'aria_role_combobox',
- 'dialog' : 'aria_role_dialog',
- 'grid' : 'aria_role_grid',
- 'gridcell' : 'aria_role_gridcell',
- 'link' : 'aria_role_link',
- 'listbox' : 'aria_role_listbox',
- 'log' : 'aria_role_log',
- 'marquee' : 'aria_role_marquee',
- 'menu' : 'aria_role_menu',
- 'menubar' : 'aria_role_menubar',
- 'menuitem' : 'aria_role_menuitem',
- 'menuitemcheckbox' : 'aria_role_menuitemcheckbox',
- 'menuitemradio' : 'aria_role_menuitemradio',
- 'option' : 'aria_role_option',
- 'progressbar' : 'aria_role_progressbar',
- 'radio' : 'aria_role_radio',
- 'radiogroup' : 'aria_role_radiogroup',
- 'rowheader' : 'aria_role_rowheader',
- 'scrollbar' : 'aria_role_scrollbar',
- 'slider' : 'aria_role_slider',
- 'spinbutton' : 'aria_role_spinbutton',
- 'status' : 'aria_role_status',
- 'tab' : 'aria_role_tab',
- 'tablist' : 'aria_role_tablist',
- 'tabpanel' : 'aria_role_tabpanel',
- 'textbox' : 'aria_role_textbox',
- 'timer' : 'aria_role_timer',
- 'toolbar' : 'aria_role_toolbar',
- 'tooltip' : 'aria_role_tooltip',
- 'treeitem' : 'aria_role_treeitem'
+ 'alert' : 'role_alert',
+ 'alertdialog' : 'role_alertdialog',
+ 'button' : 'role_button',
+ 'checkbox' : 'role_checkbox',
+ 'columnheader' : 'role_columnheader',
+ 'combobox' : 'role_combobox',
+ 'dialog' : 'role_dialog',
+ 'grid' : 'role_grid',
+ 'gridcell' : 'role_gridcell',
+ 'link' : 'role_link',
+ 'listbox' : 'role_listbox',
+ 'log' : 'role_log',
+ 'marquee' : 'role_marquee',
+ 'menu' : 'role_menu',
+ 'menubar' : 'role_menubar',
+ 'menuitem' : 'role_menuitem',
+ 'menuitemcheckbox' : 'role_menuitemcheckbox',
+ 'menuitemradio' : 'role_menuitemradio',
+ 'option' : 'role_option',
+ 'progressbar' : 'role_progressbar',
+ 'radio' : 'role_radio',
+ 'radiogroup' : 'role_radiogroup',
+ 'rowheader' : 'role_rowheader',
+ 'scrollbar' : 'role_scrollbar',
+ 'slider' : 'role_slider',
+ 'spinbutton' : 'role_spinbutton',
+ 'status' : 'role_status',
+ 'tab' : 'role_tab',
+ 'tablist' : 'role_tablist',
+ 'tabpanel' : 'role_tabpanel',
+ 'textbox' : 'role_textbox',
+ 'timer' : 'role_timer',
+ 'toolbar' : 'role_toolbar',
+ 'tooltip' : 'role_tooltip',
+ 'treeitem' : 'role_treeitem'
};
@@ -76,29 +76,29 @@ cvox.AriaUtil.WIDGET_ROLE_TO_NAME = {
* @type {Object<string>}
*/
cvox.AriaUtil.STRUCTURE_ROLE_TO_NAME = {
- 'article' : 'aria_role_article',
- 'application' : 'aria_role_application',
- 'banner' : 'aria_role_banner',
- 'columnheader' : 'aria_role_columnheader',
- 'complementary' : 'aria_role_complementary',
- 'contentinfo' : 'aria_role_contentinfo',
- 'definition' : 'aria_role_definition',
- 'directory' : 'aria_role_directory',
- 'document' : 'aria_role_document',
- 'form' : 'aria_role_form',
- 'group' : 'aria_role_group',
- 'heading' : 'aria_role_heading',
- 'img' : 'aria_role_img',
- 'list' : 'aria_role_list',
- 'listitem' : 'aria_role_listitem',
- 'main' : 'aria_role_main',
- 'math' : 'aria_role_math',
- 'navigation' : 'aria_role_navigation',
- 'note' : 'aria_role_note',
- 'region' : 'aria_role_region',
- 'rowheader' : 'aria_role_rowheader',
- 'search' : 'aria_role_search',
- 'separator' : 'aria_role_separator'
+ 'article' : 'role_article',
+ 'application' : 'role_application',
+ 'banner' : 'role_banner',
+ 'columnheader' : 'role_columnheader',
+ 'complementary' : 'role_complementary',
+ 'contentinfo' : 'role_contentinfo',
+ 'definition' : 'role_definition',
+ 'directory' : 'role_directory',
+ 'document' : 'role_document',
+ 'form' : 'role_form',
+ 'group' : 'role_group',
+ 'heading' : 'role_heading',
+ 'img' : 'role_img',
+ 'list' : 'role_list',
+ 'listitem' : 'role_listitem',
+ 'main' : 'role_main',
+ 'math' : 'role_math',
+ 'navigation' : 'role_navigation',
+ 'note' : 'role_note',
+ 'region' : 'role_region',
+ 'rowheader' : 'role_rowheader',
+ 'search' : 'role_search',
+ 'separator' : 'role_separator'
};
@@ -299,7 +299,7 @@ cvox.AriaUtil.getRoleNameMsg = function(targetNode) {
// Special case for pop-up buttons.
if (targetNode.getAttribute('aria-haspopup') == 'true' &&
cvox.AriaUtil.isButton(targetNode)) {
- return 'aria_role_popup_button';
+ return 'role_popup_button';
}
if (role) {
@@ -345,7 +345,7 @@ cvox.AriaUtil.getRoleNameMsg = function(targetNode) {
*/
cvox.AriaUtil.getRoleName = function(targetNode) {
var roleMsg = cvox.AriaUtil.getRoleNameMsg(targetNode);
- var roleName = cvox.ChromeVox.msgs.getMsg(roleMsg);
+ var roleName = Msgs.getMsg(roleMsg);
var role = cvox.AriaUtil.getRoleAttribute(targetNode);
if ((role == 'heading') && (targetNode.hasAttribute('aria-level'))) {
roleName += ' ' + targetNode.getAttribute('aria-level');
@@ -541,7 +541,7 @@ cvox.AriaUtil.getGridState_ = function(targetNode, parentControl) {
for (var k = 0; k < gridcells.length; k++) {
if (gridcells[k] == activeDescendant) {
return /** @type {cvox.NodeState} */ (
- [['aria_role_gridcell_pos', j + 1, k + 1]]);
+ [['role_gridcell_pos', j + 1, k + 1]]);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698