46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test.js"></script>
|
|
</head>
|
|
<body id="body">
|
|
|
|
<div role="group" tabindex=0 id="liveregion" aria-live="polite" aria-relevant="additions">
|
|
<h3 id="innerlive">text</h3>
|
|
<img src="test.gif" width=100 height=100 alt="alt text" tabindex=0 id="image">
|
|
</div>
|
|
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
<div id="notifications"></div>
|
|
|
|
<script>
|
|
|
|
description("This tests that ARIA removing an element from a live region sends the correct notification.");
|
|
|
|
var liveRegion = 0;
|
|
function ariaCallback(notification) {
|
|
if (notification == "AXLiveRegionChanged") {
|
|
document.getElementById("notifications").innerHTML += "Successfully received " + notification;
|
|
liveRegion.removeNotificationListener();
|
|
finishJSTest();
|
|
}
|
|
}
|
|
|
|
if (window.accessibilityController) {
|
|
jsTestIsAsync = true;
|
|
|
|
document.getElementById("liveregion").focus();
|
|
liveRegion = window.accessibilityController.focusedElement;
|
|
|
|
var addedNotification = liveRegion.addNotificationListener(ariaCallback);
|
|
shouldBe("addedNotification", "true");
|
|
|
|
// this should trigger our live region callback for a removed element.
|
|
document.getElementById("liveregion").removeChild(document.getElementById("innerlive"));
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|