blob: 55276a234feae972cecc7faf61f16ee8c05f2c7c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body id="body">
<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" >
<p id="description"></p>
<div id="console"></div>
<script>
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");
body.focus();
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>
<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>