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

content / test / data / accessibility / aria / aria-searchbox-with-selection.html [blame]

<!--
@MAC-ALLOW:AXRoleDescription
@WIN-ALLOW:caret_offset*
@WIN-ALLOW:ia2_hypertext=*
@WIN-ALLOW:n_selections*
@WIN-ALLOW:selection_start*
@WIN-ALLOW:selection_end*
@WIN-ALLOW:xml-roles*
-->
<!DOCTYPE html>
<html>
<body>
  <div id="searchbox" role="searchbox" tabindex="0">ARIA role searchbox.</div>
  <script>
    var selection = window.getSelection();
    var selectionRange = document.createRange();
    var searchbox = document.getElementById('searchbox');
    searchbox.focus();
    selectionRange.selectNodeContents(searchbox);
    selection.removeAllRanges();
    selection.addRange(selectionRange);
  </script>
</body>
</html>