1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
8 <span id=
"labelShutdown"><label id=
"labelElement" 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.deprecatedDescription", "'AXDescription: Shut down computer after 10 minutes'");
27 // There should be no title UI element.
28 shouldBe("text.deprecatedTitleUIElement() != null && text.deprecatedTitleUIElement().isValid", "false");
30 var labelElement
= accessibilityController
.accessibleElementById("labelElement");
31 // This just makes sure that the label element is still visible in the AX hierarchy, even though
32 // it's a label element (sometimes they are ignored).
33 debug("Label element role is: " + labelElement
.role
);