2009-02-15 00:15:31 -08:00
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=475006
|
2009-06-17 07:22:23 -07:00
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=391829
|
2009-02-15 00:15:31 -08:00
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Group attributes tests</title>
|
|
|
|
<link rel="stylesheet" type="text/css"
|
|
|
|
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/a11y/accessible/attributes.js"></script>
|
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
function doTest()
|
|
|
|
{
|
2009-02-20 23:43:51 -08:00
|
|
|
// aria
|
|
|
|
testAttrs("atomic", {"atomic" : "true"}, true);
|
|
|
|
testAttrs("autocomplete", {"autocomplete" : "true"}, true);
|
|
|
|
testAttrs("checkbox", {"checkable" : "true"}, true);
|
|
|
|
testAttrs("checkedCheckbox", {"checkable" : "true"}, true);
|
|
|
|
testAttrs("checkedMenuitem", {"checkable" : "true"}, true);
|
|
|
|
testAttrs("checkedOption", {"checkable" : "true"}, true);
|
|
|
|
testAttrs("checkedRadio", {"checkable" : "true"}, true);
|
|
|
|
testAttrs("checkedTreeitem", {"checkable" : "true"}, true);
|
2009-06-19 11:23:44 -07:00
|
|
|
testAttrs("grabbed", {"grabbed" : "true"}, true);
|
2009-02-18 22:56:19 -08:00
|
|
|
testAttrs("dropeffect", {"dropeffect" : "copy"}, true);
|
2009-03-10 13:44:24 -07:00
|
|
|
testAttrs("sortAscending", {"sort" : "ascending"}, true);
|
|
|
|
testAttrs("sortDescending", {"sort" : "descending"}, true);
|
|
|
|
testAttrs("sortNone", {"sort" : "none"}, true);
|
|
|
|
testAttrs("sortOther", {"sort" : "other"}, true);
|
2009-02-18 22:56:19 -08:00
|
|
|
|
|
|
|
// live object attribute
|
2009-02-15 00:15:31 -08:00
|
|
|
testAttrs("live", {"live" : "polite"}, true);
|
2009-02-18 22:56:19 -08:00
|
|
|
testAttrs("live2", {"live" : "polite"}, true);
|
2009-08-27 22:27:27 -07:00
|
|
|
testAbsentAttrs("live3", {"live" : ""});
|
2009-02-18 22:56:19 -08:00
|
|
|
testAttrs("log", {"live" : "polite"}, true);
|
2009-06-19 10:44:13 -07:00
|
|
|
testAttrs("logAssertive", {"live" : "assertive"}, true);
|
2009-02-18 22:56:19 -08:00
|
|
|
testAttrs("marquee", {"live" : "off"}, true);
|
|
|
|
testAttrs("status", {"live" : "polite"}, true);
|
|
|
|
testAttrs("timer", {"live" : "off"}, true);
|
|
|
|
|
|
|
|
// container-live object attribute
|
|
|
|
testAttrs("liveChild", {"container-live" : "polite"}, true);
|
|
|
|
testAttrs("live2Child", {"container-live" : "polite"}, true);
|
|
|
|
testAttrs("logChild", {"container-live" : "polite"}, true);
|
2009-06-19 10:44:13 -07:00
|
|
|
testAttrs("logAssertiveChild", {"container-live" : "assertive"}, true);
|
2009-02-18 22:56:19 -08:00
|
|
|
testAttrs("marqueeChild", {"container-live" : "off"}, true);
|
|
|
|
testAttrs("statusChild", {"container-live" : "polite"}, true);
|
|
|
|
testAttrs("timerChild", {"container-live" : "off"}, true);
|
|
|
|
|
2009-06-17 07:22:23 -07:00
|
|
|
// container-live-role object attribute
|
|
|
|
testAttrs("log", {"container-live-role" : "log"}, true);
|
2009-06-19 10:44:13 -07:00
|
|
|
testAttrs("logAssertive", {"container-live-role" : "log"}, true);
|
2009-06-17 07:22:23 -07:00
|
|
|
testAttrs("marquee", {"container-live-role" : "marquee"}, true);
|
|
|
|
testAttrs("status", {"container-live-role" : "status"}, true);
|
|
|
|
testAttrs("timer", {"container-live-role" : "timer"}, true);
|
|
|
|
testAttrs("logChild", {"container-live-role" : "log"}, true);
|
2009-06-19 10:44:13 -07:00
|
|
|
testAttrs("logAssertive", {"container-live-role" : "log"}, true);
|
|
|
|
testAttrs("logAssertiveChild", {"container-live-role" : "log"}, true);
|
2009-06-17 07:22:23 -07:00
|
|
|
testAttrs("marqueeChild", {"container-live-role" : "marquee"}, true);
|
|
|
|
testAttrs("statusChild", {"container-live-role" : "status"}, true);
|
|
|
|
testAttrs("timerChild", {"container-live-role" : "timer"}, true);
|
|
|
|
|
2009-06-19 10:44:13 -07:00
|
|
|
// container that has no default live attribute
|
|
|
|
testAttrs("liveGroup", {"live" : "polite"}, true);
|
|
|
|
testAttrs("liveGroupChild", {"container-live" : "polite"}, true);
|
|
|
|
testAttrs("liveGroup", {"container-live-role" : "group"}, true);
|
|
|
|
testAttrs("liveGroupChild", {"container-live-role" : "group"}, true);
|
|
|
|
|
2009-02-20 23:43:51 -08:00
|
|
|
// html
|
|
|
|
testAttrs("radio", {"checkable" : "true"}, true);
|
|
|
|
testAttrs("checkbox", {"checkable" : "true"}, true);
|
2009-06-19 11:23:44 -07:00
|
|
|
testAttrs("draggable", {"draggable" : "true"}, true);
|
2009-02-20 23:43:51 -08:00
|
|
|
|
2009-02-15 00:15:31 -08:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2009-02-15 00:15:31 -08:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=475006"
|
|
|
|
title="Extend nsARIAMap to capture ARIA attribute characteristics">
|
|
|
|
Mozilla Bug 475006
|
|
|
|
</a>
|
2009-06-17 07:22:23 -07:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=391829"
|
|
|
|
title="Add support for container-live-role to object attributes">
|
|
|
|
Mozilla Bug 391829
|
|
|
|
</a>
|
2009-02-15 00:15:31 -08:00
|
|
|
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
|
2009-02-20 23:43:51 -08:00
|
|
|
<!-- aria -->
|
2009-02-15 00:15:31 -08:00
|
|
|
<div id="atomic" aria-atomic="true"></div>
|
|
|
|
<div id="autocomplete" role="textbox" aria-autocomplete="true"></div>
|
2009-02-20 23:43:51 -08:00
|
|
|
<div id="checkbox" role="checkbox"></div>
|
|
|
|
<div id="checkedCheckbox" role="checkbox" aria-checked="true"></div>
|
|
|
|
<div id="checkedMenuitem" role="menuitem" aria-checked="true"></div>
|
|
|
|
<div id="checkedOption" role="option" aria-checked="true"></div>
|
|
|
|
<div id="checkedRadio" role="radio" aria-checked="true"></div>
|
|
|
|
<div id="checkedTreeitem" role="treeitem" aria-checked="true"></div>
|
2009-06-19 11:23:44 -07:00
|
|
|
<div id="grabbed" aria-grabbed="true"></div>
|
2009-02-15 00:15:31 -08:00
|
|
|
<div id="dropeffect" aria-dropeffect="copy"></div>
|
2009-03-10 13:44:24 -07:00
|
|
|
<div id="sortAscending" role="columnheader" aria-sort="ascending"></div>
|
|
|
|
<div id="sortDescending" role="columnheader" aria-sort="descending"></div>
|
|
|
|
<div id="sortNone" role="columnheader" aria-sort="none"></div>
|
|
|
|
<div id="sortOther" role="columnheader" aria-sort="other"></div>
|
2009-02-18 22:56:19 -08:00
|
|
|
|
|
|
|
<div id="live" aria-live="polite">excuse <div id="liveChild">me</div></div>
|
|
|
|
<div id="live2" role="marquee" aria-live="polite">excuse <div id="live2Child">me</div></div>
|
2009-08-27 22:27:27 -07:00
|
|
|
<div id="live3" role="section">excuse</div>
|
2009-02-18 22:56:19 -08:00
|
|
|
<div id="log" role="log">excuse <div id="logChild">me</div></div>
|
2009-06-19 10:44:13 -07:00
|
|
|
<div id="logAssertive" role="log" aria-live="assertive">excuse <div id="logAssertiveChild">me</div></div>
|
2009-02-18 22:56:19 -08:00
|
|
|
<div id="marquee" role="marquee">excuse <div id="marqueeChild">me</div></div>
|
|
|
|
<div id="status" role="status">excuse <div id="statusChild">me</div></div>
|
|
|
|
<div id="timer" role="timer">excuse <div id="timerChild">me</div></div>
|
2009-02-20 23:43:51 -08:00
|
|
|
|
2009-06-19 10:44:13 -07:00
|
|
|
<!-- unusual live case -->
|
|
|
|
<div id="liveGroup" role="group" aria-live="polite">
|
|
|
|
excuse <div id="liveGroupChild">me</div>
|
|
|
|
</div>
|
|
|
|
|
2009-02-20 23:43:51 -08:00
|
|
|
<!-- html -->
|
|
|
|
<input id="radio" type="radio"/>
|
|
|
|
<input id="checkbox" type="checkbox"/>
|
2009-06-19 11:23:44 -07:00
|
|
|
<div id="draggable" draggable="true">Draggable div</div>
|
2009-02-15 00:15:31 -08:00
|
|
|
</body>
|
|
|
|
</html>
|