tor-browser

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

focus-slot-box-generated-tabindex-0.html (986B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>HTML Test: focus - slot with tabindex=0 that generates a box should be focusable</title>
      4 <link rel="help" href="https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="/resources/testdriver.js"></script>
      8 <script src="/resources/testdriver-vendor.js"></script>
      9 <script src="resources/shadow-utils.js"></script>
     10 <body>
     11 <div id=host>
     12  <template shadowrootmode=open>
     13    <slot tabindex=0 style="display: inline-block;"></slot>
     14  </template>
     15  Content
     16 </div>
     17 <script>
     18 promise_test(async () => {
     19  const host = document.getElementById("host");
     20  const slot = host.shadowRoot.querySelector("slot");
     21 
     22  resetFocus();
     23  await navigateFocusForward();
     24 
     25  return assert_equals(slot, host.shadowRoot.activeElement);
     26 }, "slot with tabindex=0 that generates a box should be focusable");
     27 </script>
     28 </body>