Commit 13bf68e3 authored by Guido Trotter's avatar Guido Trotter Committed by Commit Bot

[CrOS] OAC: change dropdown accessible message on lock screen

The dropdown accessible message currently says "Open remove dialog
for..." but this is not the case when the account can't be removed (e.g.
on the lock screen). This commit calls it an "info dialog" in such case.
Signed-off-by: default avatarGuido Trotter <ultrotter@chromium.org>
Bug: 901427
Change-Id: I57e7f537e76ee9219ffd98e6a68666fbc42cb701
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2540593Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatarThomas Tellier <tellier@google.com>
Cr-Commit-Position: refs/heads/master@{#828169}
parent 599af13d
......@@ -2328,9 +2328,12 @@ This file contains the strings for ash.
<message name="IDS_ASH_LOGIN_POD_REMOVE_ACCOUNT_DIALOG_ACCESSIBLE_DESCRIPTION" desc="Text to be spoken to describe a way to close the dialog.">
Press escape to close
</message>
<message name="IDS_ASH_LOGIN_POD_REMOVE_ACCOUNT_DIALOG_BUTTON_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the button that opens the remove account dialog for a given user.">
<message name="IDS_ASH_LOGIN_POD_REMOVE_ACCOUNT_DIALOG_BUTTON_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the button that opens the info dialog for a given user, when the option to also remove the account is present, e.g. on the login screen.">
Open remove dialog for <ph name="USER_EMAIL_ADDRESS">$1<ex>john.doe@example.com</ex></ph>
</message>
<message name="IDS_ASH_LOGIN_POD_ACCOUNT_DIALOG_BUTTON_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the button that opens the account info dialog for a given user, when the remove option is not present, e.g. on the lock screen.">
Open info dialog for <ph name="USER_EMAIL_ADDRESS">$1<ex>john.doe@example.com</ex></ph>
</message>
<message name="IDS_ASH_LOGIN_PUBLIC_ACCOUNT_MONITORING_WARNING" desc="Template for text shown in the public account user pod, informing the user that this is a public, managed account.">
The device admin may monitor your browsing activity.
</message>
......
4584517669ee8b6bae4cf324180ea8e7c6a21596
\ No newline at end of file
......@@ -606,8 +606,14 @@ void LoginUserView::UpdateCurrentUserState() {
}
tap_button_->SetAccessibleName(accessible_name);
if (dropdown_) {
dropdown_->SetAccessibleName(l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_POD_REMOVE_ACCOUNT_DIALOG_BUTTON_ACCESSIBLE_NAME, email));
// The accessible name for the dropdown depends on whether it also contains
// the remove user button for the user in question.
accessible_name = l10n_util::GetStringFUTF16(
current_user_.can_remove
? IDS_ASH_LOGIN_POD_REMOVE_ACCOUNT_DIALOG_BUTTON_ACCESSIBLE_NAME
: IDS_ASH_LOGIN_POD_ACCOUNT_DIALOG_BUTTON_ACCESSIBLE_NAME,
email);
dropdown_->SetAccessibleName(accessible_name);
}
user_image_->UpdateForUser(current_user_);
......
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