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

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

<!--
@UIA-WIN-DENY:*
@UIA-WIN-ALLOW:LayoutInvalidated*
@UIA-WIN-ALLOW:AriaProperties*
-->
<!DOCTYPE html>
<html>
<body>
  <h4 id="d1">Item1</h4>
  <h4 id="d2" aria-busy="true">Item2</h4>
  <h4 id="d3" aria-busy="true">Item3</h4>
  <h4 id="d4">Item4</h4>
  <button onclick="go()">go</button>
  <script>
    function go() {
      // default is false, so this shouldn't fire an event
      document.getElementById('d1').setAttribute('aria-busy', false);

      // set busy from true->false; should fire invalidate-layout and
      // aria-properties events
      document.getElementById('d2').setAttribute('aria-busy', false);

      // set busy from true->[removed]; should fire invalidate-layout and
      // aria-properties events
      document.getElementById('d3').removeAttribute('aria-busy');

      // setting to true should not fire a invalidate-layout event, but should
      // fire an aria-properties event
      document.getElementById('d4').setAttribute('aria-busy', true);
    }
  </script>
</body>
</html>