Accessibility: Add accelerator to enable Select to Speak
This change implements the accelerator to enable Select to Speak if it's disabled. The keyboard shortcut we bind to is Search + S, which is the shortcut that currently activates it when it's enabled. If Select to Speak is already enabled, then the accelerator will do nothing and defer logic to the aforementioned behavior. See launch/4317095 for full details. UI mocks: https://www.figma.com/file/iYBqE7mtUB0UsBY9RmqfVZ/Select-to-speak?type=design&node-id=1462-151093&mode=design&t=JTOrMGdgATKVgm3b-0 Bug: b/286006143 Change-Id: I605908fd4c4501c70e33650cbe24c576c36bb637 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5492400 Reviewed-by: Jimmy Gong <jimmyxgong@chromium.org> Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by: Katie Dektar <katie@chromium.org> Commit-Queue: Akihiro Ota <akihiroota@chromium.org> Cr-Commit-Position: refs/heads/main@{#1303781}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
6692abb871
commit
9472f5f804
ash
accelerators
accessibility
ash_strings.grdash_strings_grd
IDS_ASH_ACCELERATOR_DESCRIPTION_ENABLE_SELECT_TO_SPEAK.png.sha1IDS_ASH_SELECT_TO_SPEAK_KEYBOARD_DIALOG_DESCRIPTION.png.sha1IDS_ASH_SELECT_TO_SPEAK_KEYBOARD_DIALOG_TITLE.png.sha1
constants
public
cpp
mojom
webui
shortcut_customization_ui
chromeos
tools/metrics
@ -1319,6 +1319,10 @@ void TogglePicker(base::TimeTicks accelerator_timestamp) {
|
||||
}
|
||||
}
|
||||
|
||||
void EnableSelectToSpeak() {
|
||||
Shell::Get()->accessibility_controller()->EnableSelectToSpeakWithDialog();
|
||||
}
|
||||
|
||||
void EnableOrToggleDictation() {
|
||||
Shell::Get()->accessibility_controller()->EnableOrToggleDictationFromSource(
|
||||
DictationToggleSource::kKeyboard);
|
||||
|
@ -324,6 +324,10 @@ ASH_EXPORT void ToggleClipboardHistory(bool is_plain_text_paste);
|
||||
// triggered Picker.
|
||||
ASH_EXPORT void TogglePicker(base::TimeTicks accelerator_timestamp);
|
||||
|
||||
// Enables Select to Speak if the feature is currently disabled. Does nothing if
|
||||
// the feature is currently enabled.
|
||||
ASH_EXPORT void EnableSelectToSpeak();
|
||||
|
||||
// Enables Dictation if the feature is currently disabled. Toggles (either
|
||||
// starts or stops) Dictation if the feature is currently enabled.
|
||||
ASH_EXPORT void EnableOrToggleDictation();
|
||||
|
@ -877,6 +877,8 @@ bool AcceleratorControllerImpl::CanPerformAction(
|
||||
*capslock_state_machine_, notification_controller_.get());
|
||||
case AcceleratorAction::kToggleClipboardHistory:
|
||||
return true;
|
||||
case AcceleratorAction::kEnableSelectToSpeak:
|
||||
return ::features::IsAccessibilitySelectToSpeakShortcutEnabled();
|
||||
case AcceleratorAction::kEnableOrToggleDictation:
|
||||
return accelerators::CanEnableOrToggleDictation();
|
||||
case AcceleratorAction::kToggleDockedMagnifier:
|
||||
@ -1434,6 +1436,9 @@ void AcceleratorControllerImpl::PerformAction(
|
||||
case AcceleratorAction::kToggleClipboardHistory:
|
||||
accelerators::ToggleClipboardHistory(/*is_plain_text_paste=*/false);
|
||||
break;
|
||||
case AcceleratorAction::kEnableSelectToSpeak:
|
||||
accelerators::EnableSelectToSpeak();
|
||||
break;
|
||||
case AcceleratorAction::kEnableOrToggleDictation:
|
||||
// UMA metrics are recorded later in the call stack.
|
||||
accelerators::EnableOrToggleDictation();
|
||||
|
@ -198,6 +198,7 @@ const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[] = {
|
||||
AcceleratorAction::kDebugToggleTabletMode,
|
||||
AcceleratorAction::kDevAddRemoveDisplay,
|
||||
AcceleratorAction::kDisableCapsLock,
|
||||
AcceleratorAction::kEnableSelectToSpeak,
|
||||
AcceleratorAction::kEnableOrToggleDictation,
|
||||
AcceleratorAction::kKeyboardBacklightToggle,
|
||||
AcceleratorAction::kKeyboardBrightnessDown,
|
||||
@ -275,6 +276,7 @@ const AcceleratorAction kActionsAllowedAtModalWindow[] = {
|
||||
AcceleratorAction::kDebugToggleTouchScreen,
|
||||
AcceleratorAction::kDevAddRemoveDisplay,
|
||||
AcceleratorAction::kDisableCapsLock,
|
||||
AcceleratorAction::kEnableSelectToSpeak,
|
||||
AcceleratorAction::kEnableOrToggleDictation,
|
||||
AcceleratorAction::kExit,
|
||||
AcceleratorAction::kKeyboardBacklightToggle,
|
||||
@ -360,6 +362,7 @@ const AcceleratorAction kActionsAllowedInAppModeOrPinnedMode[] = {
|
||||
AcceleratorAction::kDebugToggleTouchScreen,
|
||||
AcceleratorAction::kDevAddRemoveDisplay,
|
||||
AcceleratorAction::kDisableCapsLock,
|
||||
AcceleratorAction::kEnableSelectToSpeak,
|
||||
AcceleratorAction::kEnableOrToggleDictation,
|
||||
AcceleratorAction::kKeyboardBacklightToggle,
|
||||
AcceleratorAction::kKeyboardBrightnessDown,
|
||||
@ -458,6 +461,7 @@ const AcceleratorAction kActionsKeepingMenuOpen[] = {
|
||||
AcceleratorAction::kDesksNewDesk,
|
||||
AcceleratorAction::kDesksRemoveCurrentDesk,
|
||||
AcceleratorAction::kDisableCapsLock,
|
||||
AcceleratorAction::kEnableSelectToSpeak,
|
||||
AcceleratorAction::kEnableOrToggleDictation,
|
||||
AcceleratorAction::kKeyboardBacklightToggle,
|
||||
AcceleratorAction::kKeyboardBrightnessDown,
|
||||
|
@ -287,6 +287,7 @@ constexpr const char* const kCopiedOnSigninAccessibilityPrefs[]{
|
||||
prefs::kDictationDlcOnlySodaDownloadedNotificationHasBeenShown,
|
||||
prefs::kDictationNoDlcsDownloadedNotificationHasBeenShown,
|
||||
prefs::kDisplayRotationAcceleratorDialogHasBeenAccepted2,
|
||||
prefs::kSelectToSpeakAcceleratorDialogHasBeenAccepted,
|
||||
};
|
||||
|
||||
// List of switch access accessibility prefs that are to be copied (if changed
|
||||
@ -1173,6 +1174,8 @@ void AccessibilityController::RegisterProfilePrefs(
|
||||
prefs::kDockedMagnifierAcceleratorDialogHasBeenAccepted, false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kDictationAcceleratorDialogHasBeenAccepted, false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kSelectToSpeakAcceleratorDialogHasBeenAccepted, false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kDictationDlcSuccessNotificationHasBeenShown, false);
|
||||
registry->RegisterBooleanPref(
|
||||
@ -2020,6 +2023,25 @@ void AccessibilityController::ToggleDictationFromSource(
|
||||
ToggleDictation();
|
||||
}
|
||||
|
||||
void AccessibilityController::EnableSelectToSpeakWithDialog() {
|
||||
// TODO(b/286006143): Return early or show a toast (depending on feedback from
|
||||
// UX) if Select to Speak is blocked by a policy.
|
||||
if (!::features::IsAccessibilitySelectToSpeakShortcutEnabled() ||
|
||||
select_to_speak().enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (active_user_prefs_->GetBoolean(
|
||||
prefs::kSelectToSpeakAcceleratorDialogHasBeenAccepted)) {
|
||||
// Enable Select to Speak if the confirmation dialog has been previously
|
||||
// accepted.
|
||||
OnSelectToSpeakKeyboardDialogAccepted();
|
||||
} else {
|
||||
// Show the confirmation dialog if it hasn't been accepted yet.
|
||||
ShowSelectToSpeakKeyboardDialog();
|
||||
}
|
||||
}
|
||||
|
||||
void AccessibilityController::EnableOrToggleDictationFromSource(
|
||||
DictationToggleSource source) {
|
||||
if (dictation().enabled()) {
|
||||
@ -2092,6 +2114,39 @@ void AccessibilityController::OnDictationKeyboardDialogDismissed() {
|
||||
dictation_keyboard_dialog_showing_for_testing_ = false;
|
||||
}
|
||||
|
||||
void AccessibilityController::ShowSelectToSpeakKeyboardDialog() {
|
||||
if (!client_ || !::features::IsAccessibilitySelectToSpeakShortcutEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::u16string title =
|
||||
l10n_util::GetStringUTF16(IDS_ASH_SELECT_TO_SPEAK_KEYBOARD_DIALOG_TITLE);
|
||||
std::u16string description = l10n_util::GetStringUTF16(
|
||||
IDS_ASH_SELECT_TO_SPEAK_KEYBOARD_DIALOG_DESCRIPTION);
|
||||
ShowConfirmationDialog(
|
||||
title, description, l10n_util::GetStringUTF16(IDS_APP_CANCEL),
|
||||
base::BindOnce(
|
||||
&AccessibilityController::OnSelectToSpeakKeyboardDialogAccepted,
|
||||
GetWeakPtr()),
|
||||
base::BindOnce(
|
||||
&AccessibilityController::OnSelectToSpeakKeyboardDialogDismissed,
|
||||
GetWeakPtr()),
|
||||
base::BindOnce(
|
||||
&AccessibilityController::OnSelectToSpeakKeyboardDialogDismissed,
|
||||
GetWeakPtr()));
|
||||
}
|
||||
|
||||
void AccessibilityController::OnSelectToSpeakKeyboardDialogAccepted() {
|
||||
active_user_prefs_->SetBoolean(
|
||||
prefs::kSelectToSpeakAcceleratorDialogHasBeenAccepted, true);
|
||||
confirmation_dialog_.reset();
|
||||
select_to_speak().SetEnabled(true);
|
||||
}
|
||||
|
||||
void AccessibilityController::OnSelectToSpeakKeyboardDialogDismissed() {
|
||||
confirmation_dialog_.reset();
|
||||
}
|
||||
|
||||
void AccessibilityController::ShowDictationLanguageUpgradedNudge(
|
||||
const std::string& dictation_locale,
|
||||
const std::string& application_locale) {
|
||||
|
@ -496,6 +496,13 @@ class ASH_EXPORT AccessibilityController : public SessionObserver,
|
||||
// Starts or stops dictation. Records metrics for toggling via SwitchAccess.
|
||||
void ToggleDictationFromSource(DictationToggleSource source);
|
||||
|
||||
// Enables Select to Speak if the feature is currently disabled. If Select to
|
||||
// Speak has not been enabled on the current profile before, then this method
|
||||
// shows a dialog giving background about the feature. Once the dialog is
|
||||
// accepted, it is never shown again for that profile. This method does
|
||||
// nothing if the Select to Speak is currently enabled.
|
||||
void EnableSelectToSpeakWithDialog();
|
||||
|
||||
// Enables Dictation if the feature is currently disabled. Toggles (starts or
|
||||
// stops) Dictation if the feature is currently enabled.
|
||||
void EnableOrToggleDictationFromSource(DictationToggleSource source);
|
||||
@ -699,6 +706,10 @@ class ASH_EXPORT AccessibilityController : public SessionObserver,
|
||||
void OnDictationKeyboardDialogAccepted();
|
||||
void OnDictationKeyboardDialogDismissed();
|
||||
|
||||
void ShowSelectToSpeakKeyboardDialog();
|
||||
void OnSelectToSpeakKeyboardDialogAccepted();
|
||||
void OnSelectToSpeakKeyboardDialogDismissed();
|
||||
|
||||
void RecordSelectToSpeakSpeechDuration(SelectToSpeakState old_state,
|
||||
SelectToSpeakState new_state);
|
||||
|
||||
|
@ -2024,4 +2024,86 @@ TEST_P(AccessibilityControllerSigninTest,
|
||||
container->GetProperty(ui::kAXConsiderInvisibleAndIgnoreChildren));
|
||||
}
|
||||
|
||||
class AccessibilityControllerSelectToSpeakKeyboardShortcutTest
|
||||
: public AshTestBase {
|
||||
protected:
|
||||
AccessibilityControllerSelectToSpeakKeyboardShortcutTest() = default;
|
||||
AccessibilityControllerSelectToSpeakKeyboardShortcutTest(
|
||||
const AccessibilityControllerSelectToSpeakKeyboardShortcutTest&) = delete;
|
||||
AccessibilityControllerSelectToSpeakKeyboardShortcutTest& operator=(
|
||||
const AccessibilityControllerSelectToSpeakKeyboardShortcutTest&) = delete;
|
||||
~AccessibilityControllerSelectToSpeakKeyboardShortcutTest() override =
|
||||
default;
|
||||
|
||||
void SetUp() override {
|
||||
scoped_feature_list_.InitAndEnableFeature(
|
||||
::features::kAccessibilitySelectToSpeakShortcut);
|
||||
AshTestBase::SetUp();
|
||||
}
|
||||
|
||||
void SetDialogAcceptedPref(bool accepted) {
|
||||
PrefService* prefs =
|
||||
Shell::Get()->session_controller()->GetLastActiveUserPrefService();
|
||||
prefs->SetBoolean(prefs::kSelectToSpeakAcceleratorDialogHasBeenAccepted,
|
||||
accepted);
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedFeatureList scoped_feature_list_;
|
||||
};
|
||||
|
||||
TEST_F(AccessibilityControllerSelectToSpeakKeyboardShortcutTest,
|
||||
DialogNotAccepted) {
|
||||
AccessibilityController* controller =
|
||||
Shell::Get()->accessibility_controller();
|
||||
TestAccessibilityControllerClient client;
|
||||
controller->SetClient(&client);
|
||||
|
||||
SetDialogAcceptedPref(false);
|
||||
ASSERT_FALSE(controller->select_to_speak().enabled());
|
||||
controller->EnableSelectToSpeakWithDialog();
|
||||
|
||||
// If the dialog hasn't been accepted yet, then pressing the Select to Speak
|
||||
// shortcut should show a dialog.
|
||||
ASSERT_NE(nullptr, controller->GetConfirmationDialogForTest());
|
||||
ASSERT_FALSE(controller->select_to_speak().enabled());
|
||||
}
|
||||
|
||||
TEST_F(AccessibilityControllerSelectToSpeakKeyboardShortcutTest,
|
||||
DialogAccepted) {
|
||||
AccessibilityController* controller =
|
||||
Shell::Get()->accessibility_controller();
|
||||
TestAccessibilityControllerClient client;
|
||||
controller->SetClient(&client);
|
||||
|
||||
SetDialogAcceptedPref(true);
|
||||
ASSERT_FALSE(controller->select_to_speak().enabled());
|
||||
controller->EnableSelectToSpeakWithDialog();
|
||||
|
||||
// If the dialog has been accepted, then pressing the key shortcut should
|
||||
// enable Select to Speak (but it should still remain inactive).
|
||||
ASSERT_TRUE(controller->select_to_speak().enabled());
|
||||
ASSERT_EQ(nullptr, controller->GetConfirmationDialogForTest());
|
||||
}
|
||||
|
||||
TEST_F(AccessibilityControllerSelectToSpeakKeyboardShortcutTest,
|
||||
SelectToSpeakAlreadyEnabled) {
|
||||
AccessibilityController* controller =
|
||||
Shell::Get()->accessibility_controller();
|
||||
TestAccessibilityControllerClient client;
|
||||
controller->SetClient(&client);
|
||||
|
||||
SetDialogAcceptedPref(true);
|
||||
controller->select_to_speak().SetEnabled(true);
|
||||
ASSERT_TRUE(controller->select_to_speak().enabled());
|
||||
controller->EnableSelectToSpeakWithDialog();
|
||||
|
||||
// If Select to Speak is already on, then pressing the key shortcut should
|
||||
// activate it. That logic is handled in a separate class, so for the purposes
|
||||
// of this unit test, we can just assert that Select to Speak is enabled and
|
||||
// that the dialog isn't showing.
|
||||
ASSERT_TRUE(controller->select_to_speak().enabled());
|
||||
ASSERT_EQ(nullptr, controller->GetConfirmationDialogForTest());
|
||||
}
|
||||
|
||||
} // namespace ash
|
||||
|
@ -1451,6 +1451,14 @@ Style notes:
|
||||
With dictation, you can type using your voice. Press the dictation key or select the microphone icon at the bottom of the screen when you’re on a text field. Your dictation language is set to <ph name="language">$1<ex>English (United States)</ex></ph>. Speech is sent to Google for processing. You can change the dictation language anytime in Settings > Accessibility.
|
||||
</message>
|
||||
|
||||
<!-- Select to Speak keyboard dialog strings -->
|
||||
<message name="IDS_ASH_SELECT_TO_SPEAK_KEYBOARD_DIALOG_TITLE" desc="The title of a dialog that is shown when Select to Speak is enabled from the keyboard.">
|
||||
Turn on Select-to-Speak?
|
||||
</message>
|
||||
<message name="IDS_ASH_SELECT_TO_SPEAK_KEYBOARD_DIALOG_DESCRIPTION" desc="The description of a dialog that is shown when Select-to-Speak is enabled from the keyboard.">
|
||||
Hear specific text read aloud. First, select the Select-to-speak icon on the bottom of your screen, then highlight text. You can also use a keyboard shortcut: Highlight text, then press Search/Launcher + S.
|
||||
</message>
|
||||
|
||||
<!-- Accessibility nudges -->
|
||||
<message name="IDS_ASH_ACCESSIBILITY_NUDGE_DICTATION_NO_FOCUSED_TEXT_FIELD" desc="Displayed in a nudge when Dictation is stopped automatically because there is no focused text field.">
|
||||
Go to a text field to use Dictation
|
||||
@ -4223,6 +4231,9 @@ No devices connected.
|
||||
<message name="IDS_ASH_ACCELERATOR_DESCRIPTION_TOGGLE_CLIPBOARD_HISTORY" desc="Label for accelerator action - Open Clipboard.">
|
||||
Open Clipboard
|
||||
</message>
|
||||
<message name="IDS_ASH_ACCELERATOR_DESCRIPTION_ENABLE_SELECT_TO_SPEAK" desc="Label for accelerator action - Enable Select-to-Speak">
|
||||
Turn on Select-to-Speak
|
||||
</message>
|
||||
<message name="IDS_ASH_ACCELERATOR_DESCRIPTION_TOGGLE_DICTATION" desc="Label for accelerator action - Turn on/off dictation (type with your voice)">
|
||||
Turn on/off dictation (type with your voice)
|
||||
</message>
|
||||
|
@ -0,0 +1 @@
|
||||
0636caba8f57f1820c08064ab9e3ce09a068fae9
|
@ -0,0 +1 @@
|
||||
4a51afee868b526dcb197c5bca8e412e57487692
|
@ -0,0 +1 @@
|
||||
d1ab8f35ea4f475bba5e94a7ec5e2914edb05182
|
@ -599,6 +599,12 @@ inline constexpr char kAccessibilityFocusHighlightEnabled[] =
|
||||
// A boolean pref which determines whether Select-to-speak is enabled.
|
||||
inline constexpr char kAccessibilitySelectToSpeakEnabled[] =
|
||||
"settings.a11y.select_to_speak";
|
||||
|
||||
// A boolean pref which indicates whether the Select to Speak confirmation
|
||||
// dialog has ever been accepted.
|
||||
inline constexpr char kSelectToSpeakAcceleratorDialogHasBeenAccepted[] =
|
||||
"settings.a11y.select_to_speak_accelerator_dialog_has_been_accepted";
|
||||
|
||||
// A boolean pref which determines whether Switch Access is enabled.
|
||||
inline constexpr char kAccessibilitySwitchAccessEnabled[] =
|
||||
"settings.a11y.switch_access.enabled";
|
||||
|
@ -164,6 +164,7 @@ namespace ash {
|
||||
ACCELERATOR_ACTION_ENTRY(VolumeMuteToggle) \
|
||||
ACCELERATOR_ACTION_ENTRY(TogglePicker) \
|
||||
ACCELERATOR_ACTION_ENTRY(AccessibilityAction) \
|
||||
ACCELERATOR_ACTION_ENTRY(EnableSelectToSpeak) \
|
||||
/* Debug actions are kept at an offset.*/ \
|
||||
/* This offset should be kept consistent with the enum*/ \
|
||||
/* `AcceleratorAction` in*/ \
|
||||
|
@ -15,12 +15,12 @@ namespace ash {
|
||||
namespace {
|
||||
|
||||
// The total number of accelerator actions.
|
||||
constexpr int kAcceleratorActionsTotalNum = 159;
|
||||
constexpr int kAcceleratorActionsTotalNum = 160;
|
||||
// The toal number of debug accelerators, these will not be used for hashing.
|
||||
constexpr int kDebugAcceleratorActionsNum = 27;
|
||||
// The hash of accelerator actions. Please update this when adding a new
|
||||
// accelerator action.
|
||||
constexpr char kAcceleratorActionsHash[] = "8ea98991f519549abbaca467262b6332";
|
||||
constexpr char kAcceleratorActionsHash[] = "c48172fcb727dab285467ebe3fab1429";
|
||||
|
||||
// Define the mapping between an AcceleratorAction and its string name.
|
||||
// Example:
|
||||
|
@ -112,6 +112,8 @@ const AcceleratorData kAcceleratorData[] = {
|
||||
AcceleratorAction::kToggleHighContrast},
|
||||
{true, ui::VKEY_Z, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
|
||||
AcceleratorAction::kToggleSpokenFeedback},
|
||||
{true, ui::VKEY_S, ui::EF_COMMAND_DOWN,
|
||||
AcceleratorAction::kEnableSelectToSpeak},
|
||||
{true, ui::VKEY_D, ui::EF_COMMAND_DOWN,
|
||||
AcceleratorAction::kEnableOrToggleDictation},
|
||||
{true, ui::VKEY_DICTATE, ui::EF_NONE,
|
||||
|
@ -29,6 +29,7 @@ enum AcceleratorAction {
|
||||
kDesksActivate7,
|
||||
kDesksToggleAssignToAllDesks,
|
||||
kDisableCapsLock,
|
||||
kEnableSelectToSpeak,
|
||||
kEnableOrToggleDictation,
|
||||
kExit,
|
||||
kFocusCameraPreview,
|
||||
|
@ -62,6 +62,8 @@ EnumTraits<mojom_accelerator_action, ash::AcceleratorAction>::ToMojom(
|
||||
return mojom_accelerator_action::kDesksToggleAssignToAllDesks;
|
||||
case ash::AcceleratorAction::kDisableCapsLock:
|
||||
return mojom_accelerator_action::kDisableCapsLock;
|
||||
case ash::AcceleratorAction::kEnableSelectToSpeak:
|
||||
return mojom_accelerator_action::kEnableSelectToSpeak;
|
||||
case ash::AcceleratorAction::kEnableOrToggleDictation:
|
||||
return mojom_accelerator_action::kEnableOrToggleDictation;
|
||||
case ash::AcceleratorAction::kExit:
|
||||
@ -414,6 +416,9 @@ bool EnumTraits<mojom_accelerator_action, ash::AcceleratorAction>::FromMojom(
|
||||
case mojom_accelerator_action::kDisableCapsLock:
|
||||
*out = ash::AcceleratorAction::kDisableCapsLock;
|
||||
return true;
|
||||
case mojom_accelerator_action::kEnableSelectToSpeak:
|
||||
*out = ash::AcceleratorAction::kEnableSelectToSpeak;
|
||||
return true;
|
||||
case mojom_accelerator_action::kEnableOrToggleDictation:
|
||||
*out = ash::AcceleratorAction::kEnableOrToggleDictation;
|
||||
return true;
|
||||
|
@ -533,6 +533,14 @@ const AcceleratorLayoutMap& GetAcceleratorLayoutMap() {
|
||||
mojom::AcceleratorSubcategory::kGeneralControls,
|
||||
/*locked=*/true, mojom::AcceleratorLayoutStyle::kDefault,
|
||||
mojom::AcceleratorSource::kAsh)},
|
||||
{AcceleratorAction::kEnableSelectToSpeak,
|
||||
AcceleratorLayoutDetails(
|
||||
AcceleratorAction::kEnableSelectToSpeak,
|
||||
IDS_ASH_ACCELERATOR_DESCRIPTION_ENABLE_SELECT_TO_SPEAK,
|
||||
mojom::AcceleratorCategory::kAccessibility,
|
||||
mojom::AcceleratorSubcategory::kVisibility,
|
||||
/*locked=*/true, mojom::AcceleratorLayoutStyle::kDefault,
|
||||
mojom::AcceleratorSource::kAsh)},
|
||||
{AcceleratorAction::kEnableOrToggleDictation,
|
||||
AcceleratorLayoutDetails(
|
||||
AcceleratorAction::kEnableOrToggleDictation,
|
||||
|
@ -474,6 +474,7 @@ inline constexpr uint32_t kAcceleratorLayouts[] = {
|
||||
AcceleratorAction::kToggleSpokenFeedback,
|
||||
|
||||
// Accessibility > Visibility
|
||||
AcceleratorAction::kEnableSelectToSpeak,
|
||||
AcceleratorAction::kToggleHighContrast,
|
||||
AcceleratorAction::kToggleDockedMagnifier,
|
||||
AcceleratorAction::kToggleFullscreenMagnifier,
|
||||
|
@ -22,9 +22,9 @@ namespace ash {
|
||||
namespace {
|
||||
|
||||
// The total number of Ash accelerators.
|
||||
constexpr int kAshAcceleratorsTotalNum = 154;
|
||||
constexpr int kAshAcceleratorsTotalNum = 155;
|
||||
// The hash of Ash accelerators.
|
||||
constexpr char kAshAcceleratorsHash[] = "12a3a54ce8f829438d2ba8e71c81c602";
|
||||
constexpr char kAshAcceleratorsHash[] = "fc60bacc2a21bfbc164437b42580f05c";
|
||||
|
||||
std::string ToActionName(ash::AcceleratorAction action) {
|
||||
return base::StrCat(
|
||||
|
@ -182,6 +182,8 @@ void AddLocalizedStrings(content::WebUIDataSource* source) {
|
||||
IDS_SHORTCUT_CUSTOMIZATION_ICON_LABEL_BROWSER_SEARCH},
|
||||
{"iconLabelContextMenu",
|
||||
IDS_SHORTCUT_CUSTOMIZATION_ICON_LABEL_CONTEXT_MENU},
|
||||
{"iconLabelEnableSelectToSpeak",
|
||||
IDS_SHORTCUT_CUSTOMIZATION_ICON_LABEL_ENABLE_SELECT_TO_SPEAK},
|
||||
{"iconLabelEnableOrToggleDictation",
|
||||
IDS_SHORTCUT_CUSTOMIZATION_ICON_LABEL_ENABLE_OR_TOGGLE_DICTATION},
|
||||
{"iconLabelEmojiPicker",
|
||||
|
@ -6067,6 +6067,9 @@
|
||||
<message name="IDS_SHORTCUT_CUSTOMIZATION_ICON_LABEL_BROWSER_SEARCH" desc="The text read aloud by the screen reader describing the keyboard icon 'browser search'.">
|
||||
browser search
|
||||
</message>
|
||||
<message name="IDS_SHORTCUT_CUSTOMIZATION_ICON_LABEL_ENABLE_SELECT_TO_SPEAK" desc="The text read aloud by the screen reader describing the keyboard icon 'enable select to speak'." is_accessibility_with_no_ui="true">
|
||||
enable select to speak
|
||||
</message>
|
||||
<message name="IDS_SHORTCUT_CUSTOMIZATION_ICON_LABEL_ENABLE_OR_TOGGLE_DICTATION" desc="The text read aloud by the screen reader describing the keyboard icon 'toggle dictation'." is_accessibility_with_no_ui="true">
|
||||
enable or toggle dictation
|
||||
</message>
|
||||
|
@ -636,6 +636,14 @@ should be able to be added at any place in this file.
|
||||
</description>
|
||||
</action>
|
||||
|
||||
<action name="Accel_Enable_SelectToSpeak">
|
||||
<owner>akihiroota@chromium.org</owner>
|
||||
<owner>ash/accessibility/OWNERS</owner>
|
||||
<description>
|
||||
User enables Select to Speak by pressing the Search + S keyboard shortcut.
|
||||
</description>
|
||||
</action>
|
||||
|
||||
<action name="Accel_Exit_First_Q">
|
||||
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
|
||||
<description>Please enter the description of this user action.</description>
|
||||
|
@ -72,6 +72,7 @@ chromium-metrics-reviews@google.com.
|
||||
<variant name="DevToggleUnifiedDesktop"/>
|
||||
<variant name="DisableCapsLock"/>
|
||||
<variant name="EnableOrToggleDictation"/>
|
||||
<variant name="EnableSelectToSpeak"/>
|
||||
<variant name="Exit"/>
|
||||
<variant name="FocusCameraPreview"/>
|
||||
<variant name="FocusNextPane"/>
|
||||
|
@ -182,6 +182,7 @@ chromium-metrics-reviews@google.com.
|
||||
<int value="128" label="VolumeMuteToggle"/>
|
||||
<int value="129" label="TogglePicker"/>
|
||||
<int value="130" label="AccessibilityAction"/>
|
||||
<int value="131" label="EnableSelectToSpeak"/>
|
||||
<int value="9000" label="DebugClearUseKMeansPref"/>
|
||||
<int value="9001" label="DebugKeyboardBacklightToggle"/>
|
||||
<int value="9002" label="DebugMicrophoneMuteToggle"/>
|
||||
|
Reference in New Issue
Block a user