blob: 311ed66b2d200768f7b0b93275cc5bf0fbeb0309 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
<title>aria-sort</title>
</head>
<body>
<div aria-label="Files" role="grid" tabindex="0" aria-rowcount="2" aria-colcount="2" id="table">
<div role="row" aria-owns="row1-cell-1 row1-cell-2" id="row1"></div>
<div id="row1-cell-1" aria-rowindex="1" aria-colindex="1" role="gridcell" tabindex="0">Foo</div>
<div id="row1-cell-2" aria-rowindex="1" aria-colindex="2" role="gridcell" tabindex="0">Bar</div>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that an ARIA table can use aria-owns for its cells.");
if (window.accessibilityController) {
var row1 = accessibilityController.accessibleElementById("row1");
var table = accessibilityController.accessibleElementById("table")
var cell1 = table.cellForColumnAndRow(0, 0);
shouldBeTrue("row1.childAtIndex(0).isEqual(table.cellForColumnAndRow(0, 0))");
shouldBeTrue("row1.childAtIndex(0).isEqual(accessibilityController.accessibleElementById('row1-cell-1'))");
shouldBeTrue("cell1.parentElement().isEqual(row1)");
shouldBeTrue("row1.parentElement().isEqual(table)");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>