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
|
2010-08-06 06:58:12 -07:00
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=581952
|
2010-09-21 08:05:31 -07:00
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
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/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../common.js"></script>
|
2009-02-15 00:15:31 -08:00
|
|
|
<script type="application/javascript"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../attributes.js"></script>
|
2009-02-15 00:15:31 -08:00
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
function doTest()
|
|
|
|
{
|
2009-02-20 23:43:51 -08:00
|
|
|
// aria
|
2013-06-25 15:11:39 -07:00
|
|
|
testAttrs("atomic", {"atomic" : "true", "container-atomic" : "true"}, true);
|
|
|
|
testAttrs(getNode("atomic").firstChild, {"container-atomic" : "true"}, true);
|
|
|
|
testAbsentAttrs("atomic_false", {"atomic" : "false", "container-atomic" : "false"});
|
|
|
|
testAbsentAttrs(getNode("atomic_false").firstChild, {"container-atomic" : "false"});
|
|
|
|
|
2009-02-20 23:43:51 -08:00
|
|
|
testAttrs("autocomplete", {"autocomplete" : "true"}, true);
|
2014-11-28 07:01:43 -08:00
|
|
|
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-02-18 22:56:19 -08:00
|
|
|
testAttrs("dropeffect", {"dropeffect" : "copy"}, true);
|
2011-01-27 21:15:31 -08:00
|
|
|
testAttrs("grabbed", {"grabbed" : "true"}, true);
|
2014-11-28 07:01:43 -08:00
|
|
|
testAbsentAttrs("haspopup", { "haspopup": "false" });
|
2011-01-27 21:15:31 -08:00
|
|
|
testAttrs("hidden", {"hidden" : "true"}, true);
|
2013-02-10 16:54:14 -08:00
|
|
|
testAbsentAttrs("hidden_false", { "hidden": "false" });
|
2014-11-28 07:01:43 -08:00
|
|
|
testAbsentAttrs("modal", {"modal" : "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
|
|
|
|
2012-10-19 00:15:23 -07:00
|
|
|
// inherited attributes by subdocuments
|
|
|
|
var subdoc = getAccessible("iframe").firstChild;
|
|
|
|
testAttrs(subdoc, {"busy" : "true"}, true);
|
|
|
|
|
2009-02-18 22:56:19 -08:00
|
|
|
// live object attribute
|
2012-10-19 00:15:23 -07:00
|
|
|
|
2010-09-21 08:05:31 -07:00
|
|
|
// HTML
|
|
|
|
testAttrs("output", {"live" : "polite"}, true);
|
|
|
|
|
|
|
|
// ARIA
|
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);
|
2013-07-24 00:04:49 -07:00
|
|
|
testAbsentAttrs("tablist", {"live" : "polite"});
|
2009-02-18 22:56:19 -08:00
|
|
|
|
|
|
|
// 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);
|
2013-07-24 00:04:49 -07:00
|
|
|
testAbsentAttrs("tablistChild", {"container-live" : "polite"});
|
2009-02-18 22:56:19 -08:00
|
|
|
|
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);
|
2013-07-24 00:04:49 -07:00
|
|
|
testAbsentAttrs("tablistChild", {"container-live-role" : "tablist"});
|
2009-06-17 07:22:23 -07:00
|
|
|
|
2010-08-06 06:58:12 -07:00
|
|
|
// absent aria-label and aria-labelledby object attribute
|
|
|
|
testAbsentAttrs("label", {"label" : "foo"});
|
|
|
|
testAbsentAttrs("labelledby", {"labelledby" : "label"});
|
|
|
|
|
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);
|
|
|
|
|
2013-10-24 20:21:24 -07:00
|
|
|
// text input type
|
|
|
|
testAbsentAttrs("button", { "text-input-type": "button"});
|
|
|
|
testAbsentAttrs("checkbox", { "text-input-type": "checkbox"});
|
|
|
|
testAbsentAttrs("radio", { "text-input-type": "radio"});
|
|
|
|
testAttrs("email", {"text-input-type" : "email"}, true);
|
|
|
|
testAttrs("search", {"text-input-type" : "search"}, true);
|
|
|
|
testAttrs("tel", {"text-input-type" : "tel"}, true);
|
|
|
|
testAttrs("url", {"text-input-type" : "url"}, true);
|
|
|
|
|
2015-02-27 06:41:57 -08:00
|
|
|
// ARIA
|
|
|
|
testAttrs("searchbox", {"text-input-type" : "search"}, true);
|
|
|
|
|
2009-02-20 23:43:51 -08:00
|
|
|
// html
|
|
|
|
testAttrs("radio", {"checkable" : "true"}, true);
|
|
|
|
testAttrs("checkbox", {"checkable" : "true"}, true);
|
2011-11-24 03:31:34 -08:00
|
|
|
testAttrs("draggable", {"draggable" : "true"}, true);
|
|
|
|
testAttrs("th1", { "abbr": "SS#" }, true);
|
|
|
|
testAttrs("th2", { "abbr": "SS#" }, true);
|
2011-11-24 03:31:41 -08:00
|
|
|
testAttrs("th2", { "axis": "social" }, true);
|
2009-02-20 23:43:51 -08:00
|
|
|
|
2012-12-07 09:27:17 -08:00
|
|
|
// don't barf on an empty abbr element.
|
|
|
|
testAbsentAttrs("th3", { "abbr": "" }, true);
|
|
|
|
|
2012-03-03 04:09:46 -08:00
|
|
|
// application accessible
|
|
|
|
if (WIN) {
|
|
|
|
var gfxInfo = Components.classes["@mozilla.org/gfx/info;1"].
|
|
|
|
getService(Components.interfaces.nsIGfxInfo);
|
|
|
|
var attrs = {
|
|
|
|
"D2D": (gfxInfo.D2DEnabled ? "true" : "false")
|
|
|
|
}
|
|
|
|
testAttrs(getApplicationAccessible(), attrs, false);
|
|
|
|
}
|
2012-03-25 21:37:07 -07:00
|
|
|
|
|
|
|
// no object attributes
|
|
|
|
testAbsentAttrs(getAccessible("listitem").firstChild, { "tag": "" });
|
|
|
|
|
2012-04-24 10:39:03 -07:00
|
|
|
// experimental aria
|
|
|
|
testAttrs("experimental", {"blah" : "true"}, true);
|
|
|
|
|
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>
|
2010-08-06 06:58:12 -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>
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=581952"
|
|
|
|
title="Make explicit that aria-label is not an object attribute">
|
|
|
|
Mozilla Bug 475006
|
|
|
|
</a>
|
2010-09-21 08:05:31 -07:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=558036"
|
|
|
|
title="make HTML <output> accessible">
|
|
|
|
Mozilla Bug 558036
|
|
|
|
</a>
|
2011-06-12 23:54:36 -07:00
|
|
|
<a target="_blank"
|
2013-07-24 00:04:49 -07:00
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=896400"
|
|
|
|
title="Tablist should no longer be an implicit live region">
|
|
|
|
Mozilla Bug 896400
|
2011-06-12 23:54:36 -07:00
|
|
|
</a>
|
2012-04-24 10:39:03 -07:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=563862"
|
|
|
|
title="Expand support for nsIAccessibleEvent::OBJECT_ATTRIBUTE_CHANGE">
|
|
|
|
Mozilla Bug 563862
|
|
|
|
</a>
|
2012-12-07 09:27:17 -08:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=819303"
|
|
|
|
title="crash in nsTextEquivUtils::AppendTextEquivFromTextContent">
|
|
|
|
Mozilla Bug 819303
|
|
|
|
</a>
|
2013-02-10 16:54:14 -08:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=838407"
|
|
|
|
title="aria-hidden false value shouldn't be exposed via object attributes">
|
|
|
|
Mozilla Bug 838407
|
|
|
|
</a>
|
2015-02-27 06:41:57 -08:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=1121518"
|
|
|
|
title="ARIA 1.1: Support role 'searchbox'">
|
|
|
|
Mozilla Bug 1121518
|
|
|
|
</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 -->
|
2013-06-25 15:11:39 -07:00
|
|
|
<div id="atomic" aria-atomic="true">live region</div>
|
|
|
|
<div id="atomic_false" aria-atomic="false">live region</div>
|
2009-02-15 00:15:31 -08:00
|
|
|
<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-02-15 00:15:31 -08:00
|
|
|
<div id="dropeffect" aria-dropeffect="copy"></div>
|
2011-01-27 21:15:31 -08:00
|
|
|
<div id="grabbed" aria-grabbed="true"></div>
|
2014-11-28 07:01:43 -08:00
|
|
|
<div id="haspopup" aria-haspopup="true"></div>
|
2011-01-27 21:15:31 -08:00
|
|
|
<div id="hidden" aria-hidden="true"></div>
|
2013-02-10 16:54:14 -08:00
|
|
|
<div id="hidden_false" aria-hidden="false"></div>
|
2014-11-28 07:01:43 -08:00
|
|
|
<div id="modal" aria-modal="true"></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
|
|
|
|
2012-10-19 00:15:23 -07:00
|
|
|
<!-- inherited from iframe -->
|
|
|
|
<iframe id="iframe" src="data:text/html,<html><body></body></html>"
|
|
|
|
aria-busy="true"></iframe>
|
|
|
|
|
2010-09-21 08:05:31 -07:00
|
|
|
<!-- html -->
|
|
|
|
<output id="output"></output>
|
|
|
|
|
|
|
|
<!-- back to aria -->
|
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-10-09 09:32:44 -07:00
|
|
|
<div id="live3" role="region">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>
|
2011-06-12 23:54:36 -07:00
|
|
|
<div id="tablist" role="tablist">tablist <div id="tablistChild">tab</div></div>
|
2009-02-18 22:56:19 -08:00
|
|
|
<div id="timer" role="timer">excuse <div id="timerChild">me</div></div>
|
2009-02-20 23:43:51 -08:00
|
|
|
|
2010-08-06 06:58:12 -07:00
|
|
|
<!-- aria-label[ledby] should not be an object attribute -->
|
|
|
|
<div id="label" role="checkbox" aria-label="foo"></div>
|
|
|
|
<div id="labelledby" role="checkbox" aria-labelledby="label"></div>
|
|
|
|
|
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>
|
|
|
|
|
2013-10-24 20:21:24 -07:00
|
|
|
<!-- text input type -->
|
|
|
|
<input id="button" type="button"/>
|
|
|
|
<input id="email" type="email"/>
|
|
|
|
<input id="search" type="search"/>
|
|
|
|
<input id="tel" type="tel"/>
|
|
|
|
<input id="url" type="url"/>
|
2015-02-27 06:41:57 -08:00
|
|
|
<div id="searchbox" role="searchbox"></div>
|
2013-10-24 20:21:24 -07:00
|
|
|
|
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>
|
2011-11-24 03:31:34 -08:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th id="th1"><abbr title="Social Security Number">SS#</abbr></th>
|
2011-11-24 03:31:41 -08:00
|
|
|
<th id="th2" abbr="SS#" axis="social">Social Security Number</th>
|
2012-12-07 09:27:17 -08:00
|
|
|
<th id="th3"><abbr></abbr></th>
|
2011-11-24 03:31:34 -08:00
|
|
|
</tr>
|
|
|
|
</table>
|
2012-03-25 21:37:07 -07:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li id="listitem">item
|
|
|
|
</ul>
|
2012-04-24 10:39:03 -07:00
|
|
|
|
|
|
|
<!-- experimental aria -->
|
|
|
|
<div id="experimental" aria-blah="true">Fake beer</div>
|
2009-02-15 00:15:31 -08:00
|
|
|
</body>
|
|
|
|
</html>
|