tor-browser

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

685.html (1861B)


      1 <!DOCTYPE html> 
      2 <html>
      3  <head>
      4    <title>ARIA 1.0 Test Case 685</title>
      5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      6  </head>
      7  <body>
      8    <h1>ARIA 1.0 Test Case 685</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="polite" and the element has a child DOM element node with text content 
     16      that is hidden using CSS display="none". After the onload event completes a child DOM element 
     17      node with text content has the CSS display property changed to display="block".</p>
     18    
     19    <script>  
     20 
     21      function showElement() {
     22        var node  = document.getElementById('TEST_ID_3');  
     23        node.style.display = "block";        
     24      }
     25 
     26      function addChildElementNode() {
     27        var node         = document.getElementById('TEST_ID_2');  
     28        var element_node = document.createElement('div');        
     29        element_node.setAttribute('id', 'TEST_ID_3');        
     30        element_node.setAttribute('style', 'display: none');        
     31        var text_node    = document.createTextNode("TEST TEXT");        
     32        element_node.appendChild(text_node);
     33        node.appendChild(element_node);
     34        setTimeout(showElement,1000);
     35      }
     36 
     37      function addLiveRegion() {
     38        var node         = document.getElementById('TEST_ID_1');  
     39        var element_node = document.createElement('div');        
     40        element_node.setAttribute('id', 'TEST_ID_2');
     41        element_node.setAttribute('aria-live', 'polite');
     42        node.appendChild(element_node);
     43        setTimeout(addChildElementNode,1000);
     44      }
     45 
     46      function onload() {
     47        addLiveRegion();
     48      }
     49     
     50      window.addEventListener('load', onload);
     51    </script>
     52  </body>
     53  
     54 </html>