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
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55

content / test / data / accessibility / event / children-changed-only-on-ancestor.html [blame]

<!--
@WIN-DENY:IA2_EVENT_TEXT_INSERTED*
@WIN-DENY:IA2_EVENT_TEXT_REMOVED*
@WIN-DENY:EVENT_OBJECT_STATECHANGE*
@WIN-DENY:EVENT_OBJECT_LOCATIONCHANGE*
-->
<html>
  <body>
    <!-- Show/Hide events only need to occur on the root of what's shown/hidden,
     not for each descendant. -->
    <div role="tree" id="tree">
      <div role="article" id="article">
        <div role="group">
          <div role="treeitem" tabindex="0">
            <div role="link" id="child1">
              <div id="grandchild1">grandchild1</div>
            </div>
          </div>
          <div role="treeitem" tabindex="0">
            <div role="link" id="child2">
              <div id="grandchild2">grandchild2</div>
            </div>
          </div>
          <div role="treeitem" tabindex="0">
            <div role="link" id="child3">
              <div id="grandchild3">grandchild3</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script>
      const go_passes = [
        // Hide action.
        () => {
          document.getElementById("article").setAttribute("aria-hidden", "true");
          document.getElementById("article").setAttribute("style", "width: 0px; height: 0px;");
        },

        // Show action.
        () => {
          document.getElementById("article").setAttribute("aria-hidden", "false");
          document.getElementById("article").setAttribute("style", "width: auto; height: auto;");
        }
      ];

      let current_pass = 0;

      function go() {
        go_passes[current_pass++].call();
        return current_pass < go_passes.length;
      }
    </script>
  </body>
</html>