blob: c2460f884045143a6d21ecf2e47818b70675361a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<input type="radio" id="input" />
<label for="input" id="label">
<span id="first">first</span>
<span>choice</span>
</label>
<p id="description"></p>
<div id="console"></div>
<script>
var label = 0;
var initialStringValue = 0;
var mutatedStringValue = 0;
description("This tests that if a label element's children's textContent changes, the string value updates");
if (window.accessibilityController) {
if (window.accessibilityController) {
var body = document.getElementById("body");
body.focus();
label = accessibilityController.accessibleElementById("label");
initialStringValue = label.stringValue;
var first = document.getElementById("first")
first.textContent = "second";
mutatedStringValue = label.stringValue;
shouldBe("label.role", "'AXRole: AXStaticText'");
shouldBe("initialStringValue", "'AXValue: first choice'");
shouldBe("mutatedStringValue", "'AXValue: second choice'");
}
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>