Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-flowto.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 tabindex=0 id="item1" role="img" aria-flowto="extra extra2">Item 1</div>
9 <div>Item 2</div>
10 <div>Item 3</div>
11
12 <div id="extra" role="button">BUTTON</div>
13 <div id="extra2" role="radio">RADIO BUTTON</div>
14
15 <p id="description"></p>
16 <div id="console"></div>
17
18 <script>
19
20     description("This tests that aria-flowto correctly identifies the right elements.");
21
22     if (window.accessibilityController) {
23
24           var item = document.getElementById("item1");
25           item.focus();
26           item = accessibilityController.focusedElement;
27           shouldBe("item.ariaFlowToElementAtIndex(0).role", "'AXRole: AXButton'");
28           shouldBe("item.ariaFlowToElementAtIndex(0).title", "'AXTitle: BUTTON'");
29           shouldBe("item.ariaFlowToElementAtIndex(1).role", "'AXRole: AXRadioButton'");
30           shouldBe("item.ariaFlowToElementAtIndex(1).title", "'AXTitle: RADIO BUTTON'");
31     }
32
33 </script>
34
35 <script src="../resources/js-test-post.js"></script>
36 </body>
37 </html>