Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / aria-controls.html
blobc6720bace9e6657bdd1a10206797bec4252cdbbd
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body id="body">
8 <ul id="tablist_1" role="tablist">
9 <li id="tab_1" role="tab" aria-controls="panel_1 panel_2"></li>
10 </ul>
12 <div id="panel_1" role="tabpanel">Panel 1</div>
13 <div id="panel_2" role="tabpanel">Panel 2</div>
15 <p id="description"></p>
16 <div id="console"></div>
18 <script>
19 description("This tests that aria-controls identifies the correct element");
21 if (window.accessibilityController) {
22 var tab_1 = accessibilityController.accessibleElementById("tablist_1").childAtIndex(0);
23 var panel_1 = accessibilityController.accessibleElementById("panel_1");
24 var panel_2 = accessibilityController.accessibleElementById("panel_2");
26 shouldBeTrue("tab_1.ariaControlsElementAtIndex(0).isEqual(panel_1)");
27 shouldBeTrue("tab_1.ariaControlsElementAtIndex(1).isEqual(panel_2)");
31 </script>
33 </body>
34 </html>