blob: 9aaffa6fb874b9b5fb2de888742b43dfd16a8aaa [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div role="grid">
<div role="row">
<span role="gridcell"></span>
<!-- Ascending aria-sort direction. -->
<span aria-sort="ascending" aria-label="label" id="col1" role="columnheader">column</span>
<!-- Descending aria-sort direction. -->
<span aria-sort="descending" id="col2" role="columnheader">column</span>
<!-- Other aria-sort direction. -->
<span aria-sort="other" id="col3" role="columnheader">column</span>
</div>
<div role="row">
<!-- No aria-sort direction. -->
<span id="row1" role="rowheader">row</span>
<span role="gridcell"></span>
</div>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that aria-sort is exposed correctly to the iOS accessibility API.");
if (window.accessibilityController) {
var col1 = accessibilityController.accessibleElementById("col1");
shouldBe("col1.stringAttributeValue('AXSortDirection')", "'ascending'");
var col2 = accessibilityController.accessibleElementById("col2");
shouldBe("col2.stringAttributeValue('AXSortDirection')", "'descending'");
var col3 = accessibilityController.accessibleElementById("col3");
shouldBe("col3.stringAttributeValue('AXSortDirection')", "'other'");
var row1 = accessibilityController.accessibleElementById("row1");
shouldBe("row1.stringAttributeValue('AXSortDirection')", "null");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>