| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| <div tabindex="0" id="button" role="button" aria-expanded="true">foo</div> |
| <div tabindex="0" id="heading" role="heading" aria-expanded="true">bar</div> |
| description("This tests that ARIA expanded will be exposed on arbitrary elements."); |
| if (window.accessibilityController) { |
| document.getElementById("button").focus(); |
| shouldBe("accessibilityController.focusedElement.role", "'AXRole: AXButton'"); |
| shouldBe("accessibilityController.focusedElement.isExpanded", "true"); |
| document.getElementById("heading").focus(); |
| shouldBe("accessibilityController.focusedElement.isExpanded", "true"); |
| shouldBe("accessibilityController.focusedElement.childAtIndex(0).isExpanded", "false"); |
| shouldBe("accessibilityController.focusedElement.childAtIndex(0).role", "'AXRole: AXStaticText'"); |
| <script src="../../resources/js-test-post.js"></script> |