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
   35
   36
   37
   38
   39
   40
   41
   42

content / test / data / accessibility / html / modal-dialog-stack.html [blame]

<!--
@AURALINUX-ALLOW:modal
-->
<html>
<body>
Test the accessibility tree after a pending modal dialog becomes active.
<section>
  <dialog id="top-dialog">
    This was the top dialog and should be marked ignored in the tree.
  </dialog>
  <select>
    <optgroup label="Group">
      <option>This should be pruned out of the tree.</option>
    </optgroup>
  </select>
</section>
<button>This button should not be in the tree.</button>
<dialog id="middle-dialog">
  This was the middle dialog and should be marked ignored in the tree.
</dialog>
<dialog id="bottom-dialog">
  This is the now active dialog. Of course it should be in the tree.
  <button>This is in the active dialog and should be in the tree.</button>
</dialog>
<dialog id="pending-dialog">
  This is the pending dialog and should not be in the tree.
</dialog>
<script>
var pendingDialog = document.querySelector('#pending-dialog');
var bottomDialog = document.querySelector('#bottom-dialog');
var middleDialog = document.querySelector('#middle-dialog');
var topDialog = document.querySelector('#top-dialog');

pendingDialog.showModal();
bottomDialog.showModal();
middleDialog.showModal();
topDialog.showModal();
middleDialog.close();
topDialog.close();
</script>
</body>
</html>