AX: Treat AXChildrenInNavigationOrder as AXChildren before adding support for aria...
[WebKit-https.git] / LayoutTests / accessibility / mac / children-in-navigation-order-returns-children.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 .span-absolute {
6     position: absolute;
7     overflow: hidden;
8     height: 1px;
9 }
10 .lineheight{
11     line-height: 1.32;
12 }
13 </style>
14 </head>
15 <body id="body">
16 <script src="../../resources/js-test-pre.js"></script>
17 <div id="content">
18 <div>
19     <a id="test0" href="https://www.apple.com">Learn more <span class="span-absolute">about Apple</span> <button>Click</button></a>
20 </div>
21 <div class="lineheight">
22     <a id="test1" href="https://www.apple.com">Learn more <span class="span-absolute">about Apple</span> <button>Click</button></a>
23 </div>
24 </div>
25 <p id="description"></p>
26 <div id="console"></div>
27
28 <script>
29     description("This tests that AXChildrenInNavigationOrder returns non-empty array from AXChildren.");
30
31     if (window.accessibilityController) {
32         var testElement0 = accessibilityController.accessibleElementById("test0");
33         var testElement1 = accessibilityController.accessibleElementById("test1");
34         var children0 = testElement0.uiElementArrayAttributeValue("AXChildren");
35         var children1 = testElement1.uiElementArrayAttributeValue("AXChildrenInNavigationOrder");
36         shouldBe("children0.length", "3");
37         shouldBe("children1.length", "3");
38         for (var i = 0; i < 3; i++) {
39             shouldBeTrue("children0[i].role == children1[i].role");
40         }
41
42         document.getElementById("content").style.visibility = 'hidden';
43     } else {
44         testFailed("Could not load accessibility controller");
45     }
46
47 </script>
48
49 <script src="../../resources/js-test-post.js"></script>
50 </body>
51 </html>