gecko/accessible/tests/mochitest/role/test_general.html
Mark Capella 3819ef3a34 Bug 759305 - De-ns-ify nsHyperTextAcc, r=surkov
--HG--
rename : accessible/src/atk/nsHyperTextAccessibleWrap.h => accessible/src/atk/HyperTextAccessibleWrap.h
rename : accessible/src/html/nsHyperTextAccessible.cpp => accessible/src/generic/HyperTextAccessible.cpp
rename : accessible/src/html/nsHyperTextAccessible.h => accessible/src/generic/HyperTextAccessible.h
rename : accessible/src/mac/nsHyperTextAccessibleWrap.h => accessible/src/mac/HyperTextAccessibleWrap.h
rename : accessible/src/msaa/nsHyperTextAccessibleWrap.cpp => accessible/src/msaa/HyperTextAccessibleWrap.cpp
rename : accessible/src/msaa/nsHyperTextAccessibleWrap.h => accessible/src/msaa/HyperTextAccessibleWrap.h
rename : accessible/src/other/nsHyperTextAccessibleWrap.h => accessible/src/other/HyperTextAccessibleWrap.h
2012-05-31 04:04:41 -04:00

150 lines
4.8 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>test nsHyperTextAccessible accesible objects creation and their roles</title>
<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="../role.js"></script>
<script type="application/javascript"
src="../attributes.js"></script>
<script type="application/javascript">
function doTests()
{
// landmark tests section
testRole("frm", ROLE_FORM);
// nsHyperTextAcc tests section
// Test html:form.
testRole("nav", ROLE_SECTION);
testRole("header", ROLE_HEADER);
testRole("footer", ROLE_FOOTER);
testRole("article", ROLE_DOCUMENT);
testRole("aside", ROLE_NOTE);
testRole("section", ROLE_SECTION);
// 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);
// 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.
testRole("data", ROLE_TEXT_CONTAINER);
// Test regular paragraph by comparison to make sure exposure does not
// get broken.
testRole("p", ROLE_PARAGRAPH);
// Test dl, dt, dd
testRole("definitionlist", ROLE_DEFINITION_LIST);
testRole("definitionterm", ROLE_TERM);
testRole("definitiondescription", ROLE_DEFINITION);
// Has click, mousedown or mouseup listeners.
testRole("span1", ROLE_TEXT_CONTAINER);
testRole("span2", ROLE_TEXT_CONTAINER);
testRole("span3", ROLE_TEXT_CONTAINER);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTests);
</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">
Mozilla Bug 472326
</a><br>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=474261"
title="Test remaining implementations in nsHyperTextAccessible::GetRole">
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
</a>
<a target="_blank"
title="Provide mappings for html5 <nav> <header> <footer> <article>"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368">
Bug 593368
</a><br/>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502"
title="Map <article> like we do aria role article">
Bug 613502
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650"
title="Change implementation of HTML5 landmark elements to conform">
Bug 610650
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=614310"
title="Map section to pane (like role=region)">
Mozilla Bug 614310
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=734982"
title="Map ARIA role FORM">
Bug 734982
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<form id="frm" action="submit.php" method="post">
<label for="data">File</label>:
<input type="file" id="data" name="data" size="50"/>
</form>
<nav id="nav">a nav</nav>
<header id="header">a header</header>
<footer id="footer">a footer</footer>
<article id="article">an article</article>
<aside id="aside">by the way I am an aside</aside>
<section id="section">a section</section>
<p id="p">A paragraph for comparison.</p>
<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>
<dl id="definitionlist">
<dt id="definitionterm">gecko</dt>
<dd id="definitiondescription">geckos have sticky toes</dd>
</dl>
<span id="span1" onclick="">clickable span</span>
<span id="span2" onmousedown="">clickable span</span>
<span id="span3" onmouseup="">clickable span</span>
</body>
</html>