<!DOCTYPE HTML>
<head>
<title>Test input type=range with ARIA attributes</title>
<script src="../resources/js-test.js"></script>
</head>
<body>
<div>
<input id="range1" type="range" min="1" max="10" value="5">
<input id="range2" type="range" min="1" max="10" value="5"
aria-valuemin="10" aria-valuemax="100" aria-valuenow="50">
<input id="range3" type="range" min="1" max="10" value="5"
aria-valuetext="5 of 10">
</div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
description("This tests that ARIA attributes can be used to override the value of an input type=range even if it doesn't have an ARIA role of slider, because it has an *implicit* ARIA role of slider already. http://www.w3.org/TR/html-aapi/#el-78");
if (window.accessibilityController) {
window.axRange1 = accessibilityController.accessibleElementById("range1");
window.axRange2 = accessibilityController.accessibleElementById("range2");
window.axRange3 = accessibilityController.accessibleElementById("range3");
shouldBe("axRange1.minValue", "1");
shouldBe("axRange1.maxValue", "10");
shouldBe("axRange1.intValue", "5");
shouldBe("axRange2.minValue", "10");
shouldBe("axRange2.maxValue", "100");
shouldBe("axRange2.intValue", "50");
shouldBe("axRange3.valueDescription", "'AXValueDescription: 5 of 10'");
}
</script>
</body>