| Tests focus when a modal dialog is opened. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS document.activeElement is outerButton |
| Test that focus goes to body if the dialog has no focusable elements, including itself |
| PASS document.activeElement is document.body |
| Test that an autofocus element in the dialog gets focus. |
| PASS document.activeElement is autofocusButton |
| ... or else first focusable element in the dialog gets focus. |
| PASS document.activeElement is firstButton |
| ... or else the dialog itself gets focus. |
| PASS document.activeElement is dialog |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |