tor-browser

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

focus-tabindex-default-value.html (936B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>HTML Test: focus - default value of tabindex</title>
      4 <link rel="author" title="Intel" href="http://www.intel.com/">
      5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#sequential-focus-navigation-and-the-tabindex-attribute">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <div id="log"></div>
      9 <button id="test1">TEST1</button>
     10 <div id="test2">TEST2</div>
     11 <script>
     12 
     13 test(function() {
     14  assert_equals(document.getElementById("test1").tabIndex, 0, "The value of tabIndex attribute should be 0.");
     15 }, "The default value of tabIndex attribute must be 0 for elements that are focusable");
     16 
     17 test(function() {
     18  assert_equals(document.getElementById("test2").tabIndex, -1, "The value of tabIndex attribute should be -1.");
     19 }, "The default value of tabIndex attribute must be -1 for elements that are not focusable");
     20 
     21 </script>