blob: 4c76b41a01d186282d907755d66be092638864c6 [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">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("AXLandmarkApplication","AXDocumentArticle","AXLandmarkBanner","AXLandmarkComplementary",
"AXLandmarkContentInfo", "AXDocument", "AXApplicationLog", "AXLandmarkMain", "AXApplicationMarquee",
"AXDocumentNote", "AXLandmarkNavigation", "AXDocumentRegion", "AXLandmarkSearch", "AXApplicationStatus",
"AXUserInterfaceTooltip", "AXDocumentMath", "AXDefinition");
var roleDescriptions = new Array("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>