2009-09-10 18:07:56 -07:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Table header information cells for ARIA grid</title>
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
|
|
<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"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../common.js"></script>
|
2009-09-10 18:07:56 -07:00
|
|
|
<script type="application/javascript"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../table.js"></script>
|
2009-09-10 18:07:56 -07:00
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
function doTest()
|
|
|
|
{
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// column and row headers from markup
|
|
|
|
|
|
|
|
headerInfoMap = [
|
|
|
|
{
|
|
|
|
cell: "table_dc_1",
|
|
|
|
rowHeaderCells: [ "table_rh_1" ],
|
|
|
|
columnHeaderCells: [ "table_ch_2" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
cell: "table_dc_2",
|
|
|
|
rowHeaderCells: [ "table_rh_1" ],
|
|
|
|
columnHeaderCells: [ "table_ch_3" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
cell: "table_dc_3",
|
|
|
|
rowHeaderCells: [ "table_rh_2" ],
|
|
|
|
columnHeaderCells: [ "table_ch_2" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
cell: "table_dc_4",
|
|
|
|
rowHeaderCells: [ "table_rh_2" ],
|
|
|
|
columnHeaderCells: [ "table_ch_3" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
cell: "table_rh_1",
|
|
|
|
rowHeaderCells: [],
|
|
|
|
columnHeaderCells: [ "table_ch_1" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
cell: "table_rh_2",
|
|
|
|
rowHeaderCells: [],
|
|
|
|
columnHeaderCells: [ "table_ch_1" ]
|
2009-09-14 20:55:26 -07:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
testHeaderCells(headerInfoMap);
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// column and row headers from markup for crazy grid.
|
|
|
|
|
|
|
|
headerInfoMap = [
|
|
|
|
{
|
|
|
|
// not focusable cell (nsARIAGridCellAccessible is used)
|
|
|
|
cell: "table2_dc_1",
|
|
|
|
rowHeaderCells: [],
|
|
|
|
columnHeaderCells: [ "table2_ch_1" ]
|
2009-09-10 18:07:56 -07:00
|
|
|
},
|
2009-09-14 20:55:26 -07:00
|
|
|
{
|
|
|
|
// focusable cell (nsARIAGridCellAccessible is used)
|
|
|
|
cell: "table2_dc_2",
|
|
|
|
rowHeaderCells: [],
|
|
|
|
columnHeaderCells: [ "table2_ch_2" ]
|
|
|
|
}
|
2009-09-10 18:07:56 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
testHeaderCells(headerInfoMap);
|
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2009-09-10 18:07:56 -07:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<a target="_blank"
|
|
|
|
title="implement IAccessibleTable2"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=512424">Mozilla Bug 512424</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-09-10 18:07:56 -07:00
|
|
|
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
|
2009-09-14 20:55:26 -07:00
|
|
|
<div role="grid">
|
2009-09-10 18:07:56 -07:00
|
|
|
<div role="row">
|
|
|
|
<span id="table_ch_1" role="columnheader">col_1</span>
|
|
|
|
<span id="table_ch_2" role="columnheader">col_2</span>
|
|
|
|
<span id="table_ch_3" role="columnheader">col_3</span>
|
|
|
|
</div>
|
|
|
|
<div role="row">
|
|
|
|
<span id="table_rh_1" role="rowheader">row_1</span>
|
|
|
|
<span id="table_dc_1" role="gridcell">cell1</span>
|
|
|
|
<span id="table_dc_2" role="gridcell">cell2</span>
|
|
|
|
</div>
|
|
|
|
<div role="row">
|
|
|
|
<span id="table_rh_2" role="rowheader">row_2</span>
|
|
|
|
<span id="table_dc_3" role="gridcell">cell3</span>
|
|
|
|
<span id="table_dc_4" role="gridcell">cell4</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2009-09-14 20:55:26 -07:00
|
|
|
<div role="grid">
|
|
|
|
<div role="row">
|
|
|
|
<table role="presentation">
|
|
|
|
<tr>
|
|
|
|
<td id="table2_ch_1" role="columnheader">header1</td>
|
|
|
|
<td id="table2_ch_2" role="columnheader">header2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div role="row">
|
|
|
|
<table role="presentation">
|
|
|
|
<tr>
|
|
|
|
<td id="table2_dc_1" role="gridcell">cell1</td>
|
|
|
|
<td id="table2_dc_2" role="gridcell" tabindex="-1">cell2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2009-09-10 18:07:56 -07:00
|
|
|
</body>
|
|
|
|
</html>
|