accessible/tests/mochitest/role/test_general.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>test nsHyperTextAccessible accesible objects creation and their roles</title>
     5   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     7   <script type="application/javascript"
     8           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    10   <script type="application/javascript"
    11           src="../common.js"></script>
    12   <script type="application/javascript"
    13           src="../role.js"></script>
    14   <script type="application/javascript"
    15           src="../attributes.js"></script>
    17   <script type="application/javascript">
    18     function doTests()
    19     {
    20       // landmark tests section
    21       testRole("frm", ROLE_FORM);
    23       // nsHyperTextAcc tests section
    24       // Test html:form.
    25       testRole("nav", ROLE_SECTION);
    26       testRole("header", ROLE_HEADER);
    27       testRole("footer", ROLE_FOOTER);
    28       testRole("article", ROLE_DOCUMENT);
    29       testRole("aside", ROLE_NOTE);
    30       testRole("section", ROLE_SECTION);
    32       // Bug 996821
    33       // Check that landmark elements get accessibles with styled overflow.
    34       testRole("section_overflow", ROLE_SECTION);
    35       testRole("nav_overflow", ROLE_SECTION);
    36       testRole("header_overflow", ROLE_HEADER);
    37       testRole("aside_overflow", ROLE_NOTE);
    38       testRole("footer_overflow", ROLE_FOOTER);
    39       testRole("article_overflow", ROLE_DOCUMENT);
    41       // test html:div
    42       testRole("sec", ROLE_SECTION);
    44       // Test html:blockquote
    45       testRole("quote", ROLE_SECTION);
    47       // Test html:h, all levels
    48       testRole("head1", ROLE_HEADING);
    49       testRole("head2", ROLE_HEADING);
    50       testRole("head3", ROLE_HEADING);
    51       testRole("head4", ROLE_HEADING);
    52       testRole("head5", ROLE_HEADING);
    53       testRole("head6", ROLE_HEADING);
    55       // Test that an html:input @type="file" is exposed as ROLE_TEXT_CONTAINER.
    56       // After fix for bug 471356, it was temporarily exposed as a paragraph,
    57       // breaking JAWS compatibility.
    58       testRole("data", ROLE_TEXT_CONTAINER);
    60       // Test regular paragraph by comparison to make sure exposure does not
    61       // get broken.
    62       testRole("p", ROLE_PARAGRAPH);
    64       // Test dl, dt, dd
    65       testRole("definitionlist", ROLE_DEFINITION_LIST);
    66       testRole("definitionterm", ROLE_TERM);
    67       testRole("definitiondescription", ROLE_DEFINITION);
    69       // Has click, mousedown or mouseup listeners.
    70       testRole("span1", ROLE_TEXT_CONTAINER);
    71       testRole("span2", ROLE_TEXT_CONTAINER);
    72       testRole("span3", ROLE_TEXT_CONTAINER);
    74       SimpleTest.finish();
    75     }
    77     SimpleTest.waitForExplicitFinish();
    78     addA11yLoadEvent(doTests);
    79   </script>
    80 </head>
    81 <body>
    83   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=472326"
    84      title="html:input of type "file" no longer rendered to screen readers">
    85     Mozilla Bug 472326
    86   </a><br>
    87   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=474261"
    88       title="Test remaining implementations in nsHyperTextAccessible::GetRole">
    89     bug 474261
    90   </a><br>
    91   <a target="_blank"
    92      href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
    93      title="Expose click action if mouseup and mousedown are registered">
    94     Mozilla Bug 423409
    95   </a>
    96   <a target="_blank"
    97      title="Provide mappings for html5 <nav> <header> <footer> <article>"
    98      href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368">
    99     Bug 593368
   100   </a><br/>
   101   <a target="_blank"
   102      href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502"
   103      title="Map <article> like we do aria role article">
   104     Bug 613502
   105   </a>
   106   <a target="_blank"
   107      href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650"
   108      title="Change implementation of HTML5 landmark elements to conform">
   109     Bug 610650
   110   </a>
   111   <a target="_blank"
   112      href="https://bugzilla.mozilla.org/show_bug.cgi?id=614310"
   113      title="Map section to pane (like role=region)">
   114     Mozilla Bug 614310
   115   </a>
   116   <a target="_blank"
   117      href="https://bugzilla.mozilla.org/show_bug.cgi?id=734982"
   118      title="Map ARIA role FORM">
   119     Bug 734982
   120   </a>
   122   <p id="display"></p>
   123   <div id="content" style="display: none"></div>
   124   <pre id="test">
   125   </pre>
   127   <form id="frm" action="submit.php" method="post">
   128     <label for="data">File</label>:
   129     <input type="file" id="data" name="data" size="50"/>
   130   </form>
   132   <nav id="nav">a nav</nav>
   133   <header id="header">a header</header>
   134   <footer id="footer">a footer</footer>
   135   <article id="article">an article</article>
   136   <aside id="aside">by the way I am an aside</aside>
   137   <section id="section">a section</section>
   139   <section style="overflow: hidden;" id="section_overflow">
   140     <nav style="overflow: hidden;"
   141          id="nav_overflow">overflow nav</nav>
   142     <header style="overflow: hidden;"
   143             id="header_overflow">overflow header</header>
   144     <aside style="overflow: hidden;"
   145            id="aside_overflow">overflow aside</aside>
   146     <footer style="overflow: hidden;"
   147             id="footer_overflow">overflow footer</footer>
   148   </section>
   149   <article style="overflow: hidden;"
   150            id="article_overflow">overflow article</article>
   152   <p id="p">A paragraph for comparison.</p>
   153   <div id="sec">A normal div</div>
   154   <blockquote id="quote">A citation</blockquote>
   155   <h1 id="head1">A heading level 1</h1>
   156   <h2 id="head2">A heading level 2</h2>
   157   <h3 id="head3">A heading level 3</h3>
   158   <h4 id="head4">A heading level 4</h4>
   159   <h5 id="head5">A heading level 5</h5>
   160   <h6 id="head6">A heading level 6</h6>
   162   <dl id="definitionlist">
   163   <dt id="definitionterm">gecko</dt>
   164   <dd id="definitiondescription">geckos have sticky toes</dd>
   165   </dl>
   167   <span id="span1" onclick="">clickable span</span>
   168   <span id="span2" onmousedown="">clickable span</span>
   169   <span id="span3" onmouseup="">clickable span</span>
   170 </body>
   171 </html>

mercurial