blob: 0f4df90a367924c847c9fb34440955c118fde762 [file] [log] [blame]
<script src="../resources/js-test.js"></script>
<script src="../resources/accessibility-helper.js"></script>
<table width="50%" border="1">
<caption>
scope test
</caption>
<tr>
<th scope="col">col head</th>
<th scope="row">row head</th>
<th>col head</th>
</tr>
<tr>
<th scope="col">col head</th>
<td scope="row">data</td>
<th>row head</th>
</tr>
<tr>
<th>row head</th>
<td>data</td>
<th scope="col">col head</th>
</tr>
</table>
<table width="50%" border="1">
<caption>
row header and column header (1)
</caption>
<tr>
<td>data</td>
<th>row head</th>
<th>column head</th>
</tr>
<tr>
<th>column head</th>
<th>column head</th>
<td>data</td>
</tr>
<tr>
<th>row head</th>
<td>data</td>
<th>row head</th>
</tr>
</table>
<table width="50%" border="1">
<caption>
row header and column header (2)
</caption>
<tr>
<th>row head</th>
<td>data</td>
<td>data</td>
</tr>
<tr>
<th>column head</th>
<th>column head</th>
<th>column head</th>
</tr>
<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
</table>
<table width="50%" border="1">
<caption>
row header and column header (3)
<caption>
<col>
<colgroup span="2"></colgroup>
<tr>
<td rowspan="2"></td>
<th colspan="2" scope="colgroup">col head</th>
</tr>
<tr>
<th scope="col">col head</th>
<th scope="col">col head</th>
</tr>
<tr>
<th scope="row">row head</th>
<td>data</td>
<td>data</td>
</tr>
</table>
<table width="50%" border="1">
<caption>
row header and column header (4)
<caption>
<tr>
<th rowspan="2" scope="rowgroup">row head</th>
<th scope="col">col head</th>
</tr>
<tr>
<th scope="row">row head</th>
</tr>
</table>
<p>End of test</p>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that AXRoles for header cells are assigned.");
if (window.testRunner)
testRunner.dumpAsText();
if (window.accessibilityController) {
buildAccessibilityTree(accessibilityController.focusedElement, 0, 1, ['AXColumn', 'AXTableHeaderContainer']);
}
</script>