Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-tab-role-on-buttons.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div role="tablist">
9     <button id="tab a" role="tab" aria-selected="true">Tab A</button>
10     <button id="tab b" role="tab" aria-selected="false">Tab B</button>
11     <button id="tab c" role="tab" aria-selected="false">Tab C</button>
12 </div>
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This tests that the aria roles for tab and tablist work as expected for buttons.");
20
21     if (window.accessibilityController) {
22
23           var body = document.getElementById("body");
24           body.focus();
25
26           var tabList = accessibilityController.focusedElement.childAtIndex(0);
27           var tab1 = tabList.childAtIndex(0);
28           var tab2 = tabList.childAtIndex(1);
29           var tabPanel = accessibilityController.focusedElement.childAtIndex(1);
30
31           debug("tabList.role = " + tabList.role);
32           debug("tab1.role = " + tab1.role);
33           debug("tab1.title = " + tab1.title);
34           shouldBe("tab1.childrenCount", "0");
35           debug("tab2.role = " + tab2.role);
36           debug("tab2.title = " + tab2.title);
37     }
38
39 </script>
40
41 <script src="../resources/js-test-post.js"></script>
42 </body>
43 </html>