56 lines
1.5 KiB
HTML
56 lines
1.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../resources/js-test-pre.js"></script>
|
|
</head>
|
|
|
|
<body id="body">
|
|
|
|
<div id="bg">
|
|
<p id="bgContent">Other page content with <a href="#">a dummy focusable element</a></p>
|
|
</div>
|
|
|
|
<div id="container">
|
|
<div role="dialog" aria-modal="false" id="box">
|
|
<h3 id="myDialog">Just an example.</h3>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
description("This tests that when something is aria-modal inside an aria-hidden it is ignored.");
|
|
window.jsTestIsAsync = true;
|
|
|
|
async function test() {
|
|
if (window.accessibilityController) {
|
|
shouldBeFalse("accessibilityController.accessibleElementById('bgContent').isIgnored");
|
|
|
|
await new Promise(requestAnimationFrame);
|
|
|
|
document.getElementById("box").setAttribute("aria-modal", "true");
|
|
|
|
await new Promise(requestAnimationFrame);
|
|
|
|
backgroundContent = accessibilityController.accessibleElementById('bgContent');
|
|
shouldBeTrue("!backgroundContent || backgroundContent.isIgnored");
|
|
|
|
await new Promise(requestAnimationFrame);
|
|
|
|
document.getElementById("container").setAttribute("aria-hidden", "true");
|
|
|
|
await new Promise(requestAnimationFrame);
|
|
|
|
shouldBeFalse("accessibilityController.accessibleElementById('bgContent').isIgnored");
|
|
finishJSTest();
|
|
}
|
|
}
|
|
test();
|
|
|
|
</script>
|
|
|
|
|
|
<script src="../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|