Commit 3a677235 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fire a11y alert on smart card login failure

Trigger the a11y alert that reads the "Couldn’t recognize your smart
card" message when the challenge-response login (a.k.a. smart card
login) fails.

Bug: 1004449
Test: add a smart card user onto Chromebook, remove the smart card, enable screen reader, click "Start" ("->"), check that "Couldn’t recognize your smart card" is read
Change-Id: Iea19f5d8a3dd00adb1729d4c32879e1d3678890a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2022952Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735519}
parent a3a0e04b
......@@ -612,6 +612,11 @@ class LoginAuthUserView::ChallengeResponseView : public views::View,
icon_->SetImage(GetImageForIcon());
label_->SetText(GetTextForLabel());
if (state == State::kFailure) {
label_->NotifyAccessibilityEvent(ax::mojom::Event::kAlert,
/*send_native_event=*/true);
}
Layout();
}
......
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