tor-browser

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

706.html (1397B)


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