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