1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22

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

<!DOCTYPE html>
<html>
<body>
  <ul role="listbox">
    <li id="li1" role="option">Li1</li>
    <li id="li2" role="option">Li2</li>
    <li id="li3" role="option" aria-setsize="5">Li3</li>
  </ul>>
  <script>
    function go() {
      // Set aria-setsize to '4'; should fire an event.
      document.getElementById('li1').setAttribute('aria-setsize', '4');

      // Set aria-setsize to -1'; should fire an event.
      document.getElementById('li2').setAttribute('aria-setsize', '-1');

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