1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../js/resources/js-test-pre.js"></script>
8 <area id="area1" shape="circle" coords="70,84,51" href="1">
9 <area id="area2" shape="rect" coords="25,180,125,280" href="2">
10 <area id="area3" shape="poly" coords="153,106,186,225,340,193,315,81,304,167" href="3">
11 <area id="area4" shape="rect" coords="420,19,478,278" nohref>
12 <area id="area5" shape="circle" coords="220,150,100" href="4">
13 <area id="area6" shape="default" coords="0,0,500,300" href="5">
14 <area id="area7" shape="rect" coords="1, 1, 10, 10" tabindex=-1 href="6">
17 <img src="resources/abe.png" width="500" height="300" alt="Image Map" usemap="#mymap" ismap>
20 <p id="description"></p>
21 <div id="console"></div>
25 description("This tests that links in a image map are able to be reached through keyboard access and tabbing.");
27 eventSender.keyDown('\t');
28 shouldBe("document.activeElement.id", "'area1'");
30 eventSender.keyDown('\t');
31 shouldBe("document.activeElement.id", "'area2'");
33 eventSender.keyDown('\t');
34 shouldBe("document.activeElement.id", "'area3'");
36 // We'll skip over area4 because its nohref
37 eventSender.keyDown('\t');
38 shouldBe("document.activeElement.id", "'area5'");
40 eventSender.keyDown('\t');
41 shouldBe("document.activeElement.id", "'area6'");
43 // We'll skip over area7 because its tabindex=-1. On the Mac, the wrap around should give
44 // area1. On GTK, we will go to the body element.
45 eventSender.keyDown('\t');
46 shouldBe("document.activeElement.id == 'area1' || document.activeElement.id == 'body'", "true");
49 <script src="../js/resources/js-test-post.js"></script>