Commit 0af5841b authored by cfleizach@apple.com's avatar cfleizach@apple.com

AX: aria-hidden=false does not work as expected

https://bugs.webkit.org/show_bug.cgi?id=98787

Reviewed by Beth Dakin.

These tests were part of this patch added over a year ago, but the patch was rolled out, and when it was rolled back in
the tests were never added. So I'm adding them back again.

* accessibility/aria-hidden-negates-no-visibility.html: Added.
* platform/mac/accessibility/aria-hidden-negates-no-visibility-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 854bbedf
2013-12-03 Chris Fleizach <cfleizach@apple.com>
AX: aria-hidden=false does not work as expected
https://bugs.webkit.org/show_bug.cgi?id=98787
Reviewed by Beth Dakin.
These tests were part of this patch added over a year ago, but the patch was rolled out, and when it was rolled back in
the tests were never added. So I'm adding them back again.
* accessibility/aria-hidden-negates-no-visibility.html: Added.
* platform/mac/accessibility/aria-hidden-negates-no-visibility-expected.txt: Added.
2013-12-03 László Langó <lango@inf.u-szeged.hu>
ASSERTION FAILED: !value || (value->isPrimitiveValue()) in WebCore::StyleProperties::getLayeredShorthandValue.
......
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body id="body">
<h1 hidden id="heading1_1">heading1.1</h1>
<h1 aria-hidden="true" id="heading1_2">heading1.2</h1>
<h1 hidden aria-hidden="true" id="heading1_3">heading1.3</h1>
<h1 hidden aria-hidden="false" id="heading2">heading2</h1>
<h1 style="display:none;" aria-hidden="false" id="heading3">heading3</h1>
<h1 style="visibility:hidden;" aria-hidden="false" id="heading4">heading4</h1>
<div hidden aria-hidden="false" id="hiddenDiv">HiddenText1</div>
<input type="text" aria-labelledby="hiddenDiv" id="textFieldWithHiddenLabeller">
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests ensures that aria-hidden=false will allow a node to be in the AX hierarchy even if it's not rendered or visible");
if (window.accessibilityController) {
// First groups of headings are actually hidde.n
var heading1_1 = accessibilityController.accessibleElementById("heading1_1");
shouldBeTrue("!heading1_1 || !heading1_1.isValid");
var heading1_2 = accessibilityController.accessibleElementById("heading1_2");
shouldBeTrue("!heading1_2 || !heading1_3.isValid");
var heading1_3 = accessibilityController.accessibleElementById("heading1_3");
shouldBeTrue("!heading1_3 || !heading1_3.isValid");
// These headings should be in AX tree despite being hidden.
var heading2 = accessibilityController.accessibleElementById("heading2");
shouldBe("heading2.role", "'AXRole: AXHeading'");
// Check that the order of these elements is correct based on DOM order.
var parent = heading2.parentElement();
shouldBeTrue("parent.childAtIndex(0).isEqual(heading2)");
var heading3 = accessibilityController.accessibleElementById("heading3");
shouldBe("heading3.role", "'AXRole: AXHeading'");
shouldBeTrue("parent.childAtIndex(1).isEqual(heading3)");
var heading4 = accessibilityController.accessibleElementById("heading4");
shouldBe("heading4.role", "'AXRole: AXHeading'");
shouldBeTrue("parent.childAtIndex(2).isEqual(heading4)");
// The aria-labelledby attribute should work even though hidden.
var textField = accessibilityController.accessibleElementById("textFieldWithHiddenLabeller");
debug("Textfield Title: " + textField.title);
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
heading1.2
This tests ensures that aria-hidden=false will allow a node to be in the AX hierarchy even if it's not rendered or visible
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS !heading1_1 || !heading1_1.isValid is true
PASS !heading1_2 || !heading1_3.isValid is true
PASS !heading1_3 || !heading1_3.isValid is true
PASS heading2.role is 'AXRole: AXHeading'
PASS parent.childAtIndex(0).isEqual(heading2) is true
PASS heading3.role is 'AXRole: AXHeading'
PASS parent.childAtIndex(1).isEqual(heading3) is true
PASS heading4.role is 'AXRole: AXHeading'
PASS parent.childAtIndex(2).isEqual(heading4) is true
Textfield Title: AXTitle:
PASS successfullyParsed is true
TEST COMPLETE
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment