basic.html (1366B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testdriver.js"></script> 5 <script src="/resources/testdriver-vendor.js"></script> 6 <script src="/resources/testdriver-actions.js"></script> 7 <script src="/wai-aria/scripts/aria-utils.js"></script> 8 9 <p>Tests the basic shadow DOM portions of the AccName <em>Name Computation</em> algorithm, coming in <a href="https://github.com/w3c/accname/pull/167">ARIA #167</a>.</p> 10 11 <label id="label1"> 12 <div id="host1"></div> 13 </label> 14 <button id="labelled1" 15 class="labelled" 16 type="button" 17 aria-labelledby="label1" 18 data-expectedlabel="foo" 19 data-testname="aria-labelledby reference to element with text content inside shadow DOM"></button> 20 21 <label id="label2"> 22 <div id="host2"></div> 23 </label> 24 <button id="labelled2" 25 class="labelled" 26 type="button" 27 aria-labelledby="label2" 28 data-expectedlabel="bar" 29 data-testname="aria-labelledby reference to element with aria-label inside shadow DOM"></button> 30 <script> 31 32 document.getElementById('host1').attachShadow({ mode: 'open' }).innerHTML = 'foo'; 33 document.getElementById('host2').attachShadow({ mode: 'open' }).innerHTML = '<div aria-label="bar"></div>'; 34 35 AriaUtils.verifyLabelsBySelector('.labelled'); 36 37 </script>