1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../fast/js/resources/js-test-pre.js"></script>
8 <span id="labelShutdown"><label for="shutdownTime">Shut down computer after</label></span>
9 <input id="shutdownTime" type="text" value="10" aria-labelledby="labelShutdown shutdownTime shutdownUnit" />
10 <span id="shutdownUnit">minutes</span>
12 <p id="description"></p>
13 <div id="console"></div>
17 description("This tests that if aria-labelledby is used, then label elements are not used");
19 if (window.accessibilityController) {
21 var text = document.getElementById("shutdownTime");
23 text = accessibilityController.focusedElement;
25 shouldBe("text.description", "'AXDescription: Shut down computer after 10 minutes'");
27 // There should be no title UI element.
28 shouldBe("text.titleUIElement() != null && text.titleUIElement().isValid", "false");
30 // The label element is in a group, in a group, in the web area.
31 var labelElement = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0).childAtIndex(0).childAtIndex(0);
33 // This just makes sure that the label element is still visible in the AX hierarchy, even though
34 // it's a label element (sometimes they are ignored).
35 shouldBe("labelElement.role", "'AXRole: AXStaticText'");
40 <script src="../fast/js/resources/js-test-post.js"></script>