blob: 572b37fea21d0f1e4ec3b8e31d4d06d1c9fee9d6 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body id="body">
<input type="text" aria-required="true" id="textfield1">
<input type="text" aria-required="false" id="textfield2">
<input type="text" id="textfield3">
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that aria-required is a usable attribute.");
if (window.accessibilityController) {
// this text field should be required.
document.getElementById("textfield1").focus();
var obj = accessibilityController.focusedElement;
var succeeded = obj.isRequired;
shouldBe("succeeded", "true");
// this text field should not be required
document.getElementById("textfield2").focus();
var obj = accessibilityController.focusedElement;
var succeeded = !obj.isRequired;
shouldBe("succeeded", "true");
// this text field should not be required
document.getElementById("textfield3").focus();
var obj = accessibilityController.focusedElement;
var succeeded = !obj.isRequired;
shouldBe("succeeded", "true");
}
</script>
<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>