tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

aria-modal-aria-hidden.html (898B)


      1 <!-- Test that aria-modal, aria-owns, aria-hidden, and aria-labelledby can work together without crashing.
      2     This test case is a minimized version of a crash that occurred from a chat app. -->
      3 <!DOCTYPE html>
      4 <html class="test-wait">
      5 <div role="main" aria-owns="owned"></div>
      6 <div id="owned">
      7  <span aria-hidden="true" id="hidden-label"></span>
      8 </div>
      9 <div role="dialog" aria-modal="true">
     10  <a aria-labelledby="hidden-label"></a>
     11 </div>
     12 <script>
     13 let dialogNode = null;
     14 
     15 document.addEventListener('DOMContentLoaded', () => {
     16  dialogNode = document.querySelector("[role=dialog]")
     17  dialogNode.remove();
     18  requestAnimationFrame(() => {
     19    requestAnimationFrame(() => {
     20      document.querySelector("[role=main]").setAttribute("aria-hidden", true);
     21      document.querySelector("body").appendChild(dialogNode);
     22      document.documentElement.className = '';
     23    });
     24  });
     25 });
     26 
     27 </script>
     28 </html>