gecko/accessible/tests/mochitest/tree/test_aria_globals.html

89 lines
3.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test Global ARIA States and Accessible Creation</title>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="../common.js"></script>
<script type="application/javascript"
src="../role.js"></script>
<script type="application/javascript">
function doTest()
{
var accTree = {
role: ROLE_GROUPING,
children: [
{ role: ROLE_TEXT_CONTAINER }, // pawn
{ role: ROLE_TEXT_CONTAINER }, // aria-atomic
{ role: ROLE_TEXT_CONTAINER }, // aria-busy
{ role: ROLE_TEXT_CONTAINER }, // aria-controls
{ role: ROLE_TEXT_CONTAINER }, // aria-describedby
{ role: ROLE_TEXT_CONTAINER }, // aria-disabled
{ role: ROLE_TEXT_CONTAINER }, // aria-dropeffect
{ role: ROLE_TEXT_CONTAINER }, // aria-flowto
{ role: ROLE_TEXT_CONTAINER }, // aria-grabbed
{ role: ROLE_TEXT_CONTAINER }, // aria-haspopup
{ role: ROLE_TEXT_CONTAINER }, // aria-invalid
{ role: ROLE_TEXT_CONTAINER }, // aria-label
{ role: ROLE_TEXT_CONTAINER }, // aria-labelledby
{ role: ROLE_TEXT_CONTAINER }, // aria-live
{ role: ROLE_TEXT_CONTAINER }, // aria-owns
{ role: ROLE_TEXT_CONTAINER } // aria-relevant
]
};
testAccessibleTree("global_aria_states_and_props", accTree);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank"
title="Update universal ARIA attribute support to latest spec"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=551978">
Mozilla Bug 551978
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<!-- Test that global aria states and properties are enough to cause the
creation of accessible objects -->
<div id="global_aria_states_and_props" role="group">
<span id="pawn"></span>
<span id="atomic" aria-atomic="true"></span>
<span id="busy" aria-busy="false"></span>
<span id="controls" aria-controls="pawn"></span>
<span id="describedby" aria-describedby="pawn"></span>
<span id="disabled" aria-disabled="true"></span>
<span id="dropeffect" aria-dropeffect="move"></span>
<span id="flowto" aria-flowto="pawn"></span>
<span id="grabbed" aria-grabbed="false"></span>
<span id="haspopup" aria-haspopup="false"></span>
<!-- we use gecko to detect hidden-ness so we currently ignore aria-hidden
we might want to special case for aria-hidden="false", but we would need
a good case for it. aria-hidden is only in spec as an author aid to DOM
based AT -->
<span id="invalid" aria-invalid="false"></span>
<span id="label" aria-label="hi"></span>
<span id="labelledby" aria-labelledby="label"></span>
<span id="live" aria-live="polite"></span>
<span id="owns" aria-owns="pawn"></span>
<span id="relevant" aria-relevant="additions"></span>
</div>
</body>
</html>