accessible/tests/mochitest/attributes/test_xml-roles.html

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

mercurial