blob: 87d017d79273698342a5356af3ae67fca286e04f [file] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<body id="body">
<input type="text" aria-disabled="true" size=20>
<input type="text" aria-disabled="false" size=20>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that the aria-disabled attribute works. The text field should not be enabled.");
if (window.accessibilityController) {
var body = document.getElementById("body");
body.focus();
var textField;
if (accessibilityController.platformName === "atspi" || accessibilityController.platformName === "win")
textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
else
textField = accessibilityController.focusedElement.childAtIndex(0);
var succeeded = textField.isEnabled;
shouldBe("succeeded", "false");
if (accessibilityController.platformName === "atspi" || accessibilityController.platformName === "win")
textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1);
else
textField = accessibilityController.focusedElement.childAtIndex(1);
succeeded = textField.isEnabled;
shouldBe("succeeded", "true");
}
</script>
</body>
</html>