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

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

<!--
@UIA-WIN-DENY:*
@UIA-WIN-ALLOW:AriaProperties*
@UIA-WIN-ALLOW:LiveSetting*
-->
<!DOCTYPE html>
<html>
<body>
  <h4 id="d1" aria-live="off">Item1</h4>
  <h4 id="d2" aria-live="polite">Item2</h4>
  <h4 id="d3" aria-live="polite">Item3</h4>
  <h4 id="d4">Item4</h4>
  <div aria-live="polite">
    <h4 id="d5" aria-live="off">Item5</h4>
  </div>

  <button onclick="go()">go</button>
  <script>
    function go() {
      // set live from 'off' to 'off', so this shouldn't fire an event
      document.getElementById('d1').setAttribute('aria-live', 'off');

      // set live from 'polite'->'assertive'; should fire an event
      document.getElementById('d2').setAttribute('aria-live', 'assertive');

      // set live from 'polite'->[removed]; should fire event
      document.getElementById('d3').removeAttribute('aria-live');

      // set live to 'polite'; should fire an event
      document.getElementById('d4').setAttribute('aria-live', 'polite');

      // set live from 'off'->[removed] inside 'polite'; should fire event
      document.getElementById('d5').removeAttribute('aria-live');
    }
  </script>
</body>
</html>