blob: 3fa546037515d6f84381d946119476538c0b239b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<div role="application">application role</div>
<div role="article">article role</div>
<div role="banner">banner role</div>
<div role="complementary">complementary role</div>
<div role="contentinfo">content info role</div>
<div role="document">document role</div>
<div role="log">log role</div>
<div role="main">main role</div>
<div role="marquee">marquee role</div>
<div role="note">note role</div>
<div role="navigation">navigation role</div>
<div role="region" aria-label="region">region role</div>
<div role="search">search role</div>
<div role="status">status role</div>
<div role="tooltip">tooltip role</div>
<div role="math">math role</div>
<div role="definition">definition role</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that each of these ARIA grouping type roles map to the right role and subrole.");
if (window.accessibilityController) {
// this text field should be required.
document.getElementById("body").focus();
var obj = accessibilityController.focusedElement;
var subroles = new Array("AXWebApplication","AXDocumentArticle","AXLandmarkBanner","AXLandmarkComplementary",
"AXLandmarkContentInfo", "AXDocument", "AXApplicationLog", "AXLandmarkMain", "AXApplicationMarquee",
"AXDocumentNote", "AXLandmarkNavigation", "AXLandmarkRegion", "AXLandmarkSearch", "AXApplicationStatus",
"AXUserInterfaceTooltip", "AXDocumentMath", "AXDefinition");
var roleDescriptions = new Array("web application", "article", "banner", "complementary",
"content information", "document", "log", "main", "marquee",
"note", "navigation", "region", "search", "application status",
"tooltip", "math", "definition");
for (var k = 0; k < subroles.length; k++) {
shouldBe("obj.childAtIndex(k).role", "'AXRole: AXGroup'");
shouldBe("obj.childAtIndex(k).subrole", '"AXSubrole: ' + subroles[k] + '"');
shouldBe("obj.childAtIndex(k).roleDescription", '"AXRoleDescription: ' + roleDescriptions[k] + '"');
}
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>