Commit 7348a08b authored by Alex Ilin's avatar Alex Ilin Committed by Chromium LUCI CQ

[ProfilePicker] Improve the a11y label on the profile button

The label should say "Open [profile name] profile" instead of the less
clear "[profile name]".

Bug: 1157770
Change-Id: Ief1ceccc1b074b87342cd6b0e19d6ac8d14c7e47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2621753
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842203}
parent 2762d3ef
......@@ -716,6 +716,9 @@
<message name="IDS_PROFILE_PICKER_PROFILE_CARD_NEEDS_SIGNIN_PROMPT" desc="Text on the profile card signaling that the user must sign-in in order to open a profile">
Sign in
</message>
<message name="IDS_PROFILE_PICKER_PROFILE_CARD_LABEL" desc="Label for a profile card button that opens a new profile">
Open <ph name="PROFILE_NAME">$1<ex>User</ex></ph> profile
</message>
<message name="IDS_PROFILE_PICKER_PROFILE_MENU_BUTTON_NAME" desc="Text to be spoken when the focus is set to the menu button of the profile card on the picker main screen or shown on hover.">
Customize your profile, including its name
</message>
......
eea50f2911664882a4492bf72f588a4821c18315
\ No newline at end of file
......@@ -213,6 +213,7 @@ js_library("profile_card") {
":profile_card_menu",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_elements/cr_button:cr_button.m",
"//ui/webui/resources/js:i18n_behavior.m",
]
}
......
......@@ -135,7 +135,7 @@
<div id="profileCardContainer">
<cr-button on-click="onProfileClick_"
aria-label="[[profileState.localProfileName]]">
aria-label="[[i18n('profileCardButtonLabel', profileState.localProfileName)]]">
<div id="avatarContainer">
<img class="profile-avatar" alt="" src="[[profileState.avatarIcon]]">
<div id="iconContainer" hidden="[[!profileState.isManaged]]">
......
......@@ -8,7 +8,9 @@ import './profile_card_menu.js';
import './profile_picker_shared_css.js';
import 'chrome://resources/cr_elements/cr_input/cr_input.m.js';
import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js';
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {ManageProfilesBrowserProxy, ManageProfilesBrowserProxyImpl, ProfileState} from './manage_profiles_browser_proxy.js';
Polymer({
......@@ -16,6 +18,8 @@ Polymer({
_template: html`{__html_template__}`,
behaviors: [I18nBehavior],
properties: {
/** @type {!ProfileState} */
profileState: {
......
......@@ -80,6 +80,7 @@ void AddStrings(content::WebUIDataSource* html_source) {
{"browseAsGuestButton", IDS_PROFILE_PICKER_BROWSE_AS_GUEST_BUTTON},
{"needsSigninPrompt",
IDS_PROFILE_PICKER_PROFILE_CARD_NEEDS_SIGNIN_PROMPT},
{"profileCardButtonLabel", IDS_PROFILE_PICKER_PROFILE_CARD_LABEL},
{"menu", IDS_MENU},
{"profileMenuName", IDS_PROFILE_PICKER_PROFILE_MENU_BUTTON_NAME},
{"profileMenuRemoveText", IDS_PROFILE_PICKER_PROFILE_MENU_REMOVE_TEXT},
......
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