blob: 00080a4d08484f0f3cb765b229a29564e26f579f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script>
var successfullyParsed = false;
</script>
<script src="../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body id="body">
<img aria-live="polite" src="test.gif" width=100 height=100 alt="alt text" tabindex=0 id="image">
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that ARIA live regions that is on an image will work when the alt tag is changed.");
var image = 0;
function ariaCallback(notification) {
if (notification == "AXLiveRegionChanged") {
image.removeNotificationListener();
window.layoutTestController.notifyDone();
}
}
if (window.accessibilityController) {
window.layoutTestController.waitUntilDone();
document.getElementById("image").focus();
image = window.accessibilityController.focusedElement;
var addedNotification = image.addNotificationListener(ariaCallback);
shouldBe("addedNotification", "true");
// this should also trigger our live region change because its a text alternative change.
document.getElementById("image").setAttribute('alt', "new image text");
}
successfullyParsed = true;
</script>
<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>