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

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

<!--
@AURALINUX-DENY:STATE-CHANGE:DEFUNCT*
@UIA-WIN-DENY:*
@UIA-WIN-ALLOW:AriaProperties*
-->
<!DOCTYPE html>
<html>
<body>
  <h4 id="d1">Item1</h4>
  <h4 id="d2" aria-hidden="true">Item2</h4>
  <h4 id="d3" aria-hidden="false">Item3</h4>
  <h4 id="d4" aria-hidden="true">Item4</h4>
  <script>
    function go() {
      // Set aria-hidden from [removed]->false; will fire an event.
      // Note that aria-hidden="false" has a different meaning than aria-hidden not present.
      document.getElementById('d1').setAttribute('aria-hidden', 'false');

      // Set aria-hidden from true->false; should fire an event.
      document.getElementById('d2').setAttribute('aria-hidden', 'false');

      // Set aria-hidden from false->true; should fire an event.
      document.getElementById('d3').setAttribute('aria-hidden', 'true');

      // Set aria-hidden from true->[removed]; should fire an event.
      document.getElementById('d4').removeAttribute('aria-hidden');
    }
  </script>
</body>
</html>