46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script>
|
|
var successfullyParsed = false;
|
|
</script>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body id="body">
|
|
|
|
<input type="text" id="textfield" size="20" value="hello" aria-label="Search" tabindex="0"><BR>
|
|
<h1 tabindex="0" id="h1">H1 Test</h1><BR>
|
|
<input type="button" id="button" value="Button Title" tabindex="0">
|
|
|
|
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
|
|
description("This test ensures that textfields return their content in accessibilityValue, and label in axLabel. Likewise, other elements and text still return their info through axLabel.");
|
|
|
|
if (window.accessibilityController) {
|
|
|
|
var textfield = accessibilityController.accessibleElementById("textfield");
|
|
shouldBe("textfield.description", "'AXLabel: Search'");
|
|
shouldBe("textfield.stringValue", "'AXValue: hello'");
|
|
|
|
var h1 = accessibilityController.accessibleElementById("h1");
|
|
shouldBe("h1.description", "'AXLabel: H1 Test'");
|
|
// Should be 1 for the heading level.
|
|
shouldBe("h1.stringValue", "'AXValue: 1'");
|
|
|
|
var button = accessibilityController.accessibleElementById("button");
|
|
shouldBe("button.description", "'AXLabel: Button Title'");
|
|
shouldBe("button.stringValue", "'AXValue: '");
|
|
}
|
|
|
|
successfullyParsed = true;
|
|
</script>
|
|
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|
|
|