Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r222787 - AX: [ATK] ARIA drag-and-drop attribute values should …
…be exposed via AtkObject attributes https://bugs.webkit.org/show_bug.cgi?id=177763 Reviewed by Chris Fleizach. Source/WebCore: Expose the values of aria-grabbed and aria-dropeffect via the "grabbed" and "dropeffect" AtkObject attributes. Test: accessibility/gtk/aria-drag-and-drop.html * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetAttributes): Tools: Implement ariaIsGrabbed() and ariaDropEffects() for ATK. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::ariaIsGrabbed const): (WTR::AccessibilityUIElement::ariaDropEffects const): LayoutTests: * accessibility/gtk/aria-drag-and-drop-expected.txt: Added. * accessibility/gtk/aria-drag-and-drop.html: Added.
- Loading branch information
1 parent
a756f27
commit 97e478e
Showing
7 changed files
with
137 additions
and
4 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
41 changes: 41 additions & 0 deletions
41
LayoutTests/accessibility/gtk/aria-drag-and-drop-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,41 @@ | ||
This tests the exposure of ARIA properties related to drag and drop. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
test1 | ||
ariaDropEffects: | ||
ariaIsGrabbed: false | ||
has grabbed attribute: false | ||
test2 | ||
ariaDropEffects: | ||
ariaIsGrabbed: false | ||
has grabbed attribute: false | ||
test3 | ||
ariaDropEffects: | ||
ariaIsGrabbed: true | ||
has grabbed attribute: true | ||
test4 | ||
ariaDropEffects: | ||
ariaIsGrabbed: false | ||
has grabbed attribute: true | ||
test5 | ||
ariaDropEffects: copy | ||
ariaIsGrabbed: false | ||
has grabbed attribute: false | ||
test6 | ||
ariaDropEffects: move | ||
ariaIsGrabbed: false | ||
has grabbed attribute: false | ||
test7 | ||
ariaDropEffects: copy move | ||
ariaIsGrabbed: false | ||
has grabbed attribute: false | ||
test8 | ||
ariaDropEffects: none | ||
ariaIsGrabbed: false | ||
has grabbed attribute: false | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
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,45 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script src="../../resources/js-test-pre.js"></script> | ||
</head> | ||
<body id="body"> | ||
<div id="content"> | ||
<div id="test1" role="button">X</div> | ||
<div id="test2" role="button" aria-grabbed="">X</div> | ||
<div id="test3" role="button" aria-grabbed="true">X</div> | ||
<div id="test4" role="button" aria-grabbed="false">X</div> | ||
<div id="test5" role="button" aria-dropeffect="copy">X</div> | ||
<div id="test6" role="button" aria-dropeffect="move">X</div> | ||
<div id="test7" role="button" aria-dropeffect="copy move">X</div> | ||
<div id="test8" role="button" aria-dropeffect="none">X</div> | ||
</div> | ||
<p id="description"></p> | ||
<div id="console"></div> | ||
<script> | ||
function hasGrabbedAttribute(axElement) { | ||
var allAttributes = axElement.allAttributes().split("\n"); | ||
var length = allAttributes.length; | ||
for (var i = 0; i < length; i++) { | ||
var string = allAttributes[i]; | ||
if (string.startsWith("AXPlatformAttributes")) | ||
return string.search("grabbed") > -1; | ||
} | ||
return false; | ||
} | ||
|
||
description("This tests the exposure of ARIA properties related to drag and drop."); | ||
if (window.accessibilityController) { | ||
for (var i = 1; i <= 8; i++) { | ||
var axElement = accessibilityController.accessibleElementById("test" + i); | ||
debug("test" + i + "\n\tariaDropEffects: " + axElement.ariaDropEffects + | ||
"\n\tariaIsGrabbed: " + axElement.ariaIsGrabbed + | ||
"\n\thas grabbed attribute: " + hasGrabbedAttribute(axElement)); | ||
} | ||
|
||
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
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