blob: 637355f63d5e62198b3f8b129e94620c5dc276fa [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<body id="body">
<div id="textrole" tabindex=0 role="text" aria-label="all at once">
<b>hello world</b>
<i>this is a test</i>
<a href="#">more test</a>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that you can set an ARIA text role and that it will not have children through hit testing");
if (window.accessibilityController) {
document.getElementById("textrole").focus();
var textrole = accessibilityController.focusedElement;
shouldBe("textrole.role", "'AXRole: AXStaticText'");
shouldBe("textrole.stringValue", "'AXValue: all at once'");
// now check the hit-testing
var x = textrole.clickPointX;
var y = textrole.clickPointY;
shouldBe("textrole.elementAtPoint(x, y).isEqual(textrole)", "true");
}
</script>
</body>
</html>