42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body id="body">
|
|
|
|
<div tabindex=0 id="scroller1" aria-valuenow="55" role="scrollbar" aria-orientation="vertical">scrollbar</div>
|
|
<div tabindex=0 id="scroller2" aria-valuenow="55" role="scrollbar">scrollbar</div>
|
|
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
|
|
description("This tests that the ARIA scrollbar role works correctly");
|
|
|
|
if (window.accessibilityController) {
|
|
|
|
document.getElementById("scroller1").focus();
|
|
var scroller = accessibilityController.focusedElement;
|
|
shouldBe("scroller.role", "'AXRole: AXScrollBar'");
|
|
shouldBe("scroller.intValue", "55");
|
|
shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");
|
|
|
|
document.getElementById("scroller1").setAttribute("aria-orientation", "horizontal");
|
|
shouldBe("scroller.orientation", "'AXOrientation: AXHorizontalOrientation'");
|
|
|
|
// Default orientation should be vertical for scrollbars
|
|
document.getElementById("scroller2").focus();
|
|
scroller = accessibilityController.focusedElement;
|
|
shouldBe("scroller.role", "'AXRole: AXScrollBar'");
|
|
shouldBe("scroller.intValue", "55");
|
|
shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");
|
|
}
|
|
|
|
</script>
|
|
|
|
<script src="../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|