From 4cc18b2df46723c32901c2efce0b08b60ea94417 Mon Sep 17 00:00:00 2001 From: Anastasia Helfinstein Date: Tue, 12 Nov 2019 18:22:00 +0000 Subject: [PATCH] Standardize capitalization of Switch Access in the code base Bug: 995052 Change-Id: If782994602e0b1b9d7b723be9417549b0eda125e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1902234 Reviewed-by: Alice Boxhall Reviewed-by: Scott Violet Reviewed-by: Ben Wells Reviewed-by: Steven Holte Commit-Queue: Anastasia Helfinstein Cr-Commit-Position: refs/heads/master@{#714554} --- ash/ash_strings.grd | 2 +- ash/public/cpp/ash_pref_names.cc | 4 ++-- chrome/app/settings_strings.grdp | 6 +++--- .../chromeos/accessibility/accessibility_manager.cc | 4 ++-- .../chromeos/accessibility/accessibility_manager.h | 4 ++-- chrome/browser/chromeos/extensions/info_private_api.cc | 2 +- .../resources/chromeos/switch_access/menu_panel.js | 2 +- .../resources/chromeos/switch_access/switch_access.js | 2 -- chrome/common/extensions/api/accessibility_features.json | 2 +- chrome/common/extensions/extension_constants.h | 4 ++-- docs/accessibility/overview.md | 2 +- tools/metrics/actions/actions.xml | 8 ++++---- tools/metrics/ukm/ukm.xml | 2 +- ui/accessibility/accessibility_switches.h | 2 +- 14 files changed, 22 insertions(+), 24 deletions(-) diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index 098583c857e359..47be772312ddcc 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd @@ -570,7 +570,7 @@ This file contains the strings for ash. On-screen keyboard - + Switch Access diff --git a/ash/public/cpp/ash_pref_names.cc b/ash/public/cpp/ash_pref_names.cc index c9b44430b37393..df29324a639e76 100644 --- a/ash/public/cpp/ash_pref_names.cc +++ b/ash/public/cpp/ash_pref_names.cc @@ -80,7 +80,7 @@ const char kAccessibilityFocusHighlightEnabled[] = // A boolean pref which determines whether select-to-speak is enabled. const char kAccessibilitySelectToSpeakEnabled[] = "settings.a11y.select_to_speak"; -// A boolean pref which determines whether switch access is enabled. +// A boolean pref which determines whether Switch Access is enabled. const char kAccessibilitySwitchAccessEnabled[] = "settings.a11y.switch_access.enabled"; // A pref that stores the key code for the "select" action. @@ -102,7 +102,7 @@ const char kAccessibilitySwitchAccessPreviousKeyCodes[] = const char kAccessibilitySwitchAccessPreviousSetting[] = "settings.a11y.switch_access.previous.setting"; // A boolean pref which determines whether auto-scanning is enabled within -// switch access. +// Switch Access. const char kAccessibilitySwitchAccessAutoScanEnabled[] = "settings.a11y.switch_access.auto_scan.enabled"; // An integer pref which determines time delay in ms before automatically diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index 52132eda107b62..2bfe1991387ade 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp @@ -511,11 +511,11 @@ Open select-to-speak settings - - Switch access (control the computer with just one or two switches) + + Switch Access (control the computer with just one or two switches) - Switch access options + Switch Access options Text-to-Speech diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc index 7c4418176a7e9d..a811a55f7d3c79 100644 --- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc +++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc @@ -919,8 +919,8 @@ void AccessibilityManager::OnSwitchAccessChanged() { if (!command_line->HasSwitch( ::switches::kEnableExperimentalAccessibilitySwitchAccess)) { if (enabled) { - LOG(WARNING) << "Switch access enabled but experimental accessibility " - << "switch access flag is not set."; + LOG(WARNING) << "Switch Access enabled but experimental accessibility " + << "Switch Access flag is not set."; } return; } diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.h b/chrome/browser/chromeos/accessibility/accessibility_manager.h index 23d91d6bd83ea9..dc8850d605cb8f 100644 --- a/chrome/browser/chromeos/accessibility/accessibility_manager.h +++ b/chrome/browser/chromeos/accessibility/accessibility_manager.h @@ -214,10 +214,10 @@ class AccessibilityManager // Called when the Select-to-Speak extension state has changed. void OnSelectToSpeakStateChanged(ash::SelectToSpeakState state); - // Invoked to enable or disable switch access. + // Invoked to enable or disable Switch Access. void SetSwitchAccessEnabled(bool enabled); - // Returns if switch access is enabled. + // Returns if Switch Access is enabled. bool IsSwitchAccessEnabled() const; // Returns true if a braille display is connected to the system, otherwise diff --git a/chrome/browser/chromeos/extensions/info_private_api.cc b/chrome/browser/chromeos/extensions/info_private_api.cc index 0aaf258ac25d9b..421770c731c9c7 100644 --- a/chrome/browser/chromeos/extensions/info_private_api.cc +++ b/chrome/browser/chromeos/extensions/info_private_api.cc @@ -110,7 +110,7 @@ const char kPropertyFocusHighlightEnabled[] = "a11yFocusHighlightEnabled"; // Key which corresponds to the select-to-speak A11Y property in JS. const char kPropertySelectToSpeakEnabled[] = "a11ySelectToSpeakEnabled"; -// Key which corresponds to the switch access A11Y property in JS. +// Key which corresponds to the Switch Access A11Y property in JS. const char kPropertySwitchAccessEnabled[] = "a11ySwitchAccessEnabled"; // Key which corresponds to the send-function-keys property in JS. diff --git a/chrome/browser/resources/chromeos/switch_access/menu_panel.js b/chrome/browser/resources/chromeos/switch_access/menu_panel.js index f181610883514d..ebea966744c643 100644 --- a/chrome/browser/resources/chromeos/switch_access/menu_panel.js +++ b/chrome/browser/resources/chromeos/switch_access/menu_panel.js @@ -15,7 +15,7 @@ class Panel { this.menuManager_; /** - * Reference to switch access. + * Reference to Switch Access. * @private {SwitchAccessInterface} */ this.switchAccess_; diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access.js b/chrome/browser/resources/chromeos/switch_access/switch_access.js index 4a89d329f0d3a9..fae8489584a227 100644 --- a/chrome/browser/resources/chromeos/switch_access/switch_access.js +++ b/chrome/browser/resources/chromeos/switch_access/switch_access.js @@ -17,8 +17,6 @@ class SwitchAccess { /** @private */ constructor() { - console.log('Switch access is enabled'); - /** * User commands. * @private {Commands} diff --git a/chrome/common/extensions/api/accessibility_features.json b/chrome/common/extensions/api/accessibility_features.json index 4311c073b93929..499a89a3e911f6 100644 --- a/chrome/common/extensions/api/accessibility_features.json +++ b/chrome/common/extensions/api/accessibility_features.json @@ -75,7 +75,7 @@ }, "switchAccess": { "$ref": "types.ChromeSetting", - "description": "

ChromeOS only.

Switch access. The value indicates whether the feature is enabled or not. get() requires accessibilityFeatures.read permission. set() and clear() require accessibilityFeatures.modify permission.

", + "description": "

ChromeOS only.

Switch Access. The value indicates whether the feature is enabled or not. get() requires accessibilityFeatures.read permission. set() and clear() require accessibilityFeatures.modify permission.

", "value": ["switchAccess", {"type": "boolean"}], "platforms": ["chromeos"] }, diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h index 75717b341f9b83..42efd95cfb2a90 100644 --- a/chrome/common/extensions/extension_constants.h +++ b/chrome/common/extensions/extension_constants.h @@ -210,9 +210,9 @@ extern const char kSelectToSpeakExtensionId[]; // Path to preinstalled Select-to-speak extension (relative to // |chrome::DIR_RESOURCES|). extern const char kSelectToSpeakExtensionPath[]; -// The extension id of the Switch access extension. +// The extension id of the Switch Access extension. extern const char kSwitchAccessExtensionId[]; -// Path to preinstalled Switch access extension (relative to +// Path to preinstalled Switch Access extension (relative to // |chrome::DIR_RESOURCES|). extern const char kSwitchAccessExtensionPath[]; // Name of the manifest file in an extension when a special manifest is used diff --git a/docs/accessibility/overview.md b/docs/accessibility/overview.md index d11a2f0807f1d0..7ab969bbb98917 100644 --- a/docs/accessibility/overview.md +++ b/docs/accessibility/overview.md @@ -18,7 +18,7 @@ Assistive technology includes: * Screen readers for blind users that describe the screen using synthesized speech or braille * Voice control applications that let you speak to the computer, -* Switch access that lets you control the computer with a small number +* Switch Access that lets you control the computer with a small number of physical switches, * Magnifiers that magnify a portion of the screen, and often highlight the cursor and caret for easier viewing, and diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index 040c4829c40076..f13cc559588a11 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml @@ -15142,12 +15142,12 @@ should be able to be added at any place in this file. dmazzoni@chromium.org - Settings: Accessibility: Disable switch access + Settings: Accessibility: Disable Switch Access dmazzoni@chromium.org - Settings: Accessibility: Enable switch access + Settings: Accessibility: Enable Switch Access @@ -21377,7 +21377,7 @@ should be able to be added at any place in this file. anastasi@google.com dtseng@chromium.org - Ash system menu: Accessibility: Disable switch access + Ash system menu: Accessibility: Disable Switch Access @@ -21385,7 +21385,7 @@ should be able to be added at any place in this file. anastasi@google.com dtseng@chromium.org - Ash system menu: Accessibility: Enable switch access + Ash system menu: Accessibility: Enable Switch Access diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index c77c695a8db327..7f369dc2f2f50b 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml @@ -7248,7 +7248,7 @@ be describing additional metrics about the same event. - Boolean value to represent whether switch access is currently enabled. + Boolean value to represent whether Switch Access is currently enabled. diff --git a/ui/accessibility/accessibility_switches.h b/ui/accessibility/accessibility_switches.h index e34013a9329160..aacf314aa5caa6 100644 --- a/ui/accessibility/accessibility_switches.h +++ b/ui/accessibility/accessibility_switches.h @@ -25,7 +25,7 @@ AX_EXPORT extern const char // Returns true if experimental accessibility language detection is enabled. AX_EXPORT bool IsExperimentalAccessibilityLanguageDetectionEnabled(); -// Returns true if experimental accessibility switch access text is enabled. +// Returns true if experimental accessibility Switch Access text is enabled. AX_EXPORT bool IsExperimentalAccessibilitySwitchAccessTextEnabled(); #if defined(OS_WIN)