summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/accessibility/crashtests/aria-owns-from-aria-hidden-subtree.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/accessibility/crashtests/aria-owns-from-aria-hidden-subtree.html')
-rw-r--r--testing/web-platform/tests/accessibility/crashtests/aria-owns-from-aria-hidden-subtree.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/web-platform/tests/accessibility/crashtests/aria-owns-from-aria-hidden-subtree.html b/testing/web-platform/tests/accessibility/crashtests/aria-owns-from-aria-hidden-subtree.html
new file mode 100644
index 0000000000..3e148ae981
--- /dev/null
+++ b/testing/web-platform/tests/accessibility/crashtests/aria-owns-from-aria-hidden-subtree.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html class="test-wait">
+<!-- Test that setting aria-owns from an aria-hidden subtree does not crash -->
+<script>
+document.addEventListener("DOMContentLoaded", () => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.getElementById('owner').removeAttribute('aria-owns');
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ document.documentElement.className = '';
+ });
+ });
+ });
+ });
+});
+</script>
+</head>
+<body>
+<main aria-hidden="true">
+ <fieldset id='owner' aria-owns="paragraph1">
+ Text
+ </fieldset>
+</main>
+
+<div role="complementary" aria-label="Natural parent">
+ <p id="paragraph1">
+ <mark>
+ Child
+ </mark>
+ </p>
+</div>
+</body>
+</html>