blob: ca18b07a4363636968f8c1a68fc9ee3b8416d91b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<body id="body">
<input aria-label="aria label" type="text" size=20>
<a href="#" aria-label="aria link">test</a>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that the aria-label attribute works. The input and the A tag should return the appropriate description.");
if (window.accessibilityController) {
var body = document.getElementById("body");
body.focus();
var obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
var succeeded = obj.description == "AXDescription: aria label";
shouldBe("succeeded", "true");
obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1);
succeeded = obj.description == "AXDescription: aria link";
shouldBe("succeeded", "true");
}
</script>
</body>
</html>