Rename Click to Select in Switch Access (for clarity/accuracy)
Bug: None
Change-Id: Id0f91c829bdad58e3a4fde19b7b36826368fb4bd
Reviewed-on: https://chromium-review.googlesource.com/c/1407599
Commit-Queue: Anastasia Helfinstein <anastasi@google.com>
Reviewed-by: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622276}
diff --git a/chrome/browser/resources/chromeos/switch_access/menu_manager.js b/chrome/browser/resources/chromeos/switch_access/menu_manager.js
index e3cc169f..51bac34 100644
--- a/chrome/browser/resources/chromeos/switch_access/menu_manager.js
+++ b/chrome/browser/resources/chromeos/switch_access/menu_manager.js
@@ -92,7 +92,7 @@
/**
* Move to the next available action in the menu. If this is no next action,
- * select the whole menu to loop again.
+ * focus the whole menu to loop again.
* @return {boolean} Whether this function had any effect.
*/
moveForward() {
@@ -194,7 +194,7 @@
* @private
*/
getActionsForNode_(node) {
- let actions = [MenuManager.Action.CLICK, MenuManager.Action.OPTIONS];
+ let actions = [MenuManager.Action.SELECT, MenuManager.Action.OPTIONS];
if (SwitchAccessPredicate.isTextInput(node))
actions.push(MenuManager.Action.DICTATION);
@@ -231,7 +231,7 @@
onMessageReceived_(event) {
this.exit();
- if (event.data === MenuManager.Action.CLICK)
+ if (event.data === MenuManager.Action.SELECT)
this.navigationManager_.selectCurrentNode();
else if (event.data === MenuManager.Action.DICTATION)
chrome.accessibilityPrivate.toggleDictation();
@@ -268,15 +268,18 @@
* @const
*/
MenuManager.Action = {
- CLICK: 'click',
DICTATION: 'dictation',
+ // This opens the Switch Access settings in a new Chrome tab.
OPTIONS: 'options',
SCROLL_BACKWARD: 'scroll-backward',
SCROLL_DOWN: 'scroll-down',
SCROLL_FORWARD: 'scroll-forward',
SCROLL_LEFT: 'scroll-left',
SCROLL_RIGHT: 'scroll-right',
- SCROLL_UP: 'scroll-up'
+ SCROLL_UP: 'scroll-up',
+ // This either performs the default action or enters a new scope, as
+ // applicable.
+ SELECT: 'select'
};
/**
diff --git a/chrome/browser/resources/chromeos/switch_access/menu_panel.html b/chrome/browser/resources/chromeos/switch_access/menu_panel.html
index 73e5e8f..acf7439 100644
--- a/chrome/browser/resources/chromeos/switch_access/menu_panel.html
+++ b/chrome/browser/resources/chromeos/switch_access/menu_panel.html
@@ -12,9 +12,8 @@
<link rel="stylesheet" href="menu_panel.css">
</head>
<body>
- <div id="switchaccess_menu_actions"
- aria-label="TODO-i18n(Switch Access Action Menu)">
- <button class="action" id="click">Click</button>
+ <div id="switchaccess_menu_actions" aria-label="Switch Access Menu">
+ <button class="action" id="select">Select</button>
<button class="action" id="scroll-down" disabled>Scroll down</button>
<button class="action" id="scroll-up" disabled>Scroll up</button>
<button class="action" id="scroll-right" disabled>Scroll right</button>