chromium/content/test/data/accessibility/event/aria-relevant-changed.html

<!--
@UIA-WIN-DENY:*
@UIA-WIN-ALLOW:AriaProperties*
-->
<!DOCTYPE html>
<html>
<body>
  <div id="d1" tabindex='0' aria-label="Div1" aria-live="polite">Div1</div>
  <div id="d2" tabindex='0' aria-label="Div2" aria-live="polite">Div2</div>
  <div id="d3" tabindex='0' aria-label="Div3" aria-live="polite">Div3</div>
  <div id="d4" tabindex='0' aria-label="Div4" aria-live="polite">Div4</div>
  <div id="d5" tabindex='0' aria-label="Div5" aria-live="polite" aria-relevant="true">Div5</div>
  <div id="d6" tabindex='0' aria-label="Div6" aria-live="polite" aria-relevant="true">Div6</div>
  <script>
    var go_passes = [
      // Set aria-relevant from default 'additions text'->'additions';
      // should fire an event.
      () => document.getElementById('d1').setAttribute('aria-relevant', 'additions'),

      // Set aria-relevant from default 'additions text'->'all';
      // should fire an event.
      () => document.getElementById('d2').setAttribute('aria-relevant', 'all'),

      // Set aria-relevant from default 'additions text'->'removals';
      // should fire an event.
      () => document.getElementById('d3').setAttribute('aria-relevant', 'removals'),

      // Set aria-relevant from default 'additions text'->'text';
      // should fire an event.
      () => document.getElementById('d4').setAttribute('aria-relevant', 'text'),

      // Set aria-relevant from 'additions'->'additions text';
      // should fire an event.
      () => document.getElementById('d5').setAttribute('aria-relevant', 'additions text'),

      // Set aria-relevant from 'additions'->[removed];
      // should fire an event.
      () => document.getElementById('d6').removeAttribute('aria-relevant'),
    ];

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