scroll-button-disabled-no-focus.html (935B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>CSS Test: disabled ::scroll-button() shouldn't be focusable</title> 4 <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons"> 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-actions.js"></script> 9 <script src="/resources/testdriver-vendor.js"></script> 10 <style> 11 div::scroll-button(inline-start) { 12 content: ""; 13 background-color: green; 14 } 15 16 div::scroll-button(inline-start):focus { 17 background-color: red; 18 } 19 </style> 20 <div id="target"></div> 21 <script> 22 promise_test(async t => { 23 const kTab = '\uE004'; 24 await new test_driver.Actions() 25 .keyDown(kTab) 26 .keyUp(kTab) 27 .send(); 28 assert_equals(getComputedStyle(target, "::scroll-button(inline-start)").backgroundColor, "rgb(0, 128, 0)"); 29 }); 30 </script>