blob: 34397c9a5a7f4c97c98b29442548f5cfba85e23a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
var successfullyParsed = false;
</script>
</head>
<body>
<div id="button1" tabindex="0" role="button" aria-disabled="true">button 1</div>
<div id="button2" tabindex="0" role="button" aria-disabled="false">button 2</div>
<div id="button3" tabindex="0" role="button">button 3</div>
<select disabled tabindex="0" id="select1"><option>1</option></select>
<select tabindex="0" id="select2"><option>2</option></select>
<p id="description"></p>
<div id="console"></div>
<script>
description("This test thats disabled and aria-disabled change the traits returned.");
if (window.accessibilityController) {
document.getElementById("button1").focus();
var btn1 = accessibilityController.focusedElement;
document.getElementById("button2").focus();
var btn2 = accessibilityController.focusedElement;
shouldBe("btn1.traits != btn2.traits", "true");
document.getElementById("button3").focus();
var btn3 = accessibilityController.focusedElement;
shouldBe("btn2.traits == btn3.traits", "true");
document.getElementById("select1").focus();
var select1 = accessibilityController.focusedElement;
document.getElementById("select2").focus();
var select2 = accessibilityController.focusedElement;
shouldBe("select1.traits != select2.traits", "true");
}
successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>