accessible/tests/mochitest/role/test_general.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/role/test_general.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,171 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>test nsHyperTextAccessible accesible objects creation and their roles</title>
     1.8 +  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     1.9 +
    1.10 +  <script type="application/javascript"
    1.11 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +
    1.13 +  <script type="application/javascript"
    1.14 +          src="../common.js"></script>
    1.15 +  <script type="application/javascript"
    1.16 +          src="../role.js"></script>
    1.17 +  <script type="application/javascript"
    1.18 +          src="../attributes.js"></script>
    1.19 +
    1.20 +  <script type="application/javascript">
    1.21 +    function doTests()
    1.22 +    {
    1.23 +      // landmark tests section
    1.24 +      testRole("frm", ROLE_FORM);
    1.25 +
    1.26 +      // nsHyperTextAcc tests section
    1.27 +      // Test html:form.
    1.28 +      testRole("nav", ROLE_SECTION);
    1.29 +      testRole("header", ROLE_HEADER);
    1.30 +      testRole("footer", ROLE_FOOTER);
    1.31 +      testRole("article", ROLE_DOCUMENT);
    1.32 +      testRole("aside", ROLE_NOTE);
    1.33 +      testRole("section", ROLE_SECTION);
    1.34 +
    1.35 +      // Bug 996821
    1.36 +      // Check that landmark elements get accessibles with styled overflow.
    1.37 +      testRole("section_overflow", ROLE_SECTION);
    1.38 +      testRole("nav_overflow", ROLE_SECTION);
    1.39 +      testRole("header_overflow", ROLE_HEADER);
    1.40 +      testRole("aside_overflow", ROLE_NOTE);
    1.41 +      testRole("footer_overflow", ROLE_FOOTER);
    1.42 +      testRole("article_overflow", ROLE_DOCUMENT);
    1.43 +
    1.44 +      // test html:div
    1.45 +      testRole("sec", ROLE_SECTION);
    1.46 +
    1.47 +      // Test html:blockquote
    1.48 +      testRole("quote", ROLE_SECTION);
    1.49 +
    1.50 +      // Test html:h, all levels
    1.51 +      testRole("head1", ROLE_HEADING);
    1.52 +      testRole("head2", ROLE_HEADING);
    1.53 +      testRole("head3", ROLE_HEADING);
    1.54 +      testRole("head4", ROLE_HEADING);
    1.55 +      testRole("head5", ROLE_HEADING);
    1.56 +      testRole("head6", ROLE_HEADING);
    1.57 +
    1.58 +      // Test that an html:input @type="file" is exposed as ROLE_TEXT_CONTAINER.
    1.59 +      // After fix for bug 471356, it was temporarily exposed as a paragraph,
    1.60 +      // breaking JAWS compatibility.
    1.61 +      testRole("data", ROLE_TEXT_CONTAINER);
    1.62 +
    1.63 +      // Test regular paragraph by comparison to make sure exposure does not
    1.64 +      // get broken.
    1.65 +      testRole("p", ROLE_PARAGRAPH);
    1.66 +
    1.67 +      // Test dl, dt, dd
    1.68 +      testRole("definitionlist", ROLE_DEFINITION_LIST);
    1.69 +      testRole("definitionterm", ROLE_TERM);
    1.70 +      testRole("definitiondescription", ROLE_DEFINITION);
    1.71 +
    1.72 +      // Has click, mousedown or mouseup listeners.
    1.73 +      testRole("span1", ROLE_TEXT_CONTAINER);
    1.74 +      testRole("span2", ROLE_TEXT_CONTAINER);
    1.75 +      testRole("span3", ROLE_TEXT_CONTAINER);
    1.76 +
    1.77 +      SimpleTest.finish();
    1.78 +    }
    1.79 +
    1.80 +    SimpleTest.waitForExplicitFinish();
    1.81 +    addA11yLoadEvent(doTests);
    1.82 +  </script>
    1.83 +</head>
    1.84 +<body>
    1.85 +
    1.86 +  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=472326"
    1.87 +     title="html:input of type "file" no longer rendered to screen readers">
    1.88 +    Mozilla Bug 472326
    1.89 +  </a><br>
    1.90 +  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=474261"
    1.91 +      title="Test remaining implementations in nsHyperTextAccessible::GetRole">
    1.92 +    bug 474261
    1.93 +  </a><br>
    1.94 +  <a target="_blank"
    1.95 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
    1.96 +     title="Expose click action if mouseup and mousedown are registered">
    1.97 +    Mozilla Bug 423409
    1.98 +  </a>
    1.99 +  <a target="_blank"
   1.100 +     title="Provide mappings for html5 <nav> <header> <footer> <article>"
   1.101 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368">
   1.102 +    Bug 593368
   1.103 +  </a><br/>
   1.104 +  <a target="_blank"
   1.105 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502"
   1.106 +     title="Map <article> like we do aria role article">
   1.107 +    Bug 613502
   1.108 +  </a>
   1.109 +  <a target="_blank"
   1.110 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650"
   1.111 +     title="Change implementation of HTML5 landmark elements to conform">
   1.112 +    Bug 610650
   1.113 +  </a>
   1.114 +  <a target="_blank"
   1.115 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=614310"
   1.116 +     title="Map section to pane (like role=region)">
   1.117 +    Mozilla Bug 614310
   1.118 +  </a>
   1.119 +  <a target="_blank"
   1.120 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=734982"
   1.121 +     title="Map ARIA role FORM">
   1.122 +    Bug 734982
   1.123 +  </a>
   1.124 +
   1.125 +  <p id="display"></p>
   1.126 +  <div id="content" style="display: none"></div>
   1.127 +  <pre id="test">
   1.128 +  </pre>
   1.129 +
   1.130 +  <form id="frm" action="submit.php" method="post">
   1.131 +    <label for="data">File</label>:
   1.132 +    <input type="file" id="data" name="data" size="50"/>
   1.133 +  </form>
   1.134 +
   1.135 +  <nav id="nav">a nav</nav>
   1.136 +  <header id="header">a header</header>
   1.137 +  <footer id="footer">a footer</footer>
   1.138 +  <article id="article">an article</article>
   1.139 +  <aside id="aside">by the way I am an aside</aside>
   1.140 +  <section id="section">a section</section>
   1.141 +
   1.142 +  <section style="overflow: hidden;" id="section_overflow">
   1.143 +    <nav style="overflow: hidden;"
   1.144 +         id="nav_overflow">overflow nav</nav>
   1.145 +    <header style="overflow: hidden;"
   1.146 +            id="header_overflow">overflow header</header>
   1.147 +    <aside style="overflow: hidden;"
   1.148 +           id="aside_overflow">overflow aside</aside>
   1.149 +    <footer style="overflow: hidden;"
   1.150 +            id="footer_overflow">overflow footer</footer>
   1.151 +  </section>
   1.152 +  <article style="overflow: hidden;"
   1.153 +           id="article_overflow">overflow article</article>
   1.154 +
   1.155 +  <p id="p">A paragraph for comparison.</p>
   1.156 +  <div id="sec">A normal div</div>
   1.157 +  <blockquote id="quote">A citation</blockquote>
   1.158 +  <h1 id="head1">A heading level 1</h1>
   1.159 +  <h2 id="head2">A heading level 2</h2>
   1.160 +  <h3 id="head3">A heading level 3</h3>
   1.161 +  <h4 id="head4">A heading level 4</h4>
   1.162 +  <h5 id="head5">A heading level 5</h5>
   1.163 +  <h6 id="head6">A heading level 6</h6>
   1.164 +
   1.165 +  <dl id="definitionlist">
   1.166 +  <dt id="definitionterm">gecko</dt>
   1.167 +  <dd id="definitiondescription">geckos have sticky toes</dd>
   1.168 +  </dl>
   1.169 +
   1.170 +  <span id="span1" onclick="">clickable span</span>
   1.171 +  <span id="span2" onmousedown="">clickable span</span>
   1.172 +  <span id="span3" onmouseup="">clickable span</span>
   1.173 +</body>
   1.174 +</html>

mercurial