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
   31
   32
   33
   34

content / test / data / accessibility / html / ignored-selection-no-unignored.html [blame]

<!--
@WIN-ALLOW:caret_offset*
@WIN-ALLOW:n_selections*
@WIN-ALLOW:selection_start*
@WIN-ALLOW:selection_end*
@BLINK-ALLOW:editable*
@BLINK-ALLOW:richlyEditable*
@BLINK-ALLOW:*textSel*
@AURALINUX-ALLOW:editable
@AURALINUX-ALLOW:multi-line
@AURALINUX-ALLOW:caret_offset*
@AURALINUX-ALLOW:selection_start*
@AURALINUX-ALLOW:selection_end*
@WAIT-FOR:Done
-->

<body>
  <div>
    <div id='hidden-before' aria-hidden="true">Some ignored text</div>
    <div id='hidden-after' aria-hidden="true">this text is also ignored</div>
  </div>
</body>

<script>
  var selection = window.getSelection();
  var selectionRange = document.createRange();
  var hidden_before = document.getElementById('hidden-before')
  var hidden_after = document.getElementById('hidden-after')
  selectionRange.setStart(hidden_before.firstChild, 10);
  selectionRange.setEnd(hidden_after.firstChild, 8);
  selection.removeAllRanges();
  selection.addRange(selectionRange);
  document.body.appendChild(document.createTextNode("Done"));
</script>