2011-01-28 05:15:31 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
2011-05-17 16:33:45 +00:00
|
|
|
<title>Accessible ARIA object attribute changes</title>
|
2011-01-28 05:15:31 +00:00
|
|
|
|
|
|
|
<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="../events.js"></script>
|
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Do tests.
|
|
|
|
*/
|
|
|
|
var gQueue = null;
|
|
|
|
|
|
|
|
function hideNode(aID, bHide)
|
|
|
|
{
|
|
|
|
this.node = getNode(aID);
|
|
|
|
this.accessible = getAccessible(this.node);
|
|
|
|
|
|
|
|
this.eventSeq = [
|
|
|
|
new invokerChecker(EVENT_OBJECT_ATTRIBUTE_CHANGED, this.accessible),
|
|
|
|
];
|
|
|
|
|
|
|
|
this.invoke = function hideNode_invoke()
|
|
|
|
{
|
|
|
|
this.node.setAttribute("aria-hidden", bHide);
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getID = function hideNode_getID()
|
|
|
|
{
|
|
|
|
return "aria-hidden for " + aID + " " + bHide;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-17 16:33:45 +00:00
|
|
|
function updateSort(aID, aSort)
|
2011-01-28 05:15:31 +00:00
|
|
|
{
|
2011-05-17 16:33:45 +00:00
|
|
|
this.node = getNode(aID);
|
|
|
|
this.accessible = getAccessible(this.node);
|
|
|
|
|
|
|
|
this.eventSeq = [
|
|
|
|
new invokerChecker(EVENT_OBJECT_ATTRIBUTE_CHANGED, this.accessible),
|
|
|
|
];
|
|
|
|
|
|
|
|
this.invoke = function updateSort_invoke()
|
|
|
|
{
|
|
|
|
this.node.setAttribute("aria-sort", aSort);
|
|
|
|
}
|
2011-01-28 05:15:31 +00:00
|
|
|
|
2011-05-17 16:33:45 +00:00
|
|
|
this.getID = function updateSort_getID()
|
|
|
|
{
|
|
|
|
return "aria-sort for " + aID + " " + aSort;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Debug stuff.
|
|
|
|
// gA11yEventDumpID = "eventdump";
|
|
|
|
// gA11yEventDumpToConsole = true;
|
|
|
|
|
|
|
|
function doTests()
|
|
|
|
{
|
2011-01-28 05:15:31 +00:00
|
|
|
gQueue = new eventQueue();
|
|
|
|
|
|
|
|
gQueue.push(new hideNode("hideable", "true"));
|
|
|
|
|
2011-05-17 16:33:45 +00:00
|
|
|
gQueue.push(new updateSort("sortable", "ascending"));
|
|
|
|
|
2011-01-28 05:15:31 +00:00
|
|
|
gQueue.invoke(); // Will call SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
addA11yLoadEvent(doTests);
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=581096"
|
|
|
|
title="Add support for aria-hidden">
|
|
|
|
Mozilla Bug 581096
|
|
|
|
</a>
|
|
|
|
|
2011-05-17 16:33:45 +00:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=640707"
|
|
|
|
title="Add event support for aria-sort">
|
|
|
|
Mozilla Bug 640707
|
|
|
|
</a>
|
|
|
|
|
2011-01-28 05:15:31 +00:00
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
<div id="eventdump"></div>
|
|
|
|
|
|
|
|
<div id="hideable"><div>Hi</div><div>there</div></div>
|
|
|
|
|
2011-05-17 16:33:45 +00:00
|
|
|
<div id="sortable" role="columnheader" aria-sort"none">aria-sort</div>
|
2011-01-28 05:15:31 +00:00
|
|
|
</body>
|
|
|
|
</html>
|