Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / self-referencing-aria-labelledby.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 <script src="../resources/accessibility-helper.js"></script>
6 <title>Self-Referencing aria-labelledby</title>
7 </head>
8 <body>
9 <div id="content">
10 <!-- Self-referencing label should be the content text. -->
11 <a aria-labelledby="t0 s0 s1" class="test" href="#" id="t0">X</a>
12
13 <!-- Self-referencing label should be the aria-label text. -->
14 <a aria-label="X" aria-labelledby="t1 s0 s1" class="test" href="#" id="t1">?</a>
15
16 <!-- Self-referencing label should be the title text. -->
17 <img alt="" aria-labelledby="t2 s0 s1" class="test" id="t2" src="resources/cake.png" title="X">
18
19 <!-- Self-referencing label should be the alt text. -->
20 <img alt="X" aria-labelledby="t3 s0 s1" class="test" id="t3" src="resources/cake.png" title="?">
21
22 <!-- Self-referencing label should be the aria-label text. -->
23 <img alt="?" aria-label="X" aria-labelledby="t4 s0 s1" class="test" id="t4" src="resources/cake.png" title="?">
24
25 <!-- Self-referencing label should be the value text. -->
26 <input aria-labelledby="t5 s0 s1" class="test" id="t5" type="text" value="X">
27
28 <!-- Self-referencing label should be the aria-label text. -->
29 <input aria-label="X" aria-labelledby="t6 s0 s1" class="test" id="t6" type="button" value="?">
30
31 <span id="s0">Y</span>
32 <span id="s1">Z</span>
33 </div>
34 <p id="description"></p>
35 <div id="console"></div>
36
37 <script>
38     description("This tests that self-referencing aria-labelledby is exposed correctly.");
39     
40     if (window.accessibilityController) {
41         testCount = document.getElementsByClassName("test").length;
42         for (var i = 0; i < testCount; ++i) {
43             var test = accessibilityController.accessibleElementById("t" + i);
44             shouldBeEqualToString("platformValueForW3CName(test)", "X Y Z");
45         }
46
47         document.getElementById("content").style.visibility = "hidden";
48     }
49 </script>
50
51 <script src="../resources/js-test-post.js"></script>
52 </body>
53 </html>