4680896e9c62f207cbab8ab8345444e60592eca1
[WebKit-https.git] / LayoutTests / accessibility / aria-hidden-with-elements.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script>
5 var successfullyParsed = false;
6 </script>
7 <script src="../fast/js/resources/js-test-pre.js"></script>
8 </head>
9 <body id="body">
10
11 <table border=1 summary="test" aria-hidden="true">
12 <tr><td>cell</td><td>cell</td><td>cell</td></tr>
13 <tr><td>cell</td><td>cell</td><td>cell</td></tr>
14 </table>
15
16 <div role="grid" aria-hidden="true">
17 <div role="row"><div role="gridcell">cell</div></div>
18 </div>
19
20 <ul aria-hidden="true">
21 <li>test
22 <li>test
23 </ul>
24
25 <select size=10 aria-hidden="true">
26 <option>option
27 <option>option
28 </select>
29
30 <h1>heading</h1>
31
32 <p id="description"></p>
33 <div id="console"></div>
34
35 <script>
36
37     description("This tests that aria-hidden works as expected on elements that are subclasses of AccessibilityRenderObject");
38
39     if (window.accessibilityController) {
40        var root = accessibilityController.rootElement;
41
42        // first child is an AXGroup that has no children
43        var child = root.childAtIndex(0).childAtIndex(0);
44        shouldBe("child.childrenCount", "0");
45
46        // The second child we ask for from the web area should be the heading, and we should have skipped over everything else.
47        child = root.childAtIndex(0).childAtIndex(1);
48        shouldBe("child.role", "'AXRole: AXHeading'");
49     }
50
51     successfullyParsed = true;
52 </script>
53
54 <script src="../fast/js/resources/js-test-post.js"></script>
55 </body>
56 </html>