bb5362f1a1128da735d287b1bdbaaff5146bff11
[WebKit-https.git] / LayoutTests / accessibility / aria-hidden.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 <h1 aria-hidden="true">h1 <b>test</b></h1>
11 <h2 aria-hidden="false">h2</h2>
12 <p id="description"></p>
13 <div id="console"></div>
14
15 <script>
16
17     description("This tests that the aria-hidden attribute works correctly with accessibility. The H1 element (and its children) should not appear in the AX hierarchy. The H2 element should be the first child");
18
19     if (window.accessibilityController) {
20
21           var body = document.getElementById("body");
22           body.focus();
23           var h2 = accessibilityController.focusedElement.childAtIndex(0);
24           var pattern = "AXTitle: h2";
25           var succeeded = h2.allAttributes().indexOf(pattern) != -1;
26           shouldBe("succeeded", "true");
27     }
28
29     successfullyParsed = true;
30 </script>
31
32 <script src="../fast/js/resources/js-test-post.js"></script>
33 </body>
34 </html>