summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-06 08:15:09 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-06 08:15:09 +0000
commit9a5bfe55537668a7d809c9a67cbc8e1e158f56a3 (patch)
tree94fa9f81447e00e2999fb61980634d37b14355c8 /content
parenta759f32e53c0182d3cdf3032755bab3bf0adee77 (diff)
downloadchromium_src-9a5bfe55537668a7d809c9a67cbc8e1e158f56a3.zip
chromium_src-9a5bfe55537668a7d809c9a67cbc8e1e158f56a3.tar.gz
chromium_src-9a5bfe55537668a7d809c9a67cbc8e1e158f56a3.tar.bz2
Translates the webkit notification for selection changes properly on Windows and maps the roles to something that works for Jaws.
This won't work until https://bugs.webkit.org/show_bug.cgi?id=85541 makes its way into Chrome. BUG=none TEST=manually with JFW13. TBR=darin Review URL: http://codereview.chromium.org/10352005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_win.cc3
-rw-r--r--content/browser/accessibility/browser_accessibility_win.cc11
-rw-r--r--content/common/accessibility_messages.h3
-rw-r--r--content/renderer/renderer_accessibility.cc4
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();