AX: svg:image not accessible
[WebKit-https.git] / LayoutTests / accessibility / svg-image.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <img id="realimage" tabindex="0" alt="TestImage" width="100" height="100">
9
10 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
11
12 <image tabindex="0" id="svgimage" alt="TestImage" x="20" y="20" width="298" height="65" xlink:href="resources/cake.png"/>
13
14 </svg>
15
16 <p id="description"></p>
17 <div id="console"></div>
18
19 <script>
20
21     description("This tests that SVG images are accessible elements and they have the same attributes as real images.");
22
23     if (window.accessibilityController) {
24         document.getElementById("realimage").focus();
25         var realImage = accessibilityController.focusedElement;
26
27         document.getElementById("svgimage").focus();
28         var svgImage = accessibilityController.focusedElement;
29         shouldBe("svgImage.role", "realImage.role");
30         shouldBe("svgImage.description", "realImage.description");
31        
32         debug("SVG Image Role: " + svgImage.role);
33         debug("SVG Image Description: " + svgImage.description);
34     }
35
36 </script>
37
38 <script src="../fast/js/resources/js-test-post.js"></script>
39 </body>
40 </html>