blob: a4ccc66493eb3fbaec182654595a23d5aa232a1c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<img src="image.jpg" alt="Image alt attr" title="Image title attr">
<form>
<a href="" title="Link title attr">Functional label</a>:<input title="Entry title attr" type="text" /><input value="Clear" type="reset" /><input value="Submit" title="Submit button title attr" type="submit" />
</form>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests the exposure of alt and title information.");
if (window.accessibilityController) {
testRunner.dumpAsText();
document.getElementById("body").focus();
var webArea = accessibilityController.focusedElement;
var image = webArea.childAtIndex(0);
shouldBe("image.title", "'AXTitle: Image alt attr'");
shouldBe("image.description", "'AXDescription: Image title attr'");
var link = webArea.childAtIndex(1);
shouldBe("link.title", "'AXTitle: '");
shouldBe("link.description", "'AXDescription: Link title attr'");
var entry = webArea.childAtIndex(2);
shouldBe("entry.title", "'AXTitle: '");
shouldBe("entry.description", "'AXDescription: Entry title attr'");
var button = webArea.childAtIndex(4);
shouldBe("button.title", "'AXTitle: Submit'");
shouldBe("button.description", "'AXDescription: Submit button title attr'");
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>