blob: 081efbb33d5e7c6901a8893045dd1ebab1f79bac [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<body>
<script src="../resources/js-test.js"></script>
<style>
button {
padding: 30px;
}
</style>
<button id="cake">Button with image of <img alt="cake" src="resources/cake.png" width="40px"></button>
<div id="console"></div>
<script>
description("This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..");
if (window.testRunner && window.accessibilityController) {
testRunner.dumpAsText();
var button = document.getElementById('cake');
button.focus();
shouldBe("document.activeElement == button", "true");
window.axButton = accessibilityController.focusedElement;
shouldBe("axButton.name.indexOf('Button with image of cake') >= 0", "true");
}
</script>
</body>
</html>