2009-05-18 01:35:21 -07:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Table indexes for ARIA grid 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"
|
|
|
|
src="chrome://mochikit/content/a11y/accessible/table.js"></script>
|
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
function doTest()
|
|
|
|
{
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// ARIA grid
|
2009-06-29 03:54:26 -07:00
|
|
|
var idxes = [
|
|
|
|
[0, 1, 2],
|
|
|
|
[3, 4, 5],
|
|
|
|
[6, 7, 8],
|
|
|
|
[9, 10, 11]
|
|
|
|
];
|
|
|
|
testTableIndexes("grid", idxes);
|
2009-05-18 01:35:21 -07:00
|
|
|
|
2009-09-14 20:55:26 -07:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// a bit crazy ARIA grid
|
|
|
|
idxes = [
|
|
|
|
[0, 1],
|
|
|
|
[2, 3]
|
|
|
|
];
|
|
|
|
testTableIndexes("grid2", idxes);
|
|
|
|
|
2009-05-18 01:35:21 -07:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-06-12 05:52:29 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2009-05-18 01:35:21 -07:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=386813"
|
|
|
|
title="support nsIAccessibleTable on ARIA grid/treegrid">Mozilla Bug 386813</a>
|
2009-09-14 20:55:26 -07:00
|
|
|
<a target="_blank"
|
|
|
|
title="nsHTMLTableCellAccessible is used in dojo's crazy ARIA grid"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=513848">Mozilla Bug 513848</a>
|
|
|
|
|
2009-05-18 01:35:21 -07:00
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<div role="grid" id="grid">
|
|
|
|
<div role="row">
|
|
|
|
<span role="columnheader">column1</span>
|
2009-09-14 20:55:26 -07:00
|
|
|
<span role="columnheader">column2</span>
|
2009-05-18 01:35:21 -07:00
|
|
|
<span role="columnheader">column3</span>
|
|
|
|
</div>
|
|
|
|
<div role="row">
|
|
|
|
<span role="rowheader">row1</span>
|
|
|
|
<span role="gridcell">cell1</span>
|
|
|
|
<span role="gridcell">cell2</span>
|
|
|
|
</div>
|
|
|
|
<div role="row">
|
|
|
|
<span role="rowheader">row2</span>
|
|
|
|
<span role="gridcell">cell3</span>
|
|
|
|
<span role="gridcell">cell4</span>
|
|
|
|
</div>
|
|
|
|
<div role="row">
|
|
|
|
<span role="rowheader">row3</span>
|
|
|
|
<span role="gridcell">cell5</span>
|
|
|
|
<span role="gridcell">cell6</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2009-09-14 20:55:26 -07:00
|
|
|
<div role="grid" id="grid2">
|
|
|
|
<div role="row">
|
|
|
|
<table role="presentation">
|
|
|
|
<tr>
|
|
|
|
<td role="columnheader">header1</td>
|
|
|
|
<td role="columnheader">header2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div role="row">
|
|
|
|
<table role="presentation">
|
|
|
|
<tr>
|
|
|
|
<td role="gridcell">cell1</td>
|
|
|
|
<td role="gridcell" tabindex="-1">cell2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2009-05-18 01:35:21 -07:00
|
|
|
</body>
|
|
|
|
</html>
|