Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-labelledby-overrides-aria-label.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 </head>
5 <body id="body">
6 <p id="description">This tests that if aria-labelledby is used, then aria-label attributes are not used.</p>
7
8 <button id="using-none">Alpha</button>
9 <button id="using-label" aria-label="Gamma">Beta</button>
10 <button id="using-labelledby" aria-labelledby="epsilon" aria-label="Zeta">Delta</button>
11 <button id="using-labeledby" aria-labeledby="theta" aria-label="Iota">Eta</button>
12 <span id="epsilon">Epsilon</span>
13 <span id="theta">Theta</span>
14
15 <ul id="results"></ul>
16 <div id="console"></div>
17
18 <script>
19     function getAccessibilityObject(id) {
20         var element = document.getElementById(id);
21         element.focus();
22         return accessibilityController.focusedElement;
23     }
24
25     function output(str) {
26         var results = document.getElementById("results");
27         var li = document.createElement("li");
28         li.appendChild(document.createTextNode(str));
29         results.appendChild(li);
30     }
31
32     if (window.testRunner)
33         testRunner.dumpAsText();
34
35     if (window.accessibilityController) {
36         var usingNone = getAccessibilityObject("using-none");
37         output("usingNone.title: [" + usingNone.title + "]");
38         output("usingNone.description:  [" + usingNone.description + "]");
39
40         var usingLabel = getAccessibilityObject("using-label");
41         output("usingLabel.title: [" + usingLabel.title + "]");
42         output("usingLabel.description:  [" + usingLabel.description + "]");
43
44         var usingLabelledby = getAccessibilityObject("using-labelledby");
45         output("usingLabelledby.title: [" + usingLabelledby.title + "]");
46         output("usingLabelledby.description:  [" + usingLabelledby.description + "]");
47
48         var usingLabeledby = getAccessibilityObject("using-labeledby");
49         output("usingLabeledby.title: [" + usingLabeledby.title + "]");
50         output("usingLabeledby.description:  [" + usingLabeledby.description + "]");
51     }
52
53     successfullyParsed = true;
54 </script>
55
56 </body>
57 </html>