tor-browser

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

712.html (1612B)


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