does-not-move-when-on-focusgroup-root.html (1189B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>HTML Test: focusgroup - Focus does not move when initially set on the focusgroup root.</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 id=root tabindex=0 focusgroup="toolbar"> 14 <span id=item1 tabindex=0>item1</span> 15 <span id=item2 tabindex=0>item2</span> 16 </div> 17 18 <script> 19 20 promise_test(async t => { 21 var root = document.getElementById("root"); 22 23 await focusAndKeyPress(root, kArrowUp); 24 assert_equals(document.activeElement, root); 25 26 await focusAndKeyPress(root, kArrowLeft); 27 assert_equals(document.activeElement, root); 28 }, "When the focus is set on the root of a focusgroup element, an arrow key press shouldn't move the focus at all."); 29 30 </script>