| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../resources/js-test.js"></script> |
| <script src="../resources/accessibility-helper.js"></script> |
| <button id="ok" onclick="document.getElementById('dialog').close();" class="close-button">OK</button> |
| <button onclick="document.getElementById('dialog').close();" class="close-button">Cancel</button> |
| description("This test verifies several AX properties of the dialog element."); |
| if (window.accessibilityController) { |
| window.jsTestIsAsync = true; |
| // Show the dialog as modal. |
| document.getElementById("dialog").showModal(); |
| dialog = accessibilityController.accessibleElementById("dialog"); |
| let properties = `${dialog.role} ${dialog.subrole} ${dialog.roleDescription}`; |
| // Dismiss the modal and show the dialog as modeless. |
| document.getElementById("dialog").close(); |
| debug("Modeless dialog:"); |
| document.getElementById("dialog").show(); |
| dialog = accessibilityController.accessibleElementById("dialog"); |
| properties = `${dialog.role} ${dialog.subrole} ${dialog.roleDescription}`; |