Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / aria-toggle-button-with-title.html
blob3e11c14a088d47288777a38d52d405844f6a6474
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <script>
7 function runTest()
9 if (window.accessibilityController) {
11 document.getElementById("tbutton").focus();
12 tbutton1 = accessibilityController.focusedElement;
13 debug("Role: " + tbutton1.role);
14 shouldBe("tbutton1.deprecatedTitle", "'AXTitle: Toggle button'");
16 document.getElementById("button").focus();
17 button = accessibilityController.focusedElement;
18 debug("Role: " + button.role);
19 shouldBe("button.deprecatedTitle", "'AXTitle: Button title'");
22 </script>
24 </head>
25 <body id="body" onload="runTest()">
27 <a id="tbutton" tabindex="0" class="button" role="button" aria-pressed="true">Toggle button</a>
29 <div>
30 <button type="button" id="button" role="button"/>
31 <label>Button title</label>
32 </div>
34 <p id="description"></p>
35 <div id="console"></div>
37 <script>
38 description("This tests that a toggle button properly exposes the title when there isn't a direct relation and textUnderElement is required to be used.");
40 </script>
41 </body>
42 </html>