| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../fast/js/resources/js-test-pre.js"></script> |
| <div role="option">option 1</div> |
| <div role="option" aria-label="label 2">option 2</div> |
| description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children."); |
| if (window.accessibilityController) { |
| var body = document.getElementById("body"); |
| var listBox = accessibilityController.focusedElement.childAtIndex(0); |
| var firstChild = listBox.childAtIndex(0); |
| var secondChild = listBox.childAtIndex(1); |
| shouldBe("firstChild.role", "'AXRole: AXStaticText'"); |
| shouldBe("firstChild.title", "'AXTitle: option 1'"); |
| shouldBe("secondChild.role", "'AXRole: AXStaticText'"); |
| shouldBe("secondChild.description", "'AXDescription: label 2'"); |
| shouldBe("firstChild.childrenCount", "0"); |
| shouldBe("secondChild.childrenCount", "0"); |
| <script src="../fast/js/resources/js-test-post.js"></script> |