tor-browser

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

691.html (1444B)


      1 <!DOCTYPE html> 
      2 <html>
      3  <head>
      4    <title>ARIA 1.0 Test Case 691</title>
      5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      6  </head>
      7  <body>
      8    <h1>ARIA 1.0 Test Case 691</h1>
      9    
     10    <div id="TEST_ID_1">
     11    </div>
     12    
     13    <h2>Description</h2>
     14    <p>The aria-live attribute is added to an element in the document by a script 
     15      after the onload event completes with the value="polite". After the aria-live 
     16      attribute is added, a child DOM element node is added to the element with 
     17      the aria-live attribute.</p>
     18    
     19    <script>  
     20 
     21      function addChildElementNode() {
     22        var node         = document.getElementById('TEST_ID_2');  
     23        var element_node = document.createElement('div');        
     24        var text_node    = document.createTextNode("TEST TEXT"); 
     25        element_node.appendChild(text_node);
     26        node.appendChild(element_node);
     27      }
     28 
     29      function addLiveRegion() {
     30        var node         = document.getElementById('TEST_ID_1');  
     31        var element_node = document.createElement('div');        
     32        element_node.setAttribute('id', 'TEST_ID_2');
     33        element_node.setAttribute('aria-live', 'polite');
     34        node.appendChild(element_node);
     35        setTimeout(addChildElementNode,500);
     36      }
     37 
     38      function onload() {
     39        setTimeout(addLiveRegion,1000);
     40      }
     41     
     42      window.addEventListener('load', onload);
     43    </script>
     44  </body>
     45  
     46 </html>