| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| <script> |
| function dumpAccessibilityChildren(element, level) { |
| if (element.stringValue.indexOf('End of test') >= 0) |
| return false; |
| |
| var indent = ""; |
| for (var k = 0; k < level; k++) { indent += " "; } |
| debug(indent + element.role + " " + element.stringValue); |
| var childrenCount = element.childrenCount; |
| for (var k = 0; k < childrenCount; k++) { |
| if (!dumpAccessibilityChildren(element.childAtIndex(k), level+1)) |
| return false; |
| } |
| return true; |
| } |
| </script> |
| </head> |
| <body id="body"> |
| <table> |
| <tr><td>foo</td><td>bar</td></tr> |
| </table> |
| <table> |
| <tr><th>Odd</th><th>Even</th></tr> |
| <tr><td>1</td><td>2</td></tr> |
| <tr><td>3</td><td>4</td></tr> |
| </table> |
| <table> |
| <tbody> |
| <tr><td>hello</td><td>world</td></tr> |
| </tbody> |
| </table> |
| <table border=1> |
| <tr><th>Odd</th><th>Even</th></tr> |
| <tr><td><p>1</p></td><td><p>2</p></td></tr> |
| <tr><td><p>3</p></td><td><p>4</p></td></tr> |
| </table> |
| <div>End of test</div> |
| <p id="description"></p> |
| <div id="console"></div> |
| <script> |
| description("This tests the accessible hierarchy for an HTML table."); |
| if (window.accessibilityController) { |
| document.getElementById("body").focus(); |
| dumpAccessibilityChildren(accessibilityController.focusedElement, 0); |
| } |
| </script> |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |