Skip to content

Commit

Permalink
[A11y] Test for previously fixed crash on Microsoft Teams page
Browse files Browse the repository at this point in the history
Was actually fixed by CL:5232814. This test crashes without that CL.

Bug: 1522183
Change-Id: I4abf2fed5f1053bbb264561ccd89ba7d8f22fa77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5240986
Commit-Queue: Benjamin Beaudry <[email protected]>
Reviewed-by: Benjamin Beaudry <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1252935}
  • Loading branch information
aleventhal authored and chromium-wpt-export-bot committed Jan 27, 2024
1 parent 77ef12f commit 2901a5a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions accessibility/crashtests/aria-modal-aria-hidden.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- Test that aria-modal, aria-owns, aria-hidden, and aria-labelledby can work together without crashing.
This test case is a minimized version of a crash that occurred from a chat app. -->
<!DOCTYPE html>
<html class="test-wait">
<div role="main" aria-owns="owned"></div>
<div id="owned">
<span aria-hidden="true" id="hidden-label"></span>
</div>
<div role="dialog" aria-modal="true">
<a aria-labelledby="hidden-label"></a>
</div>
<script>
let dialogNode = null;

document.addEventListener('DOMContentLoaded', () => {
dialogNode = document.querySelector("[role=dialog]")
dialogNode.remove();
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.querySelector("[role=main]").setAttribute("aria-hidden", true);
document.querySelector("body").appendChild(dialogNode);
document.documentElement.className = '';
});
});
});

</script>
</html>

0 comments on commit 2901a5a

Please sign in to comment.