WebUI: Use role="alert" from within cr-input for better a11y.
The IronA11Announcer approach does not work when a modal dialog is showing. A large number of cr-input instances reside within modal dialogs, and errors do not get announced to screen reader users. By using role="alert" the error gets announced, even when the cr-input resides in a modal dialog. Moreover, VoiceOver seems to not announce the same error text, even if the cr-input transitions from invalid->valid->invalid. A workaround has been employed to always removing role="alert" when the error is fixed and re-adding it when the error re-occurs which forces VoiceOver to always announce it. Bug: 1130778 Change-Id: I646e25814f4719fb1a39d206e0c970a8bb75aae9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429943 Commit-Queue: dpapad <dpapad@chromium.org> Auto-Submit: dpapad <dpapad@chromium.org> Reviewed-by:John Lee <johntlee@chromium.org> Cr-Commit-Position: refs/heads/master@{#811352}
Showing
Please register or sign in to comment