blob: 95bbdbaf828b195e41255e491940b1ae75659e18 [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 change, 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")
var element = document.createElement("span");
var foo = document.createTextNode("foo");
element.appendChild(foo);
first.appendChild(foo);
mutatedStringValue = label.stringValue;
shouldBe("label.role", "'AXRole: AXStaticText'");
shouldBe("initialStringValue", "'AXValue: first choice'");
shouldBe("mutatedStringValue", "'AXValue: first foo choice'");
}
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>