Commit a75fcc90 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Add accessibility setting for showing shelf navigation buttons

Bug:1050544

TBR=tommycli@chromium.org
(LGTM given on the cl, but missed +1)

Change-Id: I53c0eae00f0cf080e9123e0b7849da67f6f9fde2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2049083
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Reviewed-by: default avatarKatie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742073}
parent 7ac8cf00
...@@ -412,6 +412,9 @@ void AccessibilityControllerImpl::RegisterProfilePrefs( ...@@ -412,6 +412,9 @@ void AccessibilityControllerImpl::RegisterProfilePrefs(
registry->RegisterBooleanPref( registry->RegisterBooleanPref(
prefs::kAccessibilityVirtualKeyboardEnabled, false, prefs::kAccessibilityVirtualKeyboardEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_OS_PREF); user_prefs::PrefRegistrySyncable::SYNCABLE_OS_PREF);
registry->RegisterBooleanPref(
prefs::kAccessibilityTabletModeShelfNavigationButtonsEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_OS_PREF);
registry->RegisterBooleanPref( registry->RegisterBooleanPref(
prefs::kHighContrastAcceleratorDialogHasBeenAccepted, false); prefs::kHighContrastAcceleratorDialogHasBeenAccepted, false);
registry->RegisterBooleanPref( registry->RegisterBooleanPref(
...@@ -910,6 +913,16 @@ bool AccessibilityControllerImpl::IsEnterpriseIconVisibleForVirtualKeyboard() { ...@@ -910,6 +913,16 @@ bool AccessibilityControllerImpl::IsEnterpriseIconVisibleForVirtualKeyboard() {
prefs::kAccessibilityVirtualKeyboardEnabled); prefs::kAccessibilityVirtualKeyboardEnabled);
} }
void AccessibilityControllerImpl::SetTabletModeShelfNavigationButtonsEnabled(
bool enabled) {
if (!active_user_prefs_)
return;
active_user_prefs_->SetBoolean(
prefs::kAccessibilityTabletModeShelfNavigationButtonsEnabled, enabled);
active_user_prefs_->CommitPendingWrite();
}
void AccessibilityControllerImpl::TriggerAccessibilityAlert( void AccessibilityControllerImpl::TriggerAccessibilityAlert(
AccessibilityAlert alert) { AccessibilityAlert alert) {
if (client_) if (client_)
...@@ -1228,6 +1241,11 @@ void AccessibilityControllerImpl::ObservePrefs(PrefService* prefs) { ...@@ -1228,6 +1241,11 @@ void AccessibilityControllerImpl::ObservePrefs(PrefService* prefs) {
base::BindRepeating( base::BindRepeating(
&AccessibilityControllerImpl::UpdateVirtualKeyboardFromPref, &AccessibilityControllerImpl::UpdateVirtualKeyboardFromPref,
base::Unretained(this))); base::Unretained(this)));
pref_change_registrar_->Add(
prefs::kAccessibilityTabletModeShelfNavigationButtonsEnabled,
base::BindRepeating(&AccessibilityControllerImpl::
UpdateTabletModeShelfNavigationButtonsFromPref,
base::Unretained(this)));
// Load current state. // Load current state.
UpdateAutoclickFromPref(); UpdateAutoclickFromPref();
...@@ -1249,6 +1267,7 @@ void AccessibilityControllerImpl::ObservePrefs(PrefService* prefs) { ...@@ -1249,6 +1267,7 @@ void AccessibilityControllerImpl::ObservePrefs(PrefService* prefs) {
UpdateStickyKeysFromPref(); UpdateStickyKeysFromPref();
UpdateSwitchAccessFromPref(); UpdateSwitchAccessFromPref();
UpdateVirtualKeyboardFromPref(); UpdateVirtualKeyboardFromPref();
UpdateTabletModeShelfNavigationButtonsFromPref();
UpdateShortcutsEnabledFromPref(); UpdateShortcutsEnabledFromPref();
} }
...@@ -1692,6 +1711,20 @@ void AccessibilityControllerImpl::UpdateVirtualKeyboardFromPref() { ...@@ -1692,6 +1711,20 @@ void AccessibilityControllerImpl::UpdateVirtualKeyboardFromPref() {
keyboard::SetAccessibilityKeyboardEnabled(enabled); keyboard::SetAccessibilityKeyboardEnabled(enabled);
} }
void AccessibilityControllerImpl::
UpdateTabletModeShelfNavigationButtonsFromPref() {
DCHECK(active_user_prefs_);
const bool enabled = active_user_prefs_->GetBoolean(
prefs::kAccessibilityTabletModeShelfNavigationButtonsEnabled);
if (tablet_mode_shelf_navigation_buttons_enabled_ == enabled)
return;
tablet_mode_shelf_navigation_buttons_enabled_ = enabled;
NotifyAccessibilityStatusChanged();
}
base::string16 AccessibilityControllerImpl::GetBatteryDescription() const { base::string16 AccessibilityControllerImpl::GetBatteryDescription() const {
// Pass battery status as string to callback function. // Pass battery status as string to callback function.
return PowerStatus::Get()->GetAccessibleNameString( return PowerStatus::Get()->GetAccessibleNameString(
......
...@@ -165,6 +165,11 @@ class ASH_EXPORT AccessibilityControllerImpl : public AccessibilityController, ...@@ -165,6 +165,11 @@ class ASH_EXPORT AccessibilityControllerImpl : public AccessibilityController,
bool IsVirtualKeyboardSettingVisibleInTray(); bool IsVirtualKeyboardSettingVisibleInTray();
bool IsEnterpriseIconVisibleForVirtualKeyboard(); bool IsEnterpriseIconVisibleForVirtualKeyboard();
void SetTabletModeShelfNavigationButtonsEnabled(bool enabled);
bool tablet_mode_shelf_navigation_buttons_enabled() const {
return tablet_mode_shelf_navigation_buttons_enabled_;
}
bool dictation_active() const { return dictation_active_; } bool dictation_active() const { return dictation_active_; }
// Returns true if accessibility shortcuts have been disabled. // Returns true if accessibility shortcuts have been disabled.
...@@ -296,6 +301,7 @@ class ASH_EXPORT AccessibilityControllerImpl : public AccessibilityController, ...@@ -296,6 +301,7 @@ class ASH_EXPORT AccessibilityControllerImpl : public AccessibilityController,
void UpdateVirtualKeyboardFromPref(); void UpdateVirtualKeyboardFromPref();
void UpdateAccessibilityHighlightingFromPrefs(); void UpdateAccessibilityHighlightingFromPrefs();
void UpdateShortcutsEnabledFromPref(); void UpdateShortcutsEnabledFromPref();
void UpdateTabletModeShelfNavigationButtonsFromPref();
void MaybeCreateSelectToSpeakEventHandler(); void MaybeCreateSelectToSpeakEventHandler();
void MaybeCreateSwitchAccessEventHandler(); void MaybeCreateSwitchAccessEventHandler();
...@@ -326,6 +332,7 @@ class ASH_EXPORT AccessibilityControllerImpl : public AccessibilityController, ...@@ -326,6 +332,7 @@ class ASH_EXPORT AccessibilityControllerImpl : public AccessibilityController,
bool virtual_keyboard_enabled_ = false; bool virtual_keyboard_enabled_ = false;
bool dictation_active_ = false; bool dictation_active_ = false;
bool shortcuts_enabled_ = true; bool shortcuts_enabled_ = true;
bool tablet_mode_shelf_navigation_buttons_enabled_ = false;
SelectToSpeakState select_to_speak_state_ = SelectToSpeakState select_to_speak_state_ =
SelectToSpeakState::kSelectToSpeakStateInactive; SelectToSpeakState::kSelectToSpeakStateInactive;
......
...@@ -117,6 +117,12 @@ const char kAccessibilitySwitchAccessAutoScanSpeedMs[] = ...@@ -117,6 +117,12 @@ const char kAccessibilitySwitchAccessAutoScanSpeedMs[] =
// enabled). // enabled).
const char kAccessibilitySwitchAccessAutoScanKeyboardSpeedMs[] = const char kAccessibilitySwitchAccessAutoScanKeyboardSpeedMs[] =
"settings.a11y.switch_access.auto_scan.keyboard.speed_ms"; "settings.a11y.switch_access.auto_scan.keyboard.speed_ms";
// A boolean pref which, if set, indicates that shelf navigation buttons (home,
// back and overview button) should be shown in tablet mode. Note that shelf
// buttons might be shown even if the pref value is false - for example, if
// spoken feedback, autoclick or switch access are enabled.
const char kAccessibilityTabletModeShelfNavigationButtonsEnabled[] =
"settings.a11y.tablet_mode_shelf_nav_buttons_enabled";
// A boolean pref which determines whether dictation is enabled. // A boolean pref which determines whether dictation is enabled.
const char kAccessibilityDictationEnabled[] = "settings.a11y.dictation"; const char kAccessibilityDictationEnabled[] = "settings.a11y.dictation";
// A boolean pref which determines whether the accessibility menu shows // A boolean pref which determines whether the accessibility menu shows
......
...@@ -45,6 +45,8 @@ ASH_PUBLIC_EXPORT extern const char kAccessibilitySwitchAccessAutoScanEnabled[]; ...@@ -45,6 +45,8 @@ ASH_PUBLIC_EXPORT extern const char kAccessibilitySwitchAccessAutoScanEnabled[];
ASH_PUBLIC_EXPORT extern const char kAccessibilitySwitchAccessAutoScanSpeedMs[]; ASH_PUBLIC_EXPORT extern const char kAccessibilitySwitchAccessAutoScanSpeedMs[];
ASH_PUBLIC_EXPORT extern const char ASH_PUBLIC_EXPORT extern const char
kAccessibilitySwitchAccessAutoScanKeyboardSpeedMs[]; kAccessibilitySwitchAccessAutoScanKeyboardSpeedMs[];
ASH_PUBLIC_EXPORT extern const char
kAccessibilityTabletModeShelfNavigationButtonsEnabled[];
ASH_PUBLIC_EXPORT extern const char kAccessibilityDictationEnabled[]; ASH_PUBLIC_EXPORT extern const char kAccessibilityDictationEnabled[];
ASH_PUBLIC_EXPORT extern const char kShouldAlwaysShowAccessibilityMenu[]; ASH_PUBLIC_EXPORT extern const char kShouldAlwaysShowAccessibilityMenu[];
......
...@@ -81,6 +81,7 @@ class BackButtonTest : public AshTestBase, ...@@ -81,6 +81,7 @@ class BackButtonTest : public AshTestBase,
}; };
enum class TestAccessibilityFeature { enum class TestAccessibilityFeature {
kTabletModeShelfNavigationButtons,
kSpokenFeedback, kSpokenFeedback,
kAutoclick, kAutoclick,
kSwitchAccess kSwitchAccess
...@@ -102,6 +103,11 @@ class BackButtonVisibilityWithAccessibilityFeaturesTest ...@@ -102,6 +103,11 @@ class BackButtonVisibilityWithAccessibilityFeaturesTest
void SetTestA11yFeatureEnabled(bool enabled) { void SetTestA11yFeatureEnabled(bool enabled) {
switch (GetParam()) { switch (GetParam()) {
case TestAccessibilityFeature::kTabletModeShelfNavigationButtons:
Shell::Get()
->accessibility_controller()
->SetTabletModeShelfNavigationButtonsEnabled(enabled);
break;
case TestAccessibilityFeature::kSpokenFeedback: case TestAccessibilityFeature::kSpokenFeedback:
Shell::Get()->accessibility_controller()->SetSpokenFeedbackEnabled( Shell::Get()->accessibility_controller()->SetSpokenFeedbackEnabled(
enabled, A11Y_NOTIFICATION_NONE); enabled, A11Y_NOTIFICATION_NONE);
...@@ -252,9 +258,11 @@ TEST_P(BackButtonTest, NoContextMenuOnBackButton) { ...@@ -252,9 +258,11 @@ TEST_P(BackButtonTest, NoContextMenuOnBackButton) {
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
All, All,
BackButtonVisibilityWithAccessibilityFeaturesTest, BackButtonVisibilityWithAccessibilityFeaturesTest,
::testing::Values(TestAccessibilityFeature::kSpokenFeedback, ::testing::Values(
TestAccessibilityFeature::kAutoclick, TestAccessibilityFeature::kTabletModeShelfNavigationButtons,
TestAccessibilityFeature::kSwitchAccess)); TestAccessibilityFeature::kSpokenFeedback,
TestAccessibilityFeature::kAutoclick,
TestAccessibilityFeature::kSwitchAccess));
TEST_P(BackButtonVisibilityWithAccessibilityFeaturesTest, TEST_P(BackButtonVisibilityWithAccessibilityFeaturesTest,
TabletModeSwitchWithA11yFeatureEnabled) { TabletModeSwitchWithA11yFeatureEnabled) {
......
...@@ -117,6 +117,7 @@ class HomeButtonTest ...@@ -117,6 +117,7 @@ class HomeButtonTest
}; };
enum class TestAccessibilityFeature { enum class TestAccessibilityFeature {
kTabletModeShelfNavigationButtons,
kSpokenFeedback, kSpokenFeedback,
kAutoclick, kAutoclick,
kSwitchAccess kSwitchAccess
...@@ -138,6 +139,11 @@ class HomeButtonVisibilityWithAccessibilityFeaturesTest ...@@ -138,6 +139,11 @@ class HomeButtonVisibilityWithAccessibilityFeaturesTest
void SetTestA11yFeatureEnabled(bool enabled) { void SetTestA11yFeatureEnabled(bool enabled) {
switch (GetParam()) { switch (GetParam()) {
case TestAccessibilityFeature::kTabletModeShelfNavigationButtons:
Shell::Get()
->accessibility_controller()
->SetTabletModeShelfNavigationButtonsEnabled(enabled);
break;
case TestAccessibilityFeature::kSpokenFeedback: case TestAccessibilityFeature::kSpokenFeedback:
Shell::Get()->accessibility_controller()->SetSpokenFeedbackEnabled( Shell::Get()->accessibility_controller()->SetSpokenFeedbackEnabled(
enabled, A11Y_NOTIFICATION_NONE); enabled, A11Y_NOTIFICATION_NONE);
...@@ -579,9 +585,11 @@ TEST_P(HomeButtonTest, ClickOnCornerPixel) { ...@@ -579,9 +585,11 @@ TEST_P(HomeButtonTest, ClickOnCornerPixel) {
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
All, All,
HomeButtonVisibilityWithAccessibilityFeaturesTest, HomeButtonVisibilityWithAccessibilityFeaturesTest,
::testing::Values(TestAccessibilityFeature::kSpokenFeedback, ::testing::Values(
TestAccessibilityFeature::kAutoclick, TestAccessibilityFeature::kTabletModeShelfNavigationButtons,
TestAccessibilityFeature::kSwitchAccess)); TestAccessibilityFeature::kSpokenFeedback,
TestAccessibilityFeature::kAutoclick,
TestAccessibilityFeature::kSwitchAccess));
TEST_P(HomeButtonVisibilityWithAccessibilityFeaturesTest, TEST_P(HomeButtonVisibilityWithAccessibilityFeaturesTest,
TabletModeSwitchWithA11yFeatureEnabled) { TabletModeSwitchWithA11yFeatureEnabled) {
......
...@@ -34,7 +34,9 @@ bool ShelfControlsForcedShownForAccessibility() { ...@@ -34,7 +34,9 @@ bool ShelfControlsForcedShownForAccessibility() {
Shell::Get()->accessibility_controller(); Shell::Get()->accessibility_controller();
return accessibility_controller->spoken_feedback_enabled() || return accessibility_controller->spoken_feedback_enabled() ||
accessibility_controller->autoclick_enabled() || accessibility_controller->autoclick_enabled() ||
accessibility_controller->switch_access_enabled(); accessibility_controller->switch_access_enabled() ||
accessibility_controller
->tablet_mode_shelf_navigation_buttons_enabled();
} }
} // namespace } // namespace
......
...@@ -92,5 +92,13 @@ ...@@ -92,5 +92,13 @@
<message name="IDS_OS_SETTINGS_FILES" desc="Name of the settings page which displays file preferences."> <message name="IDS_OS_SETTINGS_FILES" desc="Name of the settings page which displays file preferences.">
Files Files
</message> </message>
<!-- Accessibility -->
<message name="IDS_SETTINGS_A11Y_TABLET_MODE_SHELF_BUTTONS_LABEL" desc="The name of a setting within accessibility settings that controls whether Chrome OS system shelf navigation buttons (for going back, home, or to overview) should be shown when the device is in tablet mode.">
Show navigation buttons
</message>
<message name="IDS_SETTINGS_A11Y_TABLET_MODE_SHELF_BUTTONS_DESCRIPTION" desc="The description for the setting within accessibility settings that controls whether Chrome OS system shelf navigation buttons should be shown when the device is in tablet mode. The buttons whose visibility the setting controls are the button to go home (to launcher), the button to go back, and the button to go to overview.">
Show Launcher, Back, Overview buttons in Shelf in tablet mode. Turned on when ChromeVox (spoken feedback) or Switch Access is enabled.
</message>
</if> </if>
</grit-part> </grit-part>
6adb18106f0beefa3fca77dcba3011c63949b4c1
\ No newline at end of file
45e1d0ad17eb75101baff6da94a04bed33946b92
\ No newline at end of file
...@@ -420,6 +420,9 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelistedKeys() { ...@@ -420,6 +420,9 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelistedKeys() {
settings_api::PrefType::PREF_TYPE_BOOLEAN; settings_api::PrefType::PREF_TYPE_BOOLEAN;
(*s_whitelist)[ash::prefs::kAccessibilitySwitchAccessAutoScanSpeedMs] = (*s_whitelist)[ash::prefs::kAccessibilitySwitchAccessAutoScanSpeedMs] =
settings_api::PrefType::PREF_TYPE_NUMBER; settings_api::PrefType::PREF_TYPE_NUMBER;
(*s_whitelist)
[ash::prefs::kAccessibilityTabletModeShelfNavigationButtonsEnabled] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
(*s_whitelist) (*s_whitelist)
[ash::prefs::kAccessibilitySwitchAccessAutoScanKeyboardSpeedMs] = [ash::prefs::kAccessibilitySwitchAccessAutoScanKeyboardSpeedMs] =
settings_api::PrefType::PREF_TYPE_NUMBER; settings_api::PrefType::PREF_TYPE_NUMBER;
......
...@@ -232,6 +232,23 @@ ...@@ -232,6 +232,23 @@
sub-label="$i18n{mouseSettingsDescription}" sub-label="$i18n{mouseSettingsDescription}"
role-description="$i18n{subpageArrowRoleDescription}" embedded> role-description="$i18n{subpageArrowRoleDescription}" embedded>
</cr-link-row> </cr-link-row>
<!-- If shelf navigation buttons are implicitly enabled by other a11y
settings (e.g. by spoken feedback), the toggle control should be
disabled, and toggled regardless of the actual backing pref value. To
handle effective pref value changes, wrap the backing pref in a private
property, which changes to a stub pref object when the setting is
implicitly enabled. -->
<settings-toggle-button
id="shelfNavigationButtonsEnabledControl"
hidden$="[[!showShelfNavigationButtonsSettings_]]"
disabled="[[shelfNavigationButtonsImplicitlyEnabled_]]"
pref="[[shelfNavigationButtonsPref_]]"
no-set-pref
on-settings-boolean-control-change=
"updateShelfNavigationButtonsEnabledPref_"
label="$i18n{tabletModeShelfNavigationButtonsSettingLabel}"
sub-label="$i18n{tabletModeShelfNavigationButtonsSettingDescription}">
</settings-toggle-button>
<h2>$i18n{audioAndCaptionsHeading}</h2> <h2>$i18n{audioAndCaptionsHeading}</h2>
<cr-link-row id="captionsSubpageButton" class="first" <cr-link-row id="captionsSubpageButton" class="first"
......
...@@ -106,6 +106,19 @@ Polymer({ ...@@ -106,6 +106,19 @@ Polymer({
}, },
}, },
/**
* Whether a setting for enabling shelf navigation buttons in tablet mode
* should be displayed in the accessibility settings.
* @private
*/
showShelfNavigationButtonsSettings_: {
type: Boolean,
value() {
return loadTimeData.getBoolean(
'showTabletModeShelfNavigationButtonsSettings');
},
},
/** @private */ /** @private */
isGuest_: { isGuest_: {
type: Boolean, type: Boolean,
...@@ -126,6 +139,34 @@ Polymer({ ...@@ -126,6 +139,34 @@ Polymer({
/** @private */ /** @private */
hasTouchpad_: Boolean, hasTouchpad_: Boolean,
/**
* Boolean indicating whether shelf navigation buttons should implicitly be
* enabled in tablet mode - the navigation buttons are implicitly enabled
* when spoken feedback, automatic clicks, or switch access are enabled.
* The buttons can also be explicitly enabled by a designated a11y setting.
* @private
*/
shelfNavigationButtonsImplicitlyEnabled_: {
type: Boolean,
computed: 'computeShelfNavigationButtonsImplicitlyEnabled_(' +
'prefs.settings.accessibility.value,' +
'prefs.settings.a11y.autoclick.value,' +
'prefs.settings.a11y.switch_access.enabled.value)',
},
/**
* The effective pref value that indicates whether shelf navigation buttons
* are enabled in tablet mode.
* @type {chrome.settingsPrivate.PrefObject}
* @private
*/
shelfNavigationButtonsPref_: {
type: Object,
computed: 'getShelfNavigationButtonsEnabledPref_(' +
'shelfNavigationButtonsImplicitlyEnabled_,' +
'prefs.settings.a11y.tablet_mode_shelf_nav_buttons_enabled)',
},
}, },
observers: [ observers: [
...@@ -258,6 +299,65 @@ Polymer({ ...@@ -258,6 +299,65 @@ Polymer({
/* dynamicParams */ null, /* removeSearch */ true); /* dynamicParams */ null, /* removeSearch */ true);
}, },
/**
* @return {boolean} Whether shelf navigation buttons should implicitly be
* enabled in tablet mode (due to accessibility settings different than
* shelf_navigation_buttons_enabled_in_tablet_mode).
* @private
*/
computeShelfNavigationButtonsImplicitlyEnabled_() {
/**
* Gets the bool pref value for the provided pref key.
* @param {string} key
* @return {boolean}
*/
const getBoolPrefValue = (key) => {
const pref = /** @type {chrome.settingsPrivate.PrefObject} */ (
this.get(key, this.prefs));
return pref && !!pref.value;
};
return getBoolPrefValue('settings.accessibility') ||
getBoolPrefValue('settings.a11y.autoclick') ||
getBoolPrefValue('settings.a11y.switch_access.enabled');
},
/**
* Calculates the effective value for "shelf navigation buttons enabled in
* tablet mode" setting - if the setting is implicitly enabled (by other a11y
* settings), this will return a stub pref value.
* @private
* @return {chrome.settingsPrivate.PrefObject}
*/
getShelfNavigationButtonsEnabledPref_() {
if (this.shelfNavigationButtonsImplicitlyEnabled_) {
return /** @type {!chrome.settingsPrivate.PrefObject}*/ ({
value: true,
type: chrome.settingsPrivate.PrefType.BOOLEAN,
key: ''
});
}
return /** @type {chrome.settingsPrivate.PrefObject} */ (this.get(
'settings.a11y.tablet_mode_shelf_nav_buttons_enabled', this.prefs));
},
/**
* Handles the <code>tablet_mode_shelf_nav_buttons_enabled</code> setting's
* toggle changes. It updates the backing pref value, unless the setting is
* implicitly enabled.
* @private
*/
updateShelfNavigationButtonsEnabledPref_() {
if (this.shelfNavigationButtonsImplicitlyEnabled_) {
return;
}
this.set(
'prefs.settings.a11y.tablet_mode_shelf_nav_buttons_enabled.value',
this.$.shelfNavigationButtonsEnabledControl.checked);
},
/** @private */ /** @private */
onMouseTap_() { onMouseTap_() {
settings.Router.getInstance().navigateTo( settings.Router.getInstance().navigateTo(
......
...@@ -309,6 +309,10 @@ void AddA11yStrings(content::WebUIDataSource* html_source) { ...@@ -309,6 +309,10 @@ void AddA11yStrings(content::WebUIDataSource* html_source) {
{"textToSpeechPreviewVoice", IDS_SETTINGS_TEXT_TO_SPEECH_PREVIEW_VOICE}, {"textToSpeechPreviewVoice", IDS_SETTINGS_TEXT_TO_SPEECH_PREVIEW_VOICE},
{"textToSpeechPreviewPlay", IDS_SETTINGS_TEXT_TO_SPEECH_PREVIEW_PLAY}, {"textToSpeechPreviewPlay", IDS_SETTINGS_TEXT_TO_SPEECH_PREVIEW_PLAY},
{"textToSpeechEngines", IDS_SETTINGS_TEXT_TO_SPEECH_ENGINES}, {"textToSpeechEngines", IDS_SETTINGS_TEXT_TO_SPEECH_ENGINES},
{"tabletModeShelfNavigationButtonsSettingLabel",
IDS_SETTINGS_A11Y_TABLET_MODE_SHELF_BUTTONS_LABEL},
{"tabletModeShelfNavigationButtonsSettingDescription",
IDS_SETTINGS_A11Y_TABLET_MODE_SHELF_BUTTONS_DESCRIPTION},
}; };
AddLocalizedStringsBulk(html_source, kLocalizedStrings); AddLocalizedStringsBulk(html_source, kLocalizedStrings);
...@@ -331,6 +335,10 @@ void AddA11yStrings(content::WebUIDataSource* html_source) { ...@@ -331,6 +335,10 @@ void AddA11yStrings(content::WebUIDataSource* html_source) {
base::FeatureList::IsEnabled( base::FeatureList::IsEnabled(
::features::kExperimentalAccessibilityLabels)); ::features::kExperimentalAccessibilityLabels));
html_source->AddBoolean(
"showTabletModeShelfNavigationButtonsSettings",
ash::features::IsHideShelfControlsInTabletModeEnabled());
html_source->AddBoolean("enableLiveCaption", html_source->AddBoolean("enableLiveCaption",
base::FeatureList::IsEnabled(media::kLiveCaption)); base::FeatureList::IsEnabled(media::kLiveCaption));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment