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
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36

content / test / data / accessibility / display-locking / all-committed.html [blame]

<!--
@BLINK-ALLOW:offscreen
@WAIT-FOR:doneCommitting
-->
<div>
  <div style="height:10000px;">spacer so that everything below will be offscreen (and won't get viewport-activated)</div>
  <div id="locked" style="content-visibility: auto">
    <div>child text will be in AX tree but without layout</div>
    <div id="nested" style="content-visibility: auto">
      nested activatable locked element will be in AX tree but without layout
    </div>
  </div>
  normal text 1
  <div id="nonViewportActivatable" hidden=until-found>
    nested non-viewport-activatable locked element will not be in AX tree
  </div>
  normal text 2
  <div id="nonActivatable" style="content-visibility: hidden">
    nested non-activatable locked element will not be in AX tree
  </div>
  normal text 3
  <div id="statusDiv"></div>
</div>

<script>
  // Force layout, then commit everything.
  locked.removeAttribute("style");
  nested.removeAttribute("style");
  nonViewportActivatable.removeAttribute("style");
  nonActivatable.removeAttribute("style");
  window.requestAnimationFrame(() => {
    window.requestAnimationFrame(() => {
      statusDiv.innerText = "doneCommitting";
    });
  });
</script>