tor-browser

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

687.html (1904B)


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