css-table-not-focusgroup.html (1383B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>HTML Test: focusgroup - Validate that Focusgroup doesn't work on CSS table when the focusgroup attribute is not present.</title> 4 <link rel="author" title="Microsoft" href="http://www.microsoft.com/"> 5 <link rel="help" href="https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Focusgroup/explainer.md"> 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="../resources/focusgroup-utils.js"></script> 12 13 <div style="display:table"> 14 <div style="display:table-row"> 15 <div id=r1c1 style="display:table-cell" tabindex=0>r1c1</div> 16 <div id=r1c2 style="display:table-cell" tabindex=0>r1c2</div> 17 </div> 18 <div style="display:table-row"> 19 <div id=r2c1 style="display:table-cell" tabindex=0>r2c1</div> 20 <div id=r2c2 style="display:table-cell" tabindex=0>r2c2</div> 21 </div> 22 </div> 23 24 <script> 25 promise_test(async t => { 26 var r1c1 = document.getElementById("r1c1"); 27 28 await focusAndKeyPress(r1c1, kArrowRight); 29 assert_equals(document.activeElement, r1c1); 30 }, "Validates that a CSS table that doesn't have the focusgroup=grid attribute set doesn't allow arrow-keys navigation"); 31 32 </script>