Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r222822 - AX: [ATK] ARIA menuitems should be exposed with ATK_R…
…OLE_MENU_ITEM even when it's the child of group role https://bugs.webkit.org/show_bug.cgi?id=177811 Reviewed by Chris Fleizach. Source/WebCore: AccessibilityNodeObject::remapAriaRoleDueToParent() remaps ARIA menuitems to the MenuButtonRole AccessibilityRole when the menuitem's parent is an ARIA group, but the ATK code was not handling that remapped role value. As a result, the element was being exposed as ATK_ROLE_UNKNOWN. Add MenuButtonRole to the AccessibilityRole types exposed as ATK_ROLE_MENU_ITEM. Test: accessibility/gtk/menu-with-group-child-tree.html * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): LayoutTests: * accessibility/gtk/menu-with-group-child-tree-expected.txt: Added. * accessibility/gtk/menu-with-group-child-tree.html: Added.
- Loading branch information
1 parent
a5bcc98
commit b2cf496
Showing
5 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
LayoutTests/accessibility/gtk/menu-with-group-child-tree-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
AXRole: AXMenu AXTitle: | ||
AXRole: AXGroup AXTitle: | ||
AXRole: AXMenuItem AXTitle: content 1 | ||
AXRole: AXMenuItem AXTitle: content 2 | ||
This verifies the accessibility tree of a menu with a group child. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
28 changes: 28 additions & 0 deletions
28
LayoutTests/accessibility/gtk/menu-with-group-child-tree.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script src="../../resources/js-test-pre.js"></script> | ||
<script src="../../resources/accessibility-helper.js"></script> | ||
</head> | ||
<body id="body"> | ||
<div id="content"> | ||
<div role="menu" id="menu"> | ||
<div role="group"><div role="menuitem">content 1</div></div> | ||
<div role="menuitem">content 2</div> | ||
</div> | ||
</div> | ||
</div> | ||
<pre id="tree"></pre> | ||
<p id="description"></p> | ||
<div id="console"></div> | ||
<script> | ||
description("This verifies the accessibility tree of a menu with a group child."); | ||
if (window.accessibilityController) { | ||
var menu = accessibilityController.accessibleElementById("menu"); | ||
dumpAccessibilityTree(menu, null, 0, false, true); | ||
} | ||
document.getElementById("content").style.visibility = "hidden"; | ||
</script> | ||
<script src="../../resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters