Commit a26ef5c8 authored by Aga Wronska's avatar Aga Wronska Committed by Commit Bot

a11y: Add accessible names to image buttons on ParentAccessView

Bug: 938655
Test: manually
Change-Id: I77a713e84a9fbd8b73470234e39f9a416c1cad4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504952Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
Commit-Queue: Aga Wronska <agawronska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638230}
parent 2055fe42
......@@ -1478,9 +1478,12 @@ This file contains the strings for ash.
<message name="IDS_ASH_LOGIN_POD_PASSWORD_FIELD_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the password field of a user pod on the sign-in screen.">
Password for <ph name="USER_EMAIL_ADDRESS">$1<ex>john.doe@example.com</ex></ph>
</message>
<message name="IDS_ASH_LOGIN_POD_SUBMIT_BUTTON_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the submit button of a user pod on the sign-in screen.">
<message name="IDS_ASH_LOGIN_SUBMIT_BUTTON_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the submit button on login screen.">
Submit
</message>
<message name="IDS_ASH_LOGIN_BACK_BUTTON_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the back button on login screen.">
Back
</message>
<message name="IDS_ASH_PIN_KEYBOARD_DELETE_ACCESSIBLE_NAME" desc="Text to be spoken when the focus is set to the delete button of the PIN keyboard.">
Delete
</message>
......
fde0a162eeeabdfc24cd099bc8344009d5c84899
\ No newline at end of file
14918f91cb08b4b56bad8a64e307d0f4d0f4012e
\ No newline at end of file
......@@ -404,8 +404,8 @@ LoginPasswordView::LoginPasswordView() {
kLockScreenArrowIcon, kSubmitButtonSizeDp,
SkColorSetA(login_constants::kButtonEnabledColor,
login_constants::kButtonDisabledAlpha)));
submit_button_->SetAccessibleName(l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_POD_SUBMIT_BUTTON_ACCESSIBLE_NAME));
submit_button_->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_SUBMIT_BUTTON_ACCESSIBLE_NAME));
password_row_->AddChildView(submit_button_);
// Separator on bottom.
......
......@@ -356,6 +356,8 @@ ParentAccessView::ParentAccessView(const AccountId& account_id,
kArrowSizeDp, SK_ColorWHITE));
back_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
views::ImageButton::ALIGN_MIDDLE);
back_button_->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_BACK_BUTTON_ACCESSIBLE_NAME));
header->AddChildView(back_button_);
// Main view icon.
......@@ -461,6 +463,8 @@ ParentAccessView::ParentAccessView(const AccountId& account_id,
submit_button_->SetPreferredSize(
gfx::Size(kArrowButtonSizeDp, kArrowButtonSizeDp));
submit_button_->SetEnabled(false);
submit_button_->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_SUBMIT_BUTTON_ACCESSIBLE_NAME));
footer->AddChildView(submit_button_);
add_spacer(kSubmitButtonBottomMarginDp);
......
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