Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / accessibility / aria-option-role.html
blob71faf5b2a54ddfd9ed4b2f366b8ad041256e5138
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="listbox">
13 <div role="option">option 1</div>
14 <div role="option" title="label 2">option 2</div>
15 </div>
17 <p id="description"></p>
18 <div id="console"></div>
20 <script>
22 description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.");
24 if (window.accessibilityController) {
26 var body = document.getElementById("body");
27 body.focus();
29 var listBox = accessibilityController.focusedElement.childAtIndex(0);
30 var firstChild = listBox.childAtIndex(0);
31 var secondChild = listBox.childAtIndex(1);
32 shouldBe("firstChild.role", "'AXRole: AXStaticText'");
33 shouldBe("firstChild.title", "'AXTitle: option 1'");
35 shouldBe("secondChild.role", "'AXRole: AXStaticText'");
36 shouldBe("secondChild.title", "'AXTitle: label 2'");
38 shouldBe("firstChild.childrenCount", "0");
39 shouldBe("secondChild.childrenCount", "0");
42 successfullyParsed = true;
43 </script>
45 <script src="../fast/js/resources/js-test-post.js"></script>
46 </body>
47 </html>