Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: ui/views/bubble/bubble_delegate.cc

Issue 1055883002: Fire an alert event to notify accessibility when a permissions bubble gets shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index 55ce980289149c322219d60e35222009d4ee8614..a2070c0bb21fb67ee271d5b911d5623a6f7e1271 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -305,6 +305,13 @@ void BubbleDelegateView::HandleVisibilityChanged(Widget* widget, bool visible) {
else
anchor_widget()->GetTopLevelWidget()->EnableInactiveRendering();
}
+
+ if (widget == GetWidget() && visible) {
+ ui::AXViewState state;
+ GetAccessibleState(&state);
+ if (state.role == ui::AX_ROLE_ALERT_DIALOG)
msw 2015/04/06 23:01:20 Why did you add this condition? Why can't all bubb
David Tseng 2015/04/06 23:34:02 Sorry; I should have pinged you on the changes her
msw 2015/04/07 00:18:22 What actually toggles the ChromeVox behavior betwe
David Tseng 2015/04/07 16:58:06 Currently, just the alert event.
+ NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
+ }
}
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698