| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| <img aria-live="polite" src="test.gif" width=100 height=100 alt="alt text" tabindex=0 id="image"> |
| description("This tests that ARIA live regions that is on an image will work when the alt tag is changed."); |
| function ariaCallback(notification) { |
| if (notification == "AXLiveRegionChanged") { |
| image.removeNotificationListener(); |
| window.testRunner.notifyDone(); |
| if (window.accessibilityController) { |
| window.testRunner.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"); |
| <script src="../../resources/js-test-post.js"></script> |