Use display reason to decide accessible role for location bar bubbles.
Bubbles that extend LocationBarBubbleDelegateView have the member function ShowForReason, which may show them in an inactive way when they are not displayed as a result of direct user action. Bubbles displayed in an active way would get focus and ATs would immediately read them, so their role would be a dialog. Likewise, bubbles that show inactive would not get focus and we need them to behave like alert dialogs so ATs can announce them properly. This fixes several bugs: * crbug.com/1119367: the save credit card bubble was not announced because it didn't have the alert dialog role. * crbug.com/1119734: the translate page bubble was not announced because it didn't have the alert dialog role. * crbug.com/1132318: the password bubble was read twice because it was getting focus in addition to sending an alert event. properly announce save credit card bubble, properly announce translate page bubble. Bug: 1119367, 1119734, 1132318 Change-Id: I1c46d65ec2a47a25947f6a75a8935595d974bfa1 AX-relnotes: Do not read password bubble twice when explictly opened, Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431526Reviewed-by:Allen Bauer <kylixrd@chromium.org> Commit-Queue: Jacobo Aragunde Pérez <jaragunde@igalia.com> Cr-Commit-Position: refs/heads/master@{#815038}
Showing
Please register or sign in to comment