blob: e015cf1b47758763a9f679b969da0090bac6c34e [file] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/accessibility-helper.js"></script>
<script src="../resources/js-test.js"></script>
</head>
<body>
<map id="apple" name="imagemap1">
<area id="area1" shape="rect" coords="10,10,133,72" href="http://www.apple.com" alt="Link1" />
<area id="area2" shape="rect" coords="12,74,134,88" href="http://www.apple.com" alt="Link2" />
</map>
<img src="resources/cake.png" border="0" align="left" usemap="#imagemap1" vspace="1">
<script>
var output = "This test ensures proper AX tree output for image map links with alt tags.\n\n";
if (window.accessibilityController) {
window.jsTestIsAsync = true;
var platform = accessibilityController.platformName;
(async () => {
if (platform === "mac" || platform === "ios") {
// Image map area paths are cached during paint. Wait for the
// path to become available on an area element before dumping attributes.
await waitUntilIDHasPathWith("area1", 1, "Line to");
}
var webArea = accessibilityController.rootElement.childAtIndex(0);
output += webArea.attributesOfChildren();
debugEscaped(output);
finishJSTest();
})();
}
</script>
</body>
</html>