Commit 41b76ab8 authored by Josiah K's avatar Josiah K Committed by Chromium LUCI CQ

[Magnifier] Gate focus following toggle behind feature flag

Gate "Zoomed in screen follows keyboard focus" toggle in Chrome OS Accessibility settings behind feature flag MagnifierPanningImprovements. (following crbug.com/1144947, hide toggle in M89)

Feature off: https://screenshot.googleplex.com/8wTtrRRQCC4XNx5
Feature on: https://screenshot.googleplex.com/7RaUNBhcpQsgBeC

AX-Relnotes: N/A.
Fixed: 1165650
Change-Id: I8286f977a6099cdc31e82b536d09e5c291aac637
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622716
Auto-Submit: Josiah Krutz <josiahk@google.com>
Commit-Queue: Jimmy Gong <jimmyxgong@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarJimmy Gong <jimmyxgong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842681}
parent 60b1088e
...@@ -96,15 +96,17 @@ ...@@ -96,15 +96,17 @@
deep-link-focus-id$="[[Setting.kFullscreenMagnifier]]"> deep-link-focus-id$="[[Setting.kFullscreenMagnifier]]">
</settings-toggle-button> </settings-toggle-button>
<template is="dom-if" if="[[prefs.settings.a11y.screen_magnifier.value]]"> <template is="dom-if" if="[[prefs.settings.a11y.screen_magnifier.value]]">
<div class="sub-item"> <template is="dom-if" if="[[isMagnifierPanningImprovementsEnabled_]]">
<settings-toggle-button <div class="sub-item">
class="sub-item" <settings-toggle-button
pref="{{prefs.settings.a11y.screen_magnifier_focus_following}}" class="sub-item"
label="$i18n{screenMagnifierFocusFollowingLabel}" pref="{{prefs.settings.a11y.screen_magnifier_focus_following}}"
deep-link-focus-id$= label="$i18n{screenMagnifierFocusFollowingLabel}"
"[[Setting.kFullscreenMagnifierFocusFollowing]]"> deep-link-focus-id$=
</settings-toggle-button> "[[Setting.kFullscreenMagnifierFocusFollowing]]">
</div> </settings-toggle-button>
</div>
</template>
<div class="settings-box continuation"> <div class="settings-box continuation">
<div class="start sub-item settings-box-text" aria-hidden="true"> <div class="start sub-item settings-box-text" aria-hidden="true">
$i18n{screenMagnifierZoomLabel} $i18n{screenMagnifierZoomLabel}
......
...@@ -158,6 +158,14 @@ Polymer({ ...@@ -158,6 +158,14 @@ Polymer({
}, },
}, },
/** @private */
isMagnifierPanningImprovementsEnabled_: {
type: Boolean,
value() {
return loadTimeData.getBoolean('isMagnifierPanningImprovementsEnabled');
},
},
/** /**
* Whether the user is in kiosk mode. * Whether the user is in kiosk mode.
* @private * @private
......
...@@ -196,12 +196,6 @@ const std::vector<SearchConcept>& GetA11ySearchConcepts() { ...@@ -196,12 +196,6 @@ const std::vector<SearchConcept>& GetA11ySearchConcepts() {
mojom::SearchResultDefaultRank::kMedium, mojom::SearchResultDefaultRank::kMedium,
mojom::SearchResultType::kSetting, mojom::SearchResultType::kSetting,
{.setting = mojom::Setting::kFullscreenMagnifier}}, {.setting = mojom::Setting::kFullscreenMagnifier}},
{IDS_OS_SETTINGS_TAG_A11Y_FULLSCREEN_MAGNIFIER_FOCUS_FOLLOWING,
mojom::kManageAccessibilitySubpagePath,
mojom::SearchResultIcon::kA11y,
mojom::SearchResultDefaultRank::kMedium,
mojom::SearchResultType::kSetting,
{.setting = mojom::Setting::kFullscreenMagnifierFocusFollowing}},
{IDS_OS_SETTINGS_TAG_A11Y_ENABLE_SWITCH_ACCESS, {IDS_OS_SETTINGS_TAG_A11Y_ENABLE_SWITCH_ACCESS,
mojom::kManageAccessibilitySubpagePath, mojom::kManageAccessibilitySubpagePath,
mojom::SearchResultIcon::kA11y, mojom::SearchResultIcon::kA11y,
...@@ -321,6 +315,19 @@ const std::vector<SearchConcept>& GetA11yCursorColorSearchConcepts() { ...@@ -321,6 +315,19 @@ const std::vector<SearchConcept>& GetA11yCursorColorSearchConcepts() {
return *tags; return *tags;
} }
const std::vector<SearchConcept>&
GetA11yFullscreenMagnifierFocusFollowingSearchConcepts() {
static const base::NoDestructor<std::vector<SearchConcept>> tags({
{IDS_OS_SETTINGS_TAG_A11Y_FULLSCREEN_MAGNIFIER_FOCUS_FOLLOWING,
mojom::kManageAccessibilitySubpagePath,
mojom::SearchResultIcon::kA11y,
mojom::SearchResultDefaultRank::kMedium,
mojom::SearchResultType::kSetting,
{.setting = mojom::Setting::kFullscreenMagnifierFocusFollowing}},
});
return *tags;
}
bool AreExperimentalA11yLabelsAllowed() { bool AreExperimentalA11yLabelsAllowed() {
return base::FeatureList::IsEnabled( return base::FeatureList::IsEnabled(
::features::kExperimentalAccessibilityLabels); ::features::kExperimentalAccessibilityLabels);
...@@ -334,6 +341,10 @@ bool IsCursorColorAllowed() { ...@@ -334,6 +341,10 @@ bool IsCursorColorAllowed() {
return features::IsAccessibilityCursorColorEnabled(); return features::IsAccessibilityCursorColorEnabled();
} }
bool IsMagnifierPanningImprovementsEnabled() {
return features::IsMagnifierPanningImprovementsEnabled();
}
bool IsSwitchAccessTextAllowed() { bool IsSwitchAccessTextAllowed() {
return base::CommandLine::ForCurrentProcess()->HasSwitch( return base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableExperimentalAccessibilitySwitchAccessText); ::switches::kEnableExperimentalAccessibilitySwitchAccessText);
...@@ -644,6 +655,9 @@ void AccessibilitySection::AddLoadTimeData( ...@@ -644,6 +655,9 @@ void AccessibilitySection::AddLoadTimeData(
html_source->AddBoolean("showExperimentalAccessibilityCursorColor", html_source->AddBoolean("showExperimentalAccessibilityCursorColor",
IsCursorColorAllowed()); IsCursorColorAllowed());
html_source->AddBoolean("isMagnifierPanningImprovementsEnabled",
IsMagnifierPanningImprovementsEnabled());
::settings::AddCaptionSubpageStrings(html_source); ::settings::AddCaptionSubpageStrings(html_source);
} }
...@@ -831,6 +845,14 @@ void AccessibilitySection::UpdateSearchTags() { ...@@ -831,6 +845,14 @@ void AccessibilitySection::UpdateSearchTags() {
updater.RemoveSearchTags(GetA11yCursorColorSearchConcepts()); updater.RemoveSearchTags(GetA11yCursorColorSearchConcepts());
} }
if (IsMagnifierPanningImprovementsEnabled()) {
updater.AddSearchTags(
GetA11yFullscreenMagnifierFocusFollowingSearchConcepts());
} else {
updater.RemoveSearchTags(
GetA11yFullscreenMagnifierFocusFollowingSearchConcepts());
}
if (!pref_service_->GetBoolean( if (!pref_service_->GetBoolean(
ash::prefs::kAccessibilitySwitchAccessEnabled)) { ash::prefs::kAccessibilitySwitchAccessEnabled)) {
return; return;
......
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