tor-browser

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

comp_hidden_not_referenced.html (3809B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Name Comp: Hidden Not Referenced</title>
      6  <script src="/resources/testharness.js"></script>
      7  <script src="/resources/testharnessreport.js"></script>
      8  <script src="/resources/testdriver.js"></script>
      9  <script src="/resources/testdriver-vendor.js"></script>
     10  <script src="/resources/testdriver-actions.js"></script>
     11  <script src="/wai-aria/scripts/aria-utils.js"></script>
     12 </head>
     13 <body>
     14 
     15 <p>Tests the <a href="https://w3c.github.io/accname/#comp_hidden_not_referenced">#comp_hidden_not_referenced</a> portions of the AccName <em>Name Computation</em> algorithm.</p>
     16 
     17 <button
     18  class="ex"
     19  data-expectedlabel="visible to all users"
     20  data-testname="button containing a rendered, unreferenced element that is aria-hidden=true, an unreferenced element with the hidden host language attribute, and an unreferenced element that is unconditionally rendered"
     21 >
     22  <span aria-hidden="true">hidden,</span>
     23  <span hidden>hidden from all users,</span>
     24  <span>visible to all users</span>
     25 </button>
     26 
     27 <button
     28  class="ex"
     29  data-expectedlabel="hidden but referenced,"
     30  data-testname="button labelled by element that is aria-hidden=true"
     31  aria-labelledby="button-label-2"
     32 >
     33  <span aria-hidden="true" id="button-label-2">hidden but referenced,</span>
     34  <span hidden>hidden from all users,</span>
     35  <span>visible to all users</span>
     36 </button>
     37 
     38 <button
     39  class="ex"
     40  data-expectedlabel="hidden from all users but referenced,"
     41  data-testname="button labelled by element with the hidden host language attribute"
     42  aria-labelledby="button-label-3"
     43 >
     44  <span aria-hidden="true">hidden,</span>
     45  <span hidden id="button-label-3">hidden from all users but referenced,</span>
     46  <span>visible to all users</span>
     47 </button>
     48 
     49 <a
     50  class="ex"
     51  data-testname="link labelled by elements with assorted visibility and a11y tree exposure"
     52  data-expectedlabel="visible to all users, hidden but referenced, hidden from all users but referenced"
     53  href="#"
     54  aria-labelledby="link-label-1a link-label-1b link-label-1c"
     55 >
     56  <span id="link-label-1a">
     57    <span>visible to all users,</span>
     58    <span aria-hidden="true">hidden,</span>
     59  </span>
     60  <span aria-hidden="true" id="link-label-1b">hidden but referenced,</span>
     61  <span hidden id="link-label-1c">hidden from all users but referenced</span>
     62 </a>
     63 
     64 <h2
     65  class="ex"
     66  data-testname="heading with name from content, containing element that is visibility:hidden with nested content that is visibility:visible"
     67  data-expectedlabel="visible to all users, un-hidden for all users"
     68 >
     69  visible to all users,
     70  <span style="visibility: hidden;">
     71    hidden from all users,
     72    <span style="visibility: visible;">un-hidden for all users</span>
     73  </span>
     74 </h2>
     75 
     76 <!-- TODO: Test cases once https://github.com/w3c/aria/issues/1256 resolved: -->
     77 <!--       - button labelled by an element that is aria-hidden=true which contains a nested child that is aria-hidden=false -->
     78 <!--       - button labelled by an element that is aria-hidden=false which belongs to a parent that is aria-hidden=true -->
     79 <!--       - heading with name from content, containing rendered content that is aria-hidden=true with nested, rendered content that is aria-hidden=false -->
     80 <!--       - heading with name from content, containing element with the hidden host language attribute with nested content that is aria-hidden=false -->
     81 
     82 <!-- TODO: New test case?
     83 <!--       What is the expectation for a details element when it’s given an -->
     84 <!--       explicit role that allows name from contents (e.g., `comment`) -->
     85 <!--       but is also not in the open state, and therefore has contents -->
     86 <!--       that are both not rendered and excluded from the a11y tree. -->
     87 
     88 <script>
     89 AriaUtils.verifyLabelsBySelector(".ex");
     90 </script>
     91 </body>
     92 </html>