blob: a70d46d8521605f1558ab5d95f501e0d9003ccde [file] [log] [blame]
<!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>