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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/attributes/test_xml-roles.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,105 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>XML landmark tests</title>
     1.8 +  <link rel="stylesheet" type="text/css"
     1.9 +        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.10 +
    1.11 +  <script type="application/javascript"
    1.12 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +
    1.14 +  <script type="application/javascript"
    1.15 +          src="../common.js"></script>
    1.16 +  <script type="application/javascript"
    1.17 +          src="../role.js"></script>
    1.18 +  <script type="application/javascript"
    1.19 +          src="../attributes.js"></script>
    1.20 +
    1.21 +  <script type="application/javascript">
    1.22 +
    1.23 +    function doTest()
    1.24 +    {
    1.25 +      // Some AT may look for this
    1.26 +      testAttrs("nav", {"xml-roles" : "navigation"}, true);
    1.27 +      testAttrs("header", {"xml-roles" : "banner"}, true);
    1.28 +      testAbsentAttrs("article_header", {"xml-roles" : "banner"});
    1.29 +      testAbsentAttrs("section_header", {"xml-roles" : "banner"});
    1.30 +      testAttrs("footer", {"xml-roles" : "contentinfo"}, true);
    1.31 +      testAbsentAttrs("article_footer", {"xml-roles" : "contentinfo"});
    1.32 +      testAbsentAttrs("section_footer", {"xml-roles" : "contentinfo"});
    1.33 +      testAttrs("aside", {"xml-roles" : "complementary"}, true);
    1.34 +      testAttrs("section", {"xml-roles" : "region"}, true);
    1.35 +      testAttrs("main", {"xml-roles" : "main"}, true); // // ARIA override
    1.36 +      testAttrs("form", {"xml-roles" : "form"}, true);
    1.37 +      testAttrs("article", {"xml-roles" : "article"}, true);
    1.38 +      testAttrs("main_element", {"xml-roles" : "main"}, true);
    1.39 +
    1.40 +      SimpleTest.finish();
    1.41 +    }
    1.42 +
    1.43 +    SimpleTest.waitForExplicitFinish();
    1.44 +    addA11yLoadEvent(doTest);
    1.45 +  </script>
    1.46 +</head>
    1.47 +<body>
    1.48 +
    1.49 +  <a target="_blank"
    1.50 +     title="Provide mappings for html5 <nav> <header> <footer> <article>"
    1.51 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368">
    1.52 +    Bug 593368
    1.53 +  </a><br/>
    1.54 +  <a target="_blank"
    1.55 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502"
    1.56 +     title="Map <article> like we do aria role article">
    1.57 +    Bug 613502
    1.58 +  </a>
    1.59 +  <a target="_blank"
    1.60 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650"
    1.61 +     title="Change implementation of HTML5 landmark elements to conform">
    1.62 +    Bug 610650
    1.63 +  </a>
    1.64 +  <a target="_blank"
    1.65 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=614310"
    1.66 +     title="Map section to pane (like role=region)">
    1.67 +    Mozilla Bug 614310
    1.68 +  </a>
    1.69 +  <a target="_blank"
    1.70 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=734982"
    1.71 +     title="Map ARIA role FORM">
    1.72 +    Bug 734982
    1.73 +  </a>
    1.74 +  <a target="_blank"
    1.75 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=761891"
    1.76 +     title="HTML5 article element should expose xml-roles:article object attribute">
    1.77 +    Bug 761891
    1.78 +  </a>
    1.79 +  <a target="_blank"
    1.80 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=849624"
    1.81 +     title="modify HTML5 header and footer accessibility API mapping">
    1.82 +    Bug 849624
    1.83 +  </a>
    1.84 +  <p id="display"></p>
    1.85 +  <div id="content" style="display: none"></div>
    1.86 +  <pre id="test">
    1.87 +  </pre>
    1.88 +
    1.89 +  <nav id="nav">a nav</nav>
    1.90 +  <header id="header">a header</header>
    1.91 +  <footer id="footer">a footer</footer>
    1.92 +  <article id="article_with_header_and_footer">
    1.93 +    <header id="article_header">a header within an article</header>
    1.94 +    <footer id="article_footer">a footer within an article</footer>
    1.95 +  </article>
    1.96 +  <section id="section_with_header_and_footer">
    1.97 +    <header id="section_header">a header within an section</header>
    1.98 +    <footer id="section_footer">a footer within an section</footer>
    1.99 +  </section>
   1.100 +  <aside id="aside">by the way I am an aside</aside>
   1.101 +  <section id="section">a section</section>
   1.102 +  <article id="main" role="main">a main area</article>
   1.103 +  <article id="form" role="form">a form area</article>
   1.104 +  <article id="article">article</article>
   1.105 +  <main id="main_element">another main area</main>
   1.106 +
   1.107 +</body>
   1.108 +</html>

mercurial