Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / table-row-with-aria-role.html
blobf5df20edc83880f65b591b8db27c7184241a7228
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body>
8 <!-- The border="1" would normally make it a data table, but this won't
9 be because of the ARIA roles on the tbody and rows. -->
10 <table border="1">
11 <tbody id="list" role="list">
12 <tr id="item1" role="listitem"><td>1a</td><td>1b</td></tr>
13 <tr id="item2" role="listitem"><td>2a</td><td>2b</td></tr>
14 </tbody>
15 </table>
17 <!-- ARIA roles inside table cells shouldn't count. -->
18 <table id="table" border="1">
19 <tbody id="tbody">
20 <tr id="row1">
21 <td>
22 <div role="button">Button inside table</div>
23 </td>
24 </tr>
25 <tr id="row2">
26 <td>
27 <div role="button">Button inside table</div>
28 </td>
29 </tr>
30 </tbody>
31 </table>
33 <p id="description"></p>
34 <div id="console"></div>
36 <script>
37 description("This makes sure that a table with ARIA roles on the tbody or rows is not treated as a data table.");
39 if (window.accessibilityController) {
40 var list = accessibilityController.accessibleElementById('list');
41 shouldBe("list.role", "'AXRole: AXList'");
42 var item1 = accessibilityController.accessibleElementById('item1');
43 shouldBe("item1.role", "'AXRole: AXListItem'");
44 var item2 = accessibilityController.accessibleElementById('item2');
45 shouldBe("item2.role", "'AXRole: AXListItem'");
47 var table = accessibilityController.accessibleElementById('table');
48 shouldBe("table.role", "'AXRole: AXTable'");
49 var row1 = accessibilityController.accessibleElementById('row1');
50 shouldBe("row1.role", "'AXRole: AXRow'");
51 var row2 = accessibilityController.accessibleElementById('row2');
52 shouldBe("row2.role", "'AXRole: AXRow'");
54 </script>
56 </body>
57 </html>