blob: afb2e4c29dffc008fd0ce6419f48de1951bb3686 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<style>img {background-color: #000;}</style>
<script src="../resources/js-test-pre.js"></script>
<script src="../resources/accessibility-helper.js"></script>
</head>
<body id="body">
<svg aria-label="Bar" height="100" width="100">
<circle id="circle1" cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
<svg height="100" width="100">
<circle id="circle2" aria-label="Bar" cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
<svg height="100" width="100">
<circle id="circle3" cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
<img id="test1" src="resources/apple-logo.svg"/>
<img id="test2" src="resources/apple-logo.svg" alt="hello" />
<img id="test3" alt="Apple logo" src="resources/apple-logo.svg" />
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that SVG shapes are exposed to ax tree as images if there are labels describing them.");
if (window.accessibilityController) {
var circle1 = accessibilityController.accessibleElementById("circle1");
debug("circle1: " + (circle1 ? circle1.role : "Element not exposed"));
var circle2 = accessibilityController.accessibleElementById("circle2");
debug("circle2: " + (circle2 ? circle2.role : "Element not exposed"));
var circle3 = accessibilityController.accessibleElementById("circle3");
debug("circle3: " + (circle3 ? circle3.role : "Element not exposed"));
var image1 = accessibilityController.accessibleElementById("test1");
shouldBeTrue("!image1");
var image2 = accessibilityController.accessibleElementById("test2");
shouldBe("image2.role", "'AXRole: AXImage'");
var image3 = accessibilityController.accessibleElementById("test3");
shouldBe("image3.role", "'AXRole: AXImage'");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>