diff options
4 files changed, 19 insertions, 2 deletions
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc index 2670ee1..a00d233 100644 --- a/content/browser/accessibility/browser_accessibility_manager_win.cc +++ b/content/browser/accessibility/browser_accessibility_manager_win.cc @@ -106,6 +106,9 @@ void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent( case AccessibilityNotificationAlert: event_id = EVENT_SYSTEM_ALERT; break; + case AccessibilityNotificationMenuListItemSelected: + event_id = EVENT_OBJECT_FOCUS; + break; case AccessibilityNotificationMenuListValueChanged: event_id = EVENT_OBJECT_VALUECHANGE; break; diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc index 4f53ecc..8d38e01 100644 --- a/content/browser/accessibility/browser_accessibility_win.cc +++ b/content/browser/accessibility/browser_accessibility_win.cc @@ -3214,11 +3214,18 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_role_ = ROLE_SYSTEM_MENUBAR; break; case WebAccessibility::ROLE_MENU_ITEM: - case WebAccessibility::ROLE_MENU_LIST_OPTION: ia_role_ = ROLE_SYSTEM_MENUITEM; break; case WebAccessibility::ROLE_MENU_LIST_POPUP: - ia_role_ = ROLE_SYSTEM_MENUPOPUP; + ia_role_ = ROLE_SYSTEM_CLIENT; + break; + case WebAccessibility::ROLE_MENU_LIST_OPTION: + ia_role_ = ROLE_SYSTEM_LISTITEM; + if (ia_state_ & STATE_SYSTEM_SELECTABLE) { + ia_state_ |= STATE_SYSTEM_FOCUSABLE; + if (HasState(WebAccessibility::STATE_FOCUSED)) + ia_state_|= STATE_SYSTEM_FOCUSED; + } break; case WebAccessibility::ROLE_NOTE: ia_role_ = ROLE_SYSTEM_GROUPING; diff --git a/content/common/accessibility_messages.h b/content/common/accessibility_messages.h index c7763e1..17faa74 100644 --- a/content/common/accessibility_messages.h +++ b/content/common/accessibility_messages.h @@ -53,6 +53,9 @@ enum AccessibilityNotification { // The document node has loaded. AccessibilityNotificationLoadComplete, + // A menu list selection changed. + AccessibilityNotificationMenuListItemSelected, + // A menu list value changed. AccessibilityNotificationMenuListValueChanged, diff --git a/content/renderer/renderer_accessibility.cc b/content/renderer/renderer_accessibility.cc index bdde013..29986cb 100644 --- a/content/renderer/renderer_accessibility.cc +++ b/content/renderer/renderer_accessibility.cc @@ -53,6 +53,9 @@ bool WebAccessibilityNotificationToAccessibilityNotification( case WebKit::WebAccessibilityNotificationLoadComplete: *type = AccessibilityNotificationLoadComplete; break; + case WebKit::WebAccessibilityNotificationMenuListItemSelected: + *type = AccessibilityNotificationMenuListItemSelected; + break; case WebKit::WebAccessibilityNotificationMenuListValueChanged: *type = AccessibilityNotificationMenuListValueChanged; break; @@ -307,6 +310,7 @@ void RendererAccessibility::SendPendingAccessibilityNotifications() { break; } } + if (!is_child_of_parent) { obj = parent; notification.id = obj.axID(); |