Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / accessibility / aria-checkbox-text.html
blob7763d86e9f218e401cf076f4eb2c117e6e44f838
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
5 <script>
6 var successfullyParsed = false;
7 </script>
8 <script src="../fast/js/resources/js-test-pre.js"></script>
9 </head>
10 <body id="body">
12 <div role="radiobuttongroup">
13 <div role="checkbox" id="check1" tabindex="0" aria-checked="true">One</div>
14 <div role="checkbox" id="check2" tabindex="0">Two</div>
15 <div role="checkbox" id="check3" tabindex="0" id="foo" aria-labelledby="foo">Three</div>
16 </div>
18 <p id="description"></p>
19 <div id="console"></div>
21 <script>
23 description("This tests that ARIA checkboxes use accessible name computation.");
25 if (window.accessibilityController) {
27 var checkbox = document.getElementById("check1");
28 checkbox.focus();
29 checkbox = accessibilityController.focusedElement;
30 shouldBe("checkbox.title", "'AXTitle: One'");
32 checkbox = document.getElementById("check2");
33 checkbox.focus();
34 checkbox = accessibilityController.focusedElement;
35 shouldBe("checkbox.title", "'AXTitle: Two'");
37 checkbox = document.getElementById("check3");
38 checkbox.focus();
39 checkbox = accessibilityController.focusedElement;
40 shouldBe("checkbox.title", "'AXTitle: Three'");
43 successfullyParsed = true;
44 </script>
46 <script src="../fast/js/resources/js-test-post.js"></script>
47 </body>
48 </html>