Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>XML landmark tests</title> |
michael@0 | 5 | <link rel="stylesheet" type="text/css" |
michael@0 | 6 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="../common.js"></script> |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="../role.js"></script> |
michael@0 | 15 | <script type="application/javascript" |
michael@0 | 16 | src="../attributes.js"></script> |
michael@0 | 17 | |
michael@0 | 18 | <script type="application/javascript"> |
michael@0 | 19 | |
michael@0 | 20 | function doTest() |
michael@0 | 21 | { |
michael@0 | 22 | // Some AT may look for this |
michael@0 | 23 | testAttrs("nav", {"xml-roles" : "navigation"}, true); |
michael@0 | 24 | testAttrs("header", {"xml-roles" : "banner"}, true); |
michael@0 | 25 | testAbsentAttrs("article_header", {"xml-roles" : "banner"}); |
michael@0 | 26 | testAbsentAttrs("section_header", {"xml-roles" : "banner"}); |
michael@0 | 27 | testAttrs("footer", {"xml-roles" : "contentinfo"}, true); |
michael@0 | 28 | testAbsentAttrs("article_footer", {"xml-roles" : "contentinfo"}); |
michael@0 | 29 | testAbsentAttrs("section_footer", {"xml-roles" : "contentinfo"}); |
michael@0 | 30 | testAttrs("aside", {"xml-roles" : "complementary"}, true); |
michael@0 | 31 | testAttrs("section", {"xml-roles" : "region"}, true); |
michael@0 | 32 | testAttrs("main", {"xml-roles" : "main"}, true); // // ARIA override |
michael@0 | 33 | testAttrs("form", {"xml-roles" : "form"}, true); |
michael@0 | 34 | testAttrs("article", {"xml-roles" : "article"}, true); |
michael@0 | 35 | testAttrs("main_element", {"xml-roles" : "main"}, true); |
michael@0 | 36 | |
michael@0 | 37 | SimpleTest.finish(); |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 41 | addA11yLoadEvent(doTest); |
michael@0 | 42 | </script> |
michael@0 | 43 | </head> |
michael@0 | 44 | <body> |
michael@0 | 45 | |
michael@0 | 46 | <a target="_blank" |
michael@0 | 47 | title="Provide mappings for html5 <nav> <header> <footer> <article>" |
michael@0 | 48 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368"> |
michael@0 | 49 | Bug 593368 |
michael@0 | 50 | </a><br/> |
michael@0 | 51 | <a target="_blank" |
michael@0 | 52 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502" |
michael@0 | 53 | title="Map <article> like we do aria role article"> |
michael@0 | 54 | Bug 613502 |
michael@0 | 55 | </a> |
michael@0 | 56 | <a target="_blank" |
michael@0 | 57 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650" |
michael@0 | 58 | title="Change implementation of HTML5 landmark elements to conform"> |
michael@0 | 59 | Bug 610650 |
michael@0 | 60 | </a> |
michael@0 | 61 | <a target="_blank" |
michael@0 | 62 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=614310" |
michael@0 | 63 | title="Map section to pane (like role=region)"> |
michael@0 | 64 | Mozilla Bug 614310 |
michael@0 | 65 | </a> |
michael@0 | 66 | <a target="_blank" |
michael@0 | 67 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=734982" |
michael@0 | 68 | title="Map ARIA role FORM"> |
michael@0 | 69 | Bug 734982 |
michael@0 | 70 | </a> |
michael@0 | 71 | <a target="_blank" |
michael@0 | 72 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=761891" |
michael@0 | 73 | title="HTML5 article element should expose xml-roles:article object attribute"> |
michael@0 | 74 | Bug 761891 |
michael@0 | 75 | </a> |
michael@0 | 76 | <a target="_blank" |
michael@0 | 77 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=849624" |
michael@0 | 78 | title="modify HTML5 header and footer accessibility API mapping"> |
michael@0 | 79 | Bug 849624 |
michael@0 | 80 | </a> |
michael@0 | 81 | <p id="display"></p> |
michael@0 | 82 | <div id="content" style="display: none"></div> |
michael@0 | 83 | <pre id="test"> |
michael@0 | 84 | </pre> |
michael@0 | 85 | |
michael@0 | 86 | <nav id="nav">a nav</nav> |
michael@0 | 87 | <header id="header">a header</header> |
michael@0 | 88 | <footer id="footer">a footer</footer> |
michael@0 | 89 | <article id="article_with_header_and_footer"> |
michael@0 | 90 | <header id="article_header">a header within an article</header> |
michael@0 | 91 | <footer id="article_footer">a footer within an article</footer> |
michael@0 | 92 | </article> |
michael@0 | 93 | <section id="section_with_header_and_footer"> |
michael@0 | 94 | <header id="section_header">a header within an section</header> |
michael@0 | 95 | <footer id="section_footer">a footer within an section</footer> |
michael@0 | 96 | </section> |
michael@0 | 97 | <aside id="aside">by the way I am an aside</aside> |
michael@0 | 98 | <section id="section">a section</section> |
michael@0 | 99 | <article id="main" role="main">a main area</article> |
michael@0 | 100 | <article id="form" role="form">a form area</article> |
michael@0 | 101 | <article id="article">article</article> |
michael@0 | 102 | <main id="main_element">another main area</main> |
michael@0 | 103 | |
michael@0 | 104 | </body> |
michael@0 | 105 | </html> |