summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-087.html
blob: f2faa45774cde805a295f3376b87444091500f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!doctype HTML>
<html>
<meta charset="utf8">
<title>Content visibility: focus does not target nested c-v: hidden/auto subtree"</title>
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
<meta name="assert" content="focus does not target nested c-v: hidden/auto subtree">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<div style="content-visibility: hidden">
  <div style="content-visibility: auto">
    <div id="focusable" tabIndex="0">
      focusable thing
    </div>
  </div>
</div>

<script>
test(() => {
  focusable.focus();
  assert_not_equals(document.activeElement, focusable);
}, "Trying to focus on an element in a nested hidden/auto subtree will not work");
</script>
</html>