1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
9 <div role=
"option">option
1</div>
10 <div role=
"option" aria-label=
"label 2">option
2</div>
13 <p id=
"description"></p>
14 <div id=
"console"></div>
18 description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.");
20 if (window
.accessibilityController
) {
22 var body
= document
.getElementById("body");
25 var listBox
= accessibilityController
.focusedElement
.childAtIndex(0);
26 var firstChild
= listBox
.childAtIndex(0);
27 var secondChild
= listBox
.childAtIndex(1);
28 debug("firstChild.role is " + firstChild
.role
);
29 shouldBe("firstChild.deprecatedTitle", "'AXTitle: option 1'");
31 debug("secondChild.role is " + secondChild
.role
);
32 shouldBe("secondChild.deprecatedDescription", "'AXDescription: label 2'");
34 shouldBe("firstChild.childrenCount", "0");
35 shouldBe("secondChild.childrenCount", "0");