Bug 1349835 Part 2 - Test that an input of type checkbox or radio with -moz-appearance:none; creates correct accessibles, r=surkov
authorMarco Zehe <mzehe@mozilla.com>
Fri, 02 Jun 2017 14:05:44 +0200
changeset 362019 4df99c3d89d7eccefd0f348ac5dd9db530c64ac8
parent 362018 a37ca72024c661afc148740be2c3a21e0e20f30e
child 362020 d5cd9b6d1a87f1e9c8557886d998d528f31ea49e
push id31955
push userryanvm@gmail.com
push dateFri, 02 Jun 2017 15:10:12 +0000
treeherdermozilla-central@95d2d23ff510 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1349835
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1349835 Part 2 - Test that an input of type checkbox or radio with -moz-appearance:none; creates correct accessibles, r=surkov MozReview-Commit-ID: GIWH6HYoGDq
accessible/tests/mochitest/role/test_general.html
--- a/accessible/tests/mochitest/role/test_general.html
+++ b/accessible/tests/mochitest/role/test_general.html
@@ -52,16 +52,23 @@
       testRole("head5", ROLE_HEADING);
       testRole("head6", ROLE_HEADING);
 
       // Test that an html:input @type="file" is exposed as ROLE_TEXT_CONTAINER.
       // After fix for bug 471356, it was temporarily exposed as a paragraph,
       // breaking JAWS compatibility.
       testRole("data", ROLE_TEXT_CONTAINER);
 
+      // Test that input type="checkbox" and type="radio" are
+      // exposed as such regardless of appearance style.
+      testRole("checkbox_regular", ROLE_CHECKBUTTON);
+      testRole("checkbox_appearance_none", ROLE_CHECKBUTTON);
+      testRole("radio_regular", ROLE_RADIOBUTTON);
+      testRole("radio_appearance_none", ROLE_RADIOBUTTON);
+
       // Test regular paragraph by comparison to make sure exposure does not
       // get broken.
       testRole("p", ROLE_PARAGRAPH);
 
       // Test dl, dt, dd
       testRole("definitionlist", ROLE_DEFINITION_LIST);
       testRole("definitionterm", ROLE_TERM);
       testRole("definitiondescription", ROLE_DEFINITION);
@@ -131,16 +138,20 @@
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <form id="frm" action="submit.php" method="post">
     <label for="data">File</label>:
     <input type="file" id="data" name="data" size="50"/>
+    <input type="checkbox" id="checkbox_regular" value="Check me"/>
+    <input type="checkbox" style="-moz-appearance: none;" id="checkbox_appearance_none" value="Check me"/>
+    <input type="radio" id="radio_regular" value="Check me"/>
+    <input type="radio" style="-moz-appearance: none;" id="radio_appearance_none" value="Check me"/>
   </form>
 
   <nav id="nav">a nav</nav>
   <header id="header">a header</header>
   <footer id="footer">a footer</footer>
   <article id="article">an article</article>
   <aside id="aside">by the way I am an aside</aside>
   <section id="section">a section</section>