1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
5 <script src=
"../resources/accessibility-helper.js"></script>
10 <legend>Choose a shipping method:
</legend>
11 <input id=
"overnight" type=
"radio" name=
"shipping" value=
"overnight" />Overnight
14 <div>End of test
</div>
16 <p id=
"description"></p>
17 <div id=
"console"></div>
21 description("This tests that a fieldset's title ui element is the legend.");
23 if (window
.accessibilityController
) {
24 document
.body
.focus();
25 var body
= accessibilityController
.focusedElement
;
26 var fieldset
= body
.childAtIndex(0);
27 var titleUIElement
= fieldset
.deprecatedTitleUIElement();
29 // Print out the tree of accessible objects, indicating the titleUIElement so
30 // that each platform can verify their expected object has been found
31 buildAccessibilityTree(body
, 0, 0, 0, titleUIElement
, "<< fieldset's titleUIElement");
33 // Verify that we have gotten the titleUIElement and it has the expected text,
34 // which should be in the last descendant regardless of platform.
35 shouldBeTrue("titleUIElement != null");
36 var titleUIElementText
= titleUIElement
;
37 while (titleUIElementText
&& titleUIElementText
.childrenCount
)
38 titleUIElementText
= titleUIElementText
.childAtIndex(0);
40 shouldBe("titleUIElementText.stringValue", "'AXValue: Choose a shipping method:'");