summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorklink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 23:43:25 +0000
committerklink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 23:43:25 +0000
commit759dd968342752e9b30710197898f777f1add3d8 (patch)
treefcbb6cba7299141e06c333228ea07670018d4212 /views
parentf028f136dbb4b497355e1f03d925d9991ad00a19 (diff)
downloadchromium_src-759dd968342752e9b30710197898f777f1add3d8.zip
chromium_src-759dd968342752e9b30710197898f777f1add3d8.tar.gz
chromium_src-759dd968342752e9b30710197898f777f1add3d8.tar.bz2
Adds MSAA information to various (previously uncovered) bits of the UI, including Bookmark and Extensions infobars. This is to moving towards completing the hierarchy for the benefit of full screen reader support.
BUG=None. Test=None. Review URL: http://codereview.chromium.org/155446 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/accessibility/accessibility_types.h6
-rw-r--r--views/accessibility/view_accessibility.cc24
-rw-r--r--views/controls/button/menu_button.cc2
3 files changed, 22 insertions, 10 deletions
diff --git a/views/accessibility/accessibility_types.h b/views/accessibility/accessibility_types.h
index 32e4f73..ee4d864 100644
--- a/views/accessibility/accessibility_types.h
+++ b/views/accessibility/accessibility_types.h
@@ -22,12 +22,16 @@ class AccessibilityTypes {
enum Role {
ROLE_APPLICATION,
ROLE_BUTTONDROPDOWN,
+ ROLE_BUTTONMENU,
ROLE_CLIENT,
ROLE_GROUPING,
ROLE_PAGETAB,
+ ROLE_PAGETABLIST,
ROLE_PUSHBUTTON,
+ ROLE_SEPARATOR,
ROLE_TEXT,
- ROLE_TOOLBAR
+ ROLE_TOOLBAR,
+ ROLE_WINDOW
};
// This defines an enumeration of the supported accessibility roles in our
diff --git a/views/accessibility/view_accessibility.cc b/views/accessibility/view_accessibility.cc
index 0e2f874..f9ee1bd 100644
--- a/views/accessibility/view_accessibility.cc
+++ b/views/accessibility/view_accessibility.cc
@@ -614,21 +614,29 @@ void ViewAccessibility::SetState(VARIANT* msaa_state, views::View* view) {
long ViewAccessibility::MSAARole(AccessibilityTypes::Role role) {
switch (role) {
- case AccessibilityTypes::ROLE_APPLICATION :
+ case AccessibilityTypes::ROLE_APPLICATION:
return ROLE_SYSTEM_APPLICATION;
- case AccessibilityTypes::ROLE_BUTTONDROPDOWN :
+ case AccessibilityTypes::ROLE_BUTTONDROPDOWN:
return ROLE_SYSTEM_BUTTONDROPDOWN;
- case AccessibilityTypes::ROLE_GROUPING :
+ case AccessibilityTypes::ROLE_BUTTONMENU:
+ return ROLE_SYSTEM_BUTTONMENU;
+ case AccessibilityTypes::ROLE_GROUPING:
return ROLE_SYSTEM_GROUPING;
- case AccessibilityTypes::ROLE_PAGETAB :
+ case AccessibilityTypes::ROLE_PAGETAB:
return ROLE_SYSTEM_PAGETAB;
- case AccessibilityTypes::ROLE_PUSHBUTTON :
+ case AccessibilityTypes::ROLE_PAGETABLIST:
+ return ROLE_SYSTEM_PAGETABLIST;
+ case AccessibilityTypes::ROLE_PUSHBUTTON:
return ROLE_SYSTEM_PUSHBUTTON;
- case AccessibilityTypes::ROLE_TEXT :
+ case AccessibilityTypes::ROLE_SEPARATOR:
+ return ROLE_SYSTEM_SEPARATOR;
+ case AccessibilityTypes::ROLE_TEXT:
return ROLE_SYSTEM_TEXT;
- case AccessibilityTypes::ROLE_TOOLBAR :
+ case AccessibilityTypes::ROLE_TOOLBAR:
return ROLE_SYSTEM_TOOLBAR;
- case AccessibilityTypes::ROLE_CLIENT :
+ case AccessibilityTypes::ROLE_WINDOW:
+ return ROLE_SYSTEM_WINDOW;
+ case AccessibilityTypes::ROLE_CLIENT:
default:
// This is the default role for MSAA.
return ROLE_SYSTEM_CLIENT;
diff --git a/views/controls/button/menu_button.cc b/views/controls/button/menu_button.cc
index 9a8d3d2..25a415d 100644
--- a/views/controls/button/menu_button.cc
+++ b/views/controls/button/menu_button.cc
@@ -250,7 +250,7 @@ bool MenuButton::GetAccessibleDefaultAction(std::wstring* action) {
bool MenuButton::GetAccessibleRole(AccessibilityTypes::Role* role) {
DCHECK(role);
- *role = AccessibilityTypes::ROLE_BUTTONDROPDOWN;
+ *role = AccessibilityTypes::ROLE_BUTTONMENU;
return true;
}