blob: 73fef0986e8e7b109ce0d70ea9e5e00213c9819d [file] [log] [blame]
<!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>
<table border="1" id="table">
<tr><th style="position: absolute; left: -99999px;">header 1</th>
<th style="position: absolute; left: -99999px;" aria-hidden="true">header2</th>
<th>header 3</th>
</tr>
<tr><td>cell1</td><td>cell2</td><td>cell3</td></tr>
</table>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests confirms even when a th tag is hidden, it will still be returned as a column header (unless it is hidden).");
if (window.accessibilityController) {
var table = accessibilityController.accessibleElementById("table");
var colHeaders = table.columnHeaders();
shouldBe("colHeaders.length", "2");
shouldBe("colHeaders[0].childAtIndex(0).childAtIndex(0).stringValue", "'AXValue: header 1'");
shouldBe("colHeaders[1].childAtIndex(0).stringValue", "'AXValue: header 3'");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>