Commit aa0d6a75 authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Unity][Android] Add TalkBack text to SyncAndServicesPreferences

This CL adds an accessibility text to SyncAndServicesPreferences that is
only used when this screen is opened from the sign-in screen.

Bug: 924359
Change-Id: I721a8e3c0c333f224a48e05f10ce67cd24dd2164
Reviewed-on: https://chromium-review.googlesource.com/c/1474667
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635620}
parent d4500763
......@@ -20,7 +20,9 @@ import android.preference.PreferenceGroup;
import android.provider.Settings;
import android.support.annotation.IntDef;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.content.res.AppCompatResources;
import android.view.LayoutInflater;
import android.view.Menu;
......@@ -150,6 +152,12 @@ public class SyncAndServicesPreferences extends PreferenceFragment
getActivity().setTitle(R.string.prefs_sync_and_services);
setHasOptionsMenu(true);
if (mIsFromSigninScreen) {
ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
assert actionBar != null;
actionBar.setHomeActionContentDescription(
R.string.prefs_sync_and_services_content_description);
}
PreferenceUtils.addPreferencesFromResource(this, R.xml.sync_and_services_preferences);
......@@ -282,6 +290,11 @@ public class SyncAndServicesPreferences extends PreferenceFragment
bottomBarShadow.setVisibility(View.GONE);
View bottomBarButtonContainer = getView().findViewById(R.id.bottom_bar_button_container);
bottomBarButtonContainer.setVisibility(View.GONE);
ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
assert actionBar != null;
// Content description was overridden in onCreate, reset it to the standard one.
actionBar.setHomeActionContentDescription(null);
}
@Override
......
......@@ -321,6 +321,9 @@ CHAR-LIMIT guidelines:
<message name="IDS_PREFS_SYNC_AND_SERVICES" desc="Title for Settings section to manage data collection for Sync and Google services. [CHAR-LIMIT=40]">
Sync and Google services
</message>
<message name="IDS_PREFS_SYNC_AND_SERVICES_CONTENT_DESCRIPTION" desc="The accessibility text to read when the 'Sync and Google services' Settings page is opened from the sign-in page. This text is attached to the 'Navigate Up' button shown at the top of the screen. The first two sentences describe the screen that is currently shown to the user, while 'Navigate up' is a description for the button this text is attached to. 'Navigate up' should match TC ID 6794660482873516081.">
You are currently customizing your Sync and Google service settings. To finish turning on sync, tap the Confirm button near the bottom of the screen. Navigate up
</message>
<message name="IDS_SIGN_IN_TO_CHROME_SUMMARY" desc="Summary for the button to sign in to Chrome, explaining benefits of signing in.">
Sign in to get your bookmarks, history, passwords, and other settings on all your devices
</message>
......
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