Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / accessibility / aria-tab-roles.html
blobd2a424b648501c6da55fbf7e639d1b72f090c0aa
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
5 <script>
6 var successfullyParsed = false;
7 </script>
8 <script src="../fast/js/resources/js-test-pre.js"></script>
9 </head>
10 <body id="body">
12 <ul id="tablist_1" role="tablist">
13 <li id="tab_1" role="tab" tabindex="0" class="">Crust</li>
14 <li id="tab_2" role="tab" tabindex="0" class="">Veges</li>
15 </ul>
17 <div id="panel_1" role="tabpanel" aria-labelledby="tab_1" >
18 <h3>Select Crust</h3>
19 </div>
22 <p id="description"></p>
23 <div id="console"></div>
25 <script>
27 description("This tests that the aria roles for tab, tabpanel and tablist work as expected correctly.");
29 if (window.accessibilityController) {
31 var body = document.getElementById("body");
32 body.focus();
34 var tabList = accessibilityController.focusedElement.childAtIndex(0);
35 var tab1 = tabList.childAtIndex(0);
36 var tab2 = tabList.childAtIndex(1);
37 var tabPanel = accessibilityController.focusedElement.childAtIndex(1);
39 shouldBe("tabList.role", "'AXRole: AXTabGroup'");
40 shouldBe("tab1.role", "'AXRole: AXRadioButton'");
41 shouldBe("tab1.title", "'AXTitle: Crust'");
42 shouldBe("tab1.childrenCount", "0");
43 shouldBe("tab2.role", "'AXRole: AXRadioButton'");
44 shouldBe("tab2.title", "'AXTitle: Veges'");
45 shouldBe("tabPanel.role", "'AXRole: AXGroup'");
46 shouldBe("tabPanel.subrole", "'AXSubrole: AXTabPanel'");
49 successfullyParsed = true;
50 </script>
52 <script src="../fast/js/resources/js-test-post.js"></script>
53 </body>
54 </html>