tor-browser

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

672.html (1177B)


      1 <!DOCTYPE html> 
      2 <html>
      3  <head>
      4    <title>ARIA 1.0 Test Case 672</title>
      5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      6  </head>
      7  <body>
      8    <h1>ARIA 1.0 Test Case 672</h1>
      9    <ul role="listbox">
     10      <li role="option" aria-selected="false" id="TEST_ID" tabindex="0">Option 1</li> 
     11      <li role="option">Option 2</li> 
     12    </ul>
     13    
     14    <h2>Description</h2>
     15    <p>For an element with role "option" which is a child of an element with role "listbox", 
     16      and the value of the "aria-selected" attribute changes (from "true", or to "true").</p>
     17    
     18    <script>  
     19      function changeSelectedState() {
     20        var test_node = document.getElementById('TEST_ID');  
     21        var state = test_node.getAttribute('aria-selected');
     22     
     23        if (state === 'false') test_node.setAttribute('aria-selected', 'true');
     24        else test_node.setAttribute('aria-selected', 'true');
     25 
     26      }
     27  
     28     function setFocus() {
     29       var test_node = document.getElementById('TEST_ID');  
     30       test_node.focus();
     31       setTimeout(changeSelectedState,1000);
     32     }
     33     
     34     window.addEventListener('load', setFocus);
     35    </script>
     36  </body>
     37  
     38 </html>