blob: 8b43d93e78dcec2a3322ee81bc7a1ed7502a5e30 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<meter id="meter" value="83.5"></meter>
<meter id="meter2" value="5" optimum="50" min="0" max="100" low="10" high="80"></meter>
<meter id="meter3" value="50" optimum="50" min="0" max="100" low="10" high="80"></meter>
<meter id="meter4" value="90" optimum="20" min="0" max="100" low="50" high="80"></meter>
<meter id="meter5" value="50" optimum="50" min="0" max="100" low="10" high="80">50 hours</meter>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests the gauge value description for meter elements.");
if (window.accessibilityController) {
// Test that we are not exposing the gauge value description if author
// didn't specify low, high or optimum attribute.
var meter1 = accessibilityController.accessibleElementById("meter");
shouldBe("meter1.valueDescription", "'AXValueDescription: '");
var meter2 = accessibilityController.accessibleElementById("meter2");
shouldBe("meter2.valueDescription", "'AXValueDescription: suboptimal value'");
var meter3 = accessibilityController.accessibleElementById("meter3");
shouldBe("meter3.valueDescription", "'AXValueDescription: optimal value'");
var meter4 = accessibilityController.accessibleElementById("meter4");
shouldBe("meter4.valueDescription", "'AXValueDescription: critical value'");
// Test meter with inner text.
var meter5 = accessibilityController.accessibleElementById("meter5");
shouldBe("meter5.valueDescription", "'AXValueDescription: 50 hours, optimal value'");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>