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