summaryrefslogtreecommitdiffstats
path: root/content/browser/accessibility
diff options
context:
space:
mode:
authorshreeram.k <shreeram.k@samsung.com>2014-10-08 21:45:14 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-09 04:45:46 +0000
commit93f1e4e35afa32aefe0ad065e7fe166ca25a9f22 (patch)
tree4b57cb367f0bd43bc230b588a18bd476797b0abf /content/browser/accessibility
parent36b7fc7f8b05ea627873e58a162c1c26784e472d (diff)
downloadchromium_src-93f1e4e35afa32aefe0ad065e7fe166ca25a9f22.zip
chromium_src-93f1e4e35afa32aefe0ad065e7fe166ca25a9f22.tar.gz
chromium_src-93f1e4e35afa32aefe0ad065e7fe166ca25a9f22.tar.bz2
Expose aria role menuitemcheckbox and menuitemradio with correct IA2 role.(Chromium)
According to specs(http://www.w3.org/WAI/PF/aria-implementation/) aria role menuitemcheckbox should have IA2 role as IA2_ROLE_CHECK_MENU_ITEM aria role menuitemradio should have IA2 role as IA2_ROLE_RADIO_MENU_ITEM This CL depends on https://codereview.chromium.org/629003003/ and https://codereview.chromium.org/631113002/ BUG=169569, 420605, 169573 TBR=kalman Review URL: https://codereview.chromium.org/633043002 Cr-Commit-Position: refs/heads/master@{#298780}
Diffstat (limited to 'content/browser/accessibility')
-rw-r--r--content/browser/accessibility/browser_accessibility_android.cc2
-rw-r--r--content/browser/accessibility/browser_accessibility_win.cc10
-rw-r--r--content/browser/accessibility/dump_accessibility_tree_browsertest.cc5
3 files changed, 17 insertions, 0 deletions
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index 6f7c71f..dd1511d 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -97,6 +97,8 @@ bool BrowserAccessibilityAndroid::IsCheckable() const {
GetAriaTristate("aria-pressed", &is_aria_pressed_defined, &is_mixed);
if (GetRole() == ui::AX_ROLE_CHECK_BOX ||
GetRole() == ui::AX_ROLE_RADIO_BUTTON ||
+ GetRole() == ui::AX_ROLE_MENU_ITEM_CHECK_BOX ||
+ GetRole() == ui::AX_ROLE_MENU_ITEM_RADIO ||
is_aria_pressed_defined) {
checkable = true;
}
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index 355b188..e7b206c 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -2928,6 +2928,8 @@ void BrowserAccessibilityWin::OnDataChanged() {
if (ia_role_ == ROLE_SYSTEM_CHECKBUTTON ||
ia_role_ == ROLE_SYSTEM_RADIOBUTTON ||
+ ia2_role_ == IA2_ROLE_CHECK_MENU_ITEM ||
+ ia2_role_ == IA2_ROLE_RADIO_MENU_ITEM ||
ia2_role_ == IA2_ROLE_TOGGLE_BUTTON) {
ia2_attributes_.push_back(L"checkable:true");
}
@@ -3615,6 +3617,14 @@ void BrowserAccessibilityWin::InitRoleAndState() {
case ui::AX_ROLE_MENU_ITEM:
ia_role_ = ROLE_SYSTEM_MENUITEM;
break;
+ case ui::AX_ROLE_MENU_ITEM_CHECK_BOX:
+ ia_role_ = ROLE_SYSTEM_MENUITEM;
+ ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM;
+ break;
+ case ui::AX_ROLE_MENU_ITEM_RADIO:
+ ia_role_ = ROLE_SYSTEM_MENUITEM;
+ ia2_role_ = IA2_ROLE_RADIO_MENU_ITEM;
+ break;
case ui::AX_ROLE_MENU_LIST_POPUP:
ia_role_ = ROLE_SYSTEM_CLIENT;
break;
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index bbe5a1b..96e2355 100644
--- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -411,6 +411,11 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaMenu) {
}
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityAriaMenuitemcheckbox) {
+ RunTest(FILE_PATH_LITERAL("aria-menuitemcheckbox.html"));
+}
+
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
AccessibilityAriaMenuitemradio) {
RunTest(FILE_PATH_LITERAL("aria-menuitemradio.html"));
}