2010-11-08 05:33:34 -08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>HTML 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/MochiKit/packed.js"></script>
|
|
|
|
<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()
|
|
|
|
{
|
|
|
|
testRole("nav", ROLE_SECTION);
|
|
|
|
testRole("header", ROLE_HEADER);
|
|
|
|
testRole("footer", ROLE_FOOTER);
|
2010-11-29 10:32:19 -08:00
|
|
|
testRole("article", ROLE_DOCUMENT);
|
2010-11-15 10:30:44 -08:00
|
|
|
testRole("aside", ROLE_NOTE);
|
2010-11-08 05:33:34 -08:00
|
|
|
|
2010-11-29 10:32:19 -08:00
|
|
|
testRole("main", ROLE_DOCUMENT);
|
|
|
|
|
2010-11-08 05:33:34 -08:00
|
|
|
// Some AT may look for this
|
|
|
|
testAttrs("nav", {"xml-roles" : "navigation"}, true);
|
|
|
|
testAttrs("header", {"xml-roles" : "banner"}, true);
|
|
|
|
testAttrs("footer", {"xml-roles" : "contentinfo"}, true);
|
2010-11-15 10:30:44 -08:00
|
|
|
testAttrs("aside", {"xml-roles" : "note"}, true);
|
2010-11-29 10:32:19 -08:00
|
|
|
testAttrs("main", {"xml-roles" : "main"}, true); // ARIA override
|
2010-11-08 05:33:34 -08:00
|
|
|
|
|
|
|
// And some AT may look for this
|
|
|
|
testAttrs("nav", {"tag" : "NAV"}, true);
|
|
|
|
testAttrs("header", {"tag" : "HEADER"}, true);
|
|
|
|
testAttrs("footer", {"tag" : "FOOTER"}, true);
|
|
|
|
testAttrs("article", {"tag" : "ARTICLE"}, true);
|
2010-11-15 10:30:44 -08:00
|
|
|
testAttrs("aside", {"tag" : "ASIDE"}, true);
|
2010-11-29 10:32:19 -08:00
|
|
|
testAttrs("main", {"tag" : "ARTICLE"}, true); // no override expected
|
2010-11-08 05:33:34 -08:00
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
addA11yLoadEvent(doTest);
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank"
|
2010-11-29 10:32:19 -08:00
|
|
|
title="Provide mappings for html5 <nav> <header> <footer> <article>"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368">
|
|
|
|
Mozilla 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">
|
|
|
|
Mozilla Bug 613502
|
|
|
|
</a>
|
2010-11-08 05:33:34 -08:00
|
|
|
<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>
|
2010-11-15 10:30:44 -08:00
|
|
|
<aside id="aside">by the way I am an aside</aside>
|
2010-11-08 05:33:34 -08:00
|
|
|
|
2010-11-29 10:32:19 -08:00
|
|
|
<article id="article">an article</article>
|
|
|
|
<article id="main" role="main">a main area</article>
|
2010-11-08 05:33:34 -08:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|