content-visibility-087.html (848B)
1 <!doctype HTML> 2 <html> 3 <meta charset="utf8"> 4 <title>Content visibility: focus does not target nested c-v: hidden/auto subtree"</title> 5 <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> 7 <meta name="assert" content="focus does not target nested c-v: hidden/auto subtree"> 8 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 12 <div style="content-visibility: hidden"> 13 <div style="content-visibility: auto"> 14 <div id="focusable" tabIndex="0"> 15 focusable thing 16 </div> 17 </div> 18 </div> 19 20 <script> 21 test(() => { 22 focusable.focus(); 23 assert_not_equals(document.activeElement, focusable); 24 }, "Trying to focus on an element in a nested hidden/auto subtree will not work"); 25 </script> 26 </html>