Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-label.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 <script src="../resources/accessibility-helper.js"></script>
6 </head>
7 <body id="body">
8 <div id="content">
9 <input aria-label="aria label" type="text" size=20>
10 <a href="#" aria-label="aria link">test</a>
11 </div>
12 <p id="description"></p>
13 <div id="console"></div>
14
15 <script>
16
17     description("This tests that the aria-label attribute works on both an input and an anchor.");
18
19     if (window.accessibilityController) {
20
21           var body = document.getElementById("body");
22           body.focus();
23
24           var axInput = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
25           shouldBeEqualToString("platformValueForW3CName(axInput)", "aria label");
26
27           var axLink = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1);
28           shouldBeEqualToString("platformValueForW3CName(axLink)", "aria link");
29
30           document.getElementById("content").style.visibility = "hidden";
31     }
32 </script>
33
34 <script src="../resources/js-test-post.js"></script>
35 </body>
36 </html>