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

content / test / data / accessibility / event / expanded-changed.html [blame]

<!--
  @UIA-WIN-DENY:*
  @UIA-WIN-ALLOW:ExpandCollapse*
  @UIA-WIN-ALLOW:AriaProperties*
-->
<!DOCTYPE html>
<html>
<body>
<a role="link" aria-expanded="false" id="title" href="#">Toggle</a>
<ul id="list" aria-label="list" style="visibility: hidden;">
  <li aria-label="list item 1">ListItem 1</li>
  <li aria-label="list item 2">ListItem 2</li>
  <li aria-label="list item 3">ListItem 3</li>
</ul>
<script>
  var go_passes = [
    () => document.getElementById('list').style.visibility = 'visible',
    () => document.getElementById('title').setAttribute('aria-expanded', 'true'),
  ];

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