mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
9bb4ee55a9
--HG-- rename : accessible/tests/mochitest/test_objectattrs.html => accessible/tests/mochitest/attributes/test_obj.html rename : accessible/tests/mochitest/test_cssattrs.html => accessible/tests/mochitest/attributes/test_obj_css.html rename : accessible/tests/mochitest/test_groupattrs.html => accessible/tests/mochitest/attributes/test_obj_group.html rename : accessible/tests/mochitest/test_groupattrs.xul => accessible/tests/mochitest/attributes/test_obj_group.xul rename : accessible/tests/mochitest/test_attrs_elm_tree.xul => accessible/tests/mochitest/attributes/test_obj_group_tree.xul rename : accessible/tests/mochitest/test_textattrs.html => accessible/tests/mochitest/attributes/test_text.html
171 lines
5.1 KiB
HTML
171 lines
5.1 KiB
HTML
<html>
|
|
|
|
<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()
|
|
{
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// HTML select
|
|
testGroupAttrs("opt1", 1, 2);
|
|
testGroupAttrs("opt2", 2, 2);
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// HTML ul/ol
|
|
testGroupAttrs("li1", 1, 3);
|
|
testGroupAttrs("li2", 2, 3);
|
|
testGroupAttrs("li3", 3, 3);
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// HTML ul/ol (nested lists)
|
|
|
|
testGroupAttrs("li4", 1, 3, 1);
|
|
testGroupAttrs("li5", 2, 3, 1);
|
|
testGroupAttrs("li6", 3, 3, 1);
|
|
|
|
testGroupAttrs("n_li4", 1, 3, 2);
|
|
testGroupAttrs("n_li5", 2, 3, 2);
|
|
testGroupAttrs("n_li6", 3, 3, 2);
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// ARIA list
|
|
testGroupAttrs("li7", 1, 3);
|
|
testGroupAttrs("li8", 2, 3);
|
|
testGroupAttrs("li9", 3, 3);
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// ARIA list (nested lists)
|
|
testGroupAttrs("li10", 1, 3, 1);
|
|
testGroupAttrs("li11", 2, 3, 1);
|
|
testGroupAttrs("li12", 3, 3, 1);
|
|
|
|
testGroupAttrs("n_li10", 1, 3, 2);
|
|
testGroupAttrs("n_li11", 2, 3, 2);
|
|
testGroupAttrs("n_li12", 3, 3, 2);
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// ARIA grid
|
|
testGroupAttrs("grid_row1", 1, 2);
|
|
testGroupAttrs("grid_cell1", 1, 2);
|
|
testGroupAttrs("grid_cell2", 2, 2);
|
|
|
|
testGroupAttrs("grid_row2", 2, 2);
|
|
testGroupAttrs("grid_cell3", 1, 2);
|
|
testGroupAttrs("grid_cell4", 2, 2);
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// ARIA treegrid
|
|
testGroupAttrs("treegrid_row1", 1, 3, 1);
|
|
testGroupAttrs("treegrid_cell1", 1, 2);
|
|
testGroupAttrs("treegrid_cell2", 2, 2);
|
|
|
|
testGroupAttrs("treegrid_row2", 2, 3, 2);
|
|
testGroupAttrs("treegrid_cell3", 1, 2);
|
|
testGroupAttrs("treegrid_cell4", 2, 2);
|
|
|
|
testGroupAttrs("treegrid_row3", 3, 3, 1);
|
|
testGroupAttrs("treegrid_cell5", 1, 2);
|
|
testGroupAttrs("treegrid_cell6", 2, 2);
|
|
|
|
SimpleTest.finish();
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
addA11yLoadEvent(doTest);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<a target="_blank"
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=468418"
|
|
title="Expose level for nested lists in HTML">
|
|
Mozilla Bug 468418
|
|
</a>
|
|
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none"></div>
|
|
<pre id="test">
|
|
</pre>
|
|
|
|
<select size="4">
|
|
<option id="opt1">option1</option>
|
|
<option id="opt2">option2</option>
|
|
</select>
|
|
|
|
<ul>
|
|
<li id="li1">Oranges</li>
|
|
<li id="li2">Apples</li>
|
|
<li id="li3">Bananas</li>
|
|
</ul>
|
|
|
|
<ol>
|
|
<li id="li4">Oranges</li>
|
|
<li id="li5">Apples</li>
|
|
<li id="li6">Bananas
|
|
<ul>
|
|
<li id="n_li4">Oranges</li>
|
|
<li id="n_li5">Apples</li>
|
|
<li id="n_li6">Bananas</li>
|
|
</ul>
|
|
</li>
|
|
</ol>
|
|
|
|
<span role="list">
|
|
<span role="listitem" id="li7">Oranges</span>
|
|
<span role="listitem" id="li8">Apples</span>
|
|
<span role="listitem" id="li9">Bananas</span>
|
|
</span>
|
|
|
|
<span role="list">
|
|
<span role="listitem" id="li10">Oranges</span>
|
|
<span role="listitem" id="li11">Apples</span>
|
|
<span role="listitem" id="li12">Bananas
|
|
<span role="list">
|
|
<span role="listitem" id="n_li10">Oranges</span>
|
|
<span role="listitem" id="n_li11">Apples</span>
|
|
<span role="listitem" id="n_li12">Bananas</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
|
|
<table role="grid">
|
|
<tr role="row" id="grid_row1">
|
|
<td role="gridcell" id="grid_cell1">cell1</td>
|
|
<td role="gridcell" id="grid_cell2">cell2</td>
|
|
</tr>
|
|
<tr role="row" id="grid_row2">
|
|
<td role="gridcell" id="grid_cell3">cell3</td>
|
|
<td role="gridcell" id="grid_cell4">cell4</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div role="treegrid">
|
|
<div role="row" aria-level="1" id="treegrid_row1">
|
|
<div role="gridcell" id="treegrid_cell1">cell1</div>
|
|
<div role="gridcell" id="treegrid_cell2">cell2</div>
|
|
</div>
|
|
<div role="row" aria-level="2" id="treegrid_row2">
|
|
<div role="gridcell" id="treegrid_cell3">cell1</div>
|
|
<div role="gridcell" id="treegrid_cell4">cell2</div>
|
|
</div>
|
|
<div role="row" id="treegrid_row3">
|
|
<div role="gridcell" id="treegrid_cell5">cell1</div>
|
|
<div role="gridcell" id="treegrid_cell6">cell2</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|