blob: c361b06f19ebb4085682f93455f5b6fd7e8386e5 [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 id="content" role="list">
<div id="test1" role="">X</div>
<div id="test2" role="listitem" aria-current="">X</div>
<div id="test3" role="listitem" aria-current="true">X</div>
<div id="test4" role="listitem" aria-current="page">X</div>
<div id="test5" role="listitem" aria-current="step">X</div>
<div id="test6" role="listitem" aria-current="location">X</div>
<div id="test7" role="listitem" aria-current="date">X</div>
<div id="test8" role="listitem" aria-current="time">X</div>
<div id="test9" role="listitem" aria-current="false">X</div>
<div id="test10" role="listitem" aria-current="foo">X</div>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
function platformAttributes(axElement) {
var allAttributes = axElement.allAttributes().split("\n");
var length = allAttributes.length;
for (var i = 0; i < length; i++) {
var string = allAttributes[i];
if (string.startsWith("AXPlatformAttributes"))
return string;
}
return "";
}
description("This tests the exposure of aria-current");
if (window.accessibilityController) {
for (var i = 1; i <= 10; i++) {
var axElement = accessibilityController.accessibleElementById("test" + i);
debug("\ntest" + i + " active: " + axElement.isSelectedOptionActive);
debug(platformAttributes(axElement));
}
document.getElementById("content").style.visibility = "hidden";
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>