gecko/accessible/tests/mochitest/attributes/test_xml-roles.html
2013-03-29 07:04:28 -04:00

106 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>XML landmark tests</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 doTest()
{
// Some AT may look for this
testAttrs("nav", {"xml-roles" : "navigation"}, true);
testAttrs("header", {"xml-roles" : "banner"}, true);
testAbsentAttrs("article_header", {"xml-roles" : "banner"});
testAbsentAttrs("section_header", {"xml-roles" : "banner"});
testAttrs("footer", {"xml-roles" : "contentinfo"}, true);
testAbsentAttrs("article_footer", {"xml-roles" : "contentinfo"});
testAbsentAttrs("section_footer", {"xml-roles" : "contentinfo"});
testAttrs("aside", {"xml-roles" : "complementary"}, true);
testAttrs("section", {"xml-roles" : "region"}, true);
testAttrs("main", {"xml-roles" : "main"}, true); // // ARIA override
testAttrs("form", {"xml-roles" : "form"}, true);
testAttrs("article", {"xml-roles" : "article"}, true);
testAttrs("main_element", {"xml-roles" : "main"}, true);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<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>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=761891"
title="HTML5 article element should expose xml-roles:article object attribute">
Bug 761891
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=849624"
title="modify HTML5 header and footer accessibility API mapping">
Bug 849624
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<nav id="nav">a nav</nav>
<header id="header">a header</header>
<footer id="footer">a footer</footer>
<article id="article_with_header_and_footer">
<header id="article_header">a header within an article</header>
<footer id="article_footer">a footer within an article</footer>
</article>
<section id="section_with_header_and_footer">
<header id="section_header">a header within an section</header>
<footer id="section_footer">a footer within an section</footer>
</section>
<aside id="aside">by the way I am an aside</aside>
<section id="section">a section</section>
<article id="main" role="main">a main area</article>
<article id="form" role="form">a form area</article>
<article id="article">article</article>
<main id="main_element">another main area</main>
</body>
</html>