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-combo-box-expand.html [blame]

<!--
Unflake the test for IA2 which may or may not include these events for ROLE_SYSTEM_CARET
@WIN-DENY:EVENT_OBJECT_LOCATIONCHANGE*
@WIN-DENY:EVENT_OBJECT_SHOW*
-->
<!DOCTYPE html>
<html>
<body>
<input role="combobox" type="search" aria-expanded="false" aria-haspopup="true"
    aria-autocomplete="list" aria-activedescendant="" aria-owns="list">
<ul id="list" role="listbox">
<li id="option1" role="option">Apple</li>
<li id="option2" role="option">Orange</li>
<li id="option3" role="option">Banana</li>
</ul>
<script>
  var go_passes = [
    () => document.querySelector('input').focus(),
    () => document.querySelector('input').setAttribute('aria-expanded', 'true'),
    () => document.querySelector('input').setAttribute('aria-activedescendant', 'option1'),
  ];

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