blob: 6439251ff4590682ee51d93667c895bfdd31521e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<map name="forwardbackward">
<area id="btn_prev" role="button" alt="" tabindex="0" aria-label="Previous" shape="rect" coords="2,35,21,47" href="#">
<area id="btn_next" role="button" alt="" tabindex="0" aria-label="Next" shape="rect" coords="56,35,75,47" href="#">
</map>
<img id="fb" src="#" border="1" width="76" height="76" usemap="#forwardbackward" alt="">
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that aria-label works on area elements.");
if (window.accessibilityController) {
document.getElementById("btn_prev").focus();
shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Previous'");
document.getElementById("btn_next").focus();
shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Next'");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>