content-visibility-082.html (789B)
1 <!doctype HTML> 2 <html> 3 <meta charset="utf8"> 4 <title>CSS Content Visibility: focus selects content-visibility element</title> 5 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> 7 <link rel="match" href="container-focus-ref.html"> 8 <meta name="assert" content="The elements with content-visibility are still focusable"> 9 10 <style> 11 #container { 12 content-visibility: hidden; 13 width: 150px; 14 height: 150px; 15 background: lightblue; 16 } 17 #child { 18 width: 50px; 19 height: 50px; 20 background: lightgreen; 21 } 22 </style> 23 24 <p>Test passes if the light blue box below has focus. 25 <div id=container tabindex=0> 26 <div id=child></div> 27 </div> 28 29 <script> 30 onload = () => container.focus(); 31 </script> 32 </html>