Fix focus lost after wrong PIN in SAML smart card
Fix the a11y regression introduced in https://crrev.com/c/2030411, which was that the focus was lost after the wrong PIN is entered. The problem was caused by the fact that the whole PIN dialog, including the input field, gets hidden while showing the "progress bar" animation during PIN verification. The focus on the input field becomes lost when it's hidden, and it's not restored automatically when it's re-shown again. The fix is to programmatically set the focus every time the PIN dialog is updated, so that this happens after the PIN verification completes too. Note that this is done unconditionally, so that entering a wrong PIN is guaranteed to trigger the a11y event with the error message for the user. Bug: 1016839 Test: start smart card SAML login, enter wrong PIN, check that the focus stays on PIN input after the progress bar animation stops Change-Id: I6a712c79eedc961f7da26dacfbb6f3df5db01396 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087920Reviewed-by:Denis Kuznetsov [CET] <antrim@chromium.org> Commit-Queue: Maksim Ivanov <emaxx@chromium.org> Cr-Commit-Position: refs/heads/master@{#748573}
Showing
Please register or sign in to comment