summaryrefslogtreecommitdiffstats
path: root/views/controls/menu/menu_controller.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/menu/menu_controller.cc')
-rw-r--r--views/controls/menu/menu_controller.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc
index af43934..ae099f7 100644
--- a/views/controls/menu/menu_controller.cc
+++ b/views/controls/menu/menu_controller.cc
@@ -244,6 +244,9 @@ MenuItemView* MenuController::Run(gfx::NativeWindow parent,
owner_ = parent;
+ if (button)
+ button->NotifyAccessibilityEvent(AccessibilityTypes::EVENT_MENUPOPUPSTART);
+
// Set the selection, which opens the initial menu.
SetSelection(root, true, true);
@@ -370,6 +373,17 @@ void MenuController::SetSelection(MenuItemView* menu_item,
CommitPendingSelection();
else
StartShowTimer();
+
+ // Notify an accessibility focus event on all menu items except for the root.
+ if (menu_item &&
+ (MenuDepth(menu_item) != 1 ||
+ menu_item->GetType() != MenuItemView::SUBMENU))
+ menu_item->NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS);
+
+ if (menu_button_ && !menu_item && exit_type_ != EXIT_DESTROYED) {
+ menu_button_->
+ NotifyAccessibilityEvent(AccessibilityTypes::EVENT_MENUPOPUPEND);
+ }
}
void MenuController::Cancel(ExitType type) {