Move platform/mac/accessibility tests to accessibility/mac.
[WebKit-https.git] / LayoutTests / accessibility / mac / aria-radiobutton-text.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div role="radiogroup">
9    <div role="radio" tabindex="0" aria-checked="true">One</div>
10    <div role="radio" tabindex="0">Two</div>
11    <div role="radio" tabindex="0" id="foo" aria-labelledby="foo">Three</div>
12 </div>
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This tests that aria radio buttons use the text inside of them as the title.");
20
21     if (window.accessibilityController) {
22
23           // this text field should be required.
24           document.getElementById("body").focus();
25           var obj = accessibilityController.focusedElement.childAtIndex(0);
26
27           var succeeded = obj.childAtIndex(0).title == "AXTitle: One";
28           shouldBe("succeeded", "true");
29
30           var succeeded = obj.childAtIndex(1).title == "AXTitle: Two";
31           shouldBe("succeeded", "true");
32
33           // Because the third button uses aria-labelledby, the accessible name
34           // will be inside the description field.
35           var succeeded = obj.childAtIndex(2).description == "AXDescription: Three";
36           shouldBe("succeeded", "true");
37     }
38
39 </script>
40
41 <script src="../../resources/js-test-post.js"></script>
42 </body>
43 </html>