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