blob: 373c5d47701b430203eced50ab4814a1dca2a2fc [file] [log] [blame]
<html>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<body id="body">
<!-- This test makes sure that an input image returns its alt tag as the description -->
<input type="image" alt="Submit" src="resources/cake.png" width=100 height=100 id="image1">
<div id="result"></div>
<script>
if (window.accessibilityController) {
var result = document.getElementById("result");
var image1 = document.getElementById("image1");
image1.focus();
var img = accessibilityController.focusedElement;
var pattern = "Description: Submit";
if (img.allAttributes().indexOf(pattern) != -1) {
result.innerText += "Test passed\n";
}
else {
result.innerText += "Test failed\n";
}
}
</script>
</body>
</html>