blob: 6daa5ee8e3e32ecee51050c0f318cd278d8dbfce [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.name == "aria label";
shouldBe("succeeded", "true");
obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1);
succeeded = obj.name == "aria link";
shouldBe("succeeded", "true");
}
</script>
</body>
</html>