Index: ui/views/window/dialog_delegate.cc |
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc |
index 1627a8f2272c898457819b4b22237ff01646ff48..a450bb40e760d3b6fee5fc41e9280b1fd4d892ef 100644 |
--- a/ui/views/window/dialog_delegate.cc |
+++ b/ui/views/window/dialog_delegate.cc |
@@ -5,6 +5,7 @@ |
#include "ui/views/window/dialog_delegate.h" |
#include "base/logging.h" |
+#include "ui/accessibility/ax_view_state.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/strings/grit/ui_strings.h" |
#include "ui/views/bubble/bubble_border.h" |
@@ -238,4 +239,15 @@ View* DialogDelegateView::GetContentsView() { |
return this; |
} |
+void DialogDelegateView::GetAccessibleState(ui::AXViewState* state) { |
+ state->name = GetDialogTitle(); |
+ state->role = ui::AX_ROLE_DIALOG; |
+} |
+ |
+void DialogDelegateView::ViewHierarchyChanged( |
+ const ViewHierarchyChangedDetails& details) { |
+ if (details.is_add && details.child == this) |
sky
2014/10/31 02:33:05
I think you should verify you're in a widget here
sashab
2014/10/31 02:56:47
Good call. Added to the if-statement.
|
+ NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
+} |
+ |
} // namespace views |