| Index: LayoutTests/accessibility/table-header-column-row.html
|
| diff --git a/LayoutTests/accessibility/table-header-column-row.html b/LayoutTests/accessibility/table-header-column-row.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6f99810a191bde7e5ee64b822649f92896299cea
|
| --- /dev/null
|
| +++ b/LayoutTests/accessibility/table-header-column-row.html
|
| @@ -0,0 +1,102 @@
|
| +<script src="../resources/js-test.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>
|
| +<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();
|
| +
|
| +function buildAccessibilityTree(accessibilityObject, indent) {
|
| + if (accessibilityObject.role == 'AXRole: AXColumn' || accessibilityObject.role == 'AXRole: AXTableHeaderContainer')
|
| + return true;
|
| + var str = "";
|
| + for (var i = 0; i < indent; i++)
|
| + str += " ";
|
| + str += accessibilityObject.role;
|
| + str += " " + accessibilityObject.stringValue;
|
| +
|
| + if (accessibilityObject.role == '')
|
| + str += accessibilityObject.allAttributes();
|
| +
|
| + str += "\n";
|
| + document.getElementById("console").innerText += str;
|
| +
|
| + if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
|
| + return false;
|
| +
|
| + var count = accessibilityObject.childrenCount;
|
| + for (var i = 0; i < count; ++i) {
|
| + if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
|
| + return false;
|
| + }
|
| +
|
| + return true;
|
| +}
|
| +
|
| +if (window.accessibilityController) {
|
| + var body = accessibilityController.focusedElement;
|
| + buildAccessibilityTree(body, 0);
|
| +}
|
| +</script>
|
|
|