blob: 014f1d17a8149c4f5408ad1711c78019185a865a [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<body>
<script src="../resources/js-test-pre.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) {
window.testRunner.dumpAsText();
var button = document.getElementById('cake');
button.focus();
shouldBe("document.activeElement == button", "true");
window.axButton = accessibilityController.focusedElement;
shouldBe("axButton.title.indexOf('Button with image of cake') >= 0", "true");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>