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

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

Issue 2980713002: Views a11y: Obey DialogDelegate::GetAccessibleWindowRole() rather than making a dialog-within-a-dia… (Closed)
Patch Set: Fix test Created 3 years, 5 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_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index 8ce99c3368fe05d20bc4302ac2b816404c66d2cb..b335b5bfc5d30afb3468940bb64d092fa9c0cbf1 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -310,10 +310,8 @@ void BubbleDialogDelegateView::HandleVisibilityChanged(Widget* widget,
// than just its title and initially focused view. See
// http://crbug.com/474622 for details.
if (widget == GetWidget() && visible) {
- ui::AXNodeData node_data;
- GetAccessibleNodeData(&node_data);
- if (node_data.role == ui::AX_ROLE_ALERT_DIALOG)
- NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
+ if (GetAccessibleWindowRole() == ui::AX_ROLE_ALERT_DIALOG)
+ widget->GetRootView()->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
}
}

Powered by Google App Engine
This is Rietveld 408576698