2009-01-15 06:45:43 -08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2010-02-03 07:00:25 -08:00
|
|
|
<title>test nsHyperTextAccessible accesible objects creation and their roles</title>
|
2009-01-15 06:45:43 -08:00
|
|
|
<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>
|
2009-01-20 07:02:35 -08:00
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
|
2009-01-15 06:45:43 -08:00
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
function doTests()
|
|
|
|
{
|
2009-01-19 13:25:55 -08:00
|
|
|
// Test html:form.
|
|
|
|
testRole("frm", ROLE_FORM);
|
|
|
|
|
|
|
|
// test html:div
|
|
|
|
testRole("sec", ROLE_SECTION);
|
|
|
|
|
|
|
|
// Test html:blockquote
|
|
|
|
testRole("quote", ROLE_SECTION);
|
|
|
|
|
|
|
|
// Test html:h, all levels
|
|
|
|
testRole("head1", ROLE_HEADING);
|
|
|
|
testRole("head2", ROLE_HEADING);
|
|
|
|
testRole("head3", ROLE_HEADING);
|
|
|
|
testRole("head4", ROLE_HEADING);
|
|
|
|
testRole("head5", ROLE_HEADING);
|
|
|
|
testRole("head6", ROLE_HEADING);
|
|
|
|
|
2009-01-15 06:45:43 -08:00
|
|
|
// Test that an html:input @type="file" is exposed as ROLE_TEXT_CONTAINER.
|
|
|
|
// After fix for bug 471356, it was temporarily exposed as a paragraph,
|
|
|
|
// breaking JAWS compatibility.
|
2009-01-19 13:25:55 -08:00
|
|
|
testRole("data", ROLE_TEXT_CONTAINER);
|
2009-01-15 06:45:43 -08:00
|
|
|
|
|
|
|
// Test regular paragraph by comparison to make sure exposure does not
|
|
|
|
// get broken.
|
2009-01-19 13:25:55 -08:00
|
|
|
testRole("p", ROLE_PARAGRAPH);
|
2009-01-15 06:45:43 -08:00
|
|
|
|
2010-01-11 10:55:52 -08:00
|
|
|
// Test dl, dt, dd
|
|
|
|
testRole("definitionlist", ROLE_LIST);
|
|
|
|
testRole("definitionterm", ROLE_LISTITEM);
|
|
|
|
testRole("definitiondescription", ROLE_PARAGRAPH);
|
|
|
|
|
2010-02-03 07:00:25 -08:00
|
|
|
// Has click, mousedown or mouseup listeners.
|
|
|
|
testRole("span1", ROLE_TEXT_CONTAINER);
|
|
|
|
testRole("span2", ROLE_TEXT_CONTAINER);
|
|
|
|
testRole("span3", ROLE_TEXT_CONTAINER);
|
|
|
|
|
2009-01-15 06:45:43 -08:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTests);
|
2009-01-15 06:45:43 -08:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=472326"
|
|
|
|
title="html:input of type "file" no longer rendered to screen readers">
|
2010-02-03 07:00:25 -08:00
|
|
|
Mozilla Bug 472326
|
|
|
|
</a><br>
|
2009-01-19 13:25:55 -08:00
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=474261"
|
|
|
|
title="Test remaining implementations in nsHypertextAccessible::GetRole">
|
2010-02-03 07:00:25 -08:00
|
|
|
bug 474261
|
|
|
|
</a><br>
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
|
|
|
|
title="Expose click action if mouseup and mousedown are registered">
|
|
|
|
Mozilla Bug 423409
|
2009-01-15 06:45:43 -08:00
|
|
|
</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
2009-01-19 13:25:55 -08:00
|
|
|
<form id="frm" action="submit.php" method="post">
|
2009-01-15 06:45:43 -08:00
|
|
|
<label for="data">File</label>:
|
|
|
|
<input type="file" id="data" name="data" size="50"/>
|
|
|
|
</form>
|
|
|
|
<p id="p">A paragraph for comparison.</p>
|
2009-01-19 13:25:55 -08:00
|
|
|
<div id="sec">A normal div</div>
|
|
|
|
<blockquote id="quote">A citation</blockquote>
|
|
|
|
<h1 id="head1">A heading level 1</h1>
|
|
|
|
<h2 id="head2">A heading level 2</h2>
|
|
|
|
<h3 id="head3">A heading level 3</h3>
|
|
|
|
<h4 id="head4">A heading level 4</h4>
|
|
|
|
<h5 id="head5">A heading level 5</h5>
|
|
|
|
<h6 id="head6">A heading level 6</h6>
|
2010-01-11 10:55:52 -08:00
|
|
|
|
|
|
|
<dl id="definitionlist">
|
|
|
|
<dt id="definitionterm">gecko</dt>
|
|
|
|
<dd id="definitiondescription">geckos have sticky toes</dd>
|
|
|
|
</dl>
|
2010-02-03 07:00:25 -08:00
|
|
|
|
|
|
|
<span id="span1" onclick="">clickable span</span>
|
|
|
|
<span id="span2" onmousedown="">clickable span</span>
|
|
|
|
<span id="span3" onmouseup="">clickable span</span>
|
2009-01-15 06:45:43 -08:00
|
|
|
</body>
|
|
|
|
</html>
|