76388ec96624133bde1a0937a6fb629e7fc1b18b
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / area-with-aria-label.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <map name="forwardbackward">
9   <area id="btn_prev" role="button" alt="" tabindex="0" aria-label="Previous" shape="rect" coords="2,35,21,47" href="#">
10   <area id="btn_next" role="button" alt="" tabindex="0" aria-label="Next" shape="rect" coords="56,35,75,47" href="#">
11 </map>
12 <img id="fb" src="#" border="1" width="76" height="76" usemap="#forwardbackward" alt="">
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This tests that aria-label works on area elements.");
20
21     if (window.accessibilityController) {
22
23         document.getElementById("btn_prev").focus();
24         shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Previous'");
25
26         document.getElementById("btn_next").focus();
27         shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Next'");
28     }
29
30 </script>
31
32 <script src="../../../resources/js-test-post.js"></script>
33 </body>
34 </html>