AX: Tables with <colgroups> are not reporting table column headers
[WebKit-https.git] / LayoutTests / accessibility / table-column-headers-with-captions.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../resources/js-test-pre.js"></script>
6 </head>
7 <body id="body">
8
9 <table id="table" width="100%" border="0" cellspacing="2" cellpadding="1">
10     <caption>caption</caption>
11     <colgroup width="100%" span="2"><col width="50%"><col width="50%"></colgroup>
12     <tbody>
13         <tr><th>header1</th><th>header2</th></tr>
14         <tr><td>a</td><td>b</td></tr>
15     </tbody>
16 </table>
17
18 <p id="description"></p>
19 <div id="console"></div>
20
21 <script>
22
23     description("This tests that a table with a caption and an empty colgroup will still correctly report its headers.");
24
25     if (window.accessibilityController) {
26
27         var table = accessibilityController.accessibleElementById("table");
28         var colHeaders = table.columnHeaders();
29
30         shouldBeTrue("colHeaders[0].isEqual(table.rowAtIndex(0).childAtIndex(0))");
31         shouldBeTrue("colHeaders[1].isEqual(table.rowAtIndex(0).childAtIndex(1))");
32     }
33
34 </script>
35
36 <script src="../resources/js-test-post.js"></script>
37 </body>
38 </html>