blob: b5797b396c757c0627963c8e5318893d9e239b81 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<span tabindex="0" role="slider" id="slider1" aria-valuenow=5 aria-valuemin=0 aria-valuemax=10>X</span>
<input type="range" id="slider2">
<p id="description"></p>
<div id="console"></div>
<script>
description("This test makes sure that AXIncrement and Decrement are exposed on sliders (ARIA and input).");
if (window.accessibilityController) {
// test the ARIA slider
document.getElementById("slider1").focus();
var obj = accessibilityController.focusedElement;
var succeeded = obj.isIncrementActionSupported();
shouldBe("succeeded", "true");
var succeeded = obj.isDecrementActionSupported();
shouldBe("succeeded", "true");
var succeeded = obj.stringAttributeValue("AXOrientation") == "AXHorizontalOrientation";
shouldBe("succeeded", "true");
// test the input slider
document.getElementById("slider2").focus();
var obj = accessibilityController.focusedElement;
var succeeded = obj.isIncrementActionSupported();
shouldBe("succeeded", "true");
var succeeded = obj.isDecrementActionSupported();
shouldBe("succeeded", "true");
var succeeded = obj.stringAttributeValue("AXOrientation") == "AXHorizontalOrientation";
shouldBe("succeeded", "true");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>