1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
8 <div tabindex=
0 id=
"scroller1" aria-valuenow=
"55" role=
"scrollbar" aria-orientation=
"vertical">scrollbar
</div>
9 <div tabindex=
0 id=
"scroller2" aria-valuenow=
"55" role=
"scrollbar">scrollbar
</div>
11 <p id=
"description"></p>
12 <div id=
"console"></div>
16 description("This tests that the ARIA scrollbar role works correctly");
18 if (window
.accessibilityController
) {
20 document
.getElementById("scroller1").focus();
21 var scroller
= accessibilityController
.focusedElement
;
22 shouldBe("scroller.role", "'AXRole: AXScrollBar'");
23 shouldBe("scroller.intValue", "55");
24 shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");
26 document
.getElementById("scroller1").setAttribute("aria-orientation", "horizontal");
27 shouldBe("scroller.orientation", "'AXOrientation: AXHorizontalOrientation'");
29 // Default orientation should be vertical for scrollbars
30 document
.getElementById("scroller2").focus();
31 scroller
= accessibilityController
.focusedElement
;
32 shouldBe("scroller.role", "'AXRole: AXScrollBar'");
33 shouldBe("scroller.intValue", "55");
34 shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");