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