| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| <label for="control1">Test label1</label><input type="checkbox" name="control1" id="control1" style="visibility:hidden;"> |
| <label for="control2">Test label2</label><input type="checkbox" name="control2" id="control2" > |
| description("This tests that if a label element references a hidden control, it is still visible to accessibility."); |
| if (window.accessibilityController) { |
| if (window.accessibilityController) { |
| var body = document.getElementById("body"); |
| var container = accessibilityController.focusedElement.childAtIndex(0); |
| shouldBe("container.childAtIndex('0').role", "'AXRole: AXGroup'"); |
| shouldBe("container.childAtIndex('0').childAtIndex(0).role", "'AXRole: AXStaticText'"); |
| shouldBe("container.childAtIndex('0').childAtIndex(0).stringValue", "'AXValue: Test label1'"); |
| shouldBe("container.childAtIndex('1').role", "'AXRole: AXCheckBox'"); |
| shouldBe("container.childAtIndex('1').title", "'AXTitle: Test label2'"); |
| <script src="../../../fast/js/resources/js-test-post.js"></script> |