Replaced automatated role value changes with interactive UI.
authorJoseph Scheuhammer <clown@alum.mit.edu>
Fri, 07 Sep 2012 15:56:57 -0400
changeset 9 1e7849885517
parent 8 81c347dedceb
child 12 d68d72489586
Replaced automatated role value changes with interactive UI.

Test files for cases 567 and 568 originally automatically changed
the role, using window.setTimeout(). Replaced that with buttons
that allow the tester to control when the role change occurs, and
to reinitialize the test file.
ARIA/1.0/tests/test-files/author-requirements/567.html
ARIA/1.0/tests/test-files/author-requirements/568.html
--- a/ARIA/1.0/tests/test-files/author-requirements/567.html	Fri Aug 31 16:11:09 2012 -0400
+++ b/ARIA/1.0/tests/test-files/author-requirements/567.html	Fri Sep 07 15:56:57 2012 -0400
@@ -9,13 +9,13 @@
           element.setAttribute ('role', newRole);
           element.innerHTML = "This &lt;div&gt; has role '" + newRole + "'";
       }
-      function doOnload() {
-          document.getElementById('test').focus();
-          window.setTimeout ("changeRole (document.getElementById('test'), 'checkbox')", 1000);
-      }
     </script>
   </head>
-  <body onload="doOnload();">
+  <body>
     <div role="button" id="test" tabindex="0" onclick="changeRole (this, 'checkbox');" onkeydown="changeRole (this, 'checkbox');">This &lt;div&gt; has role 'button'</div>
+    <p>
+      <button onclick="changeRole (document.getElementById ('test'), 'checkbox')" type="button">Change Role</button>
+      <button onclick="window.location.reload()" type="button">Reload Page</button>
+    </p>
   </body>
-</html>
\ No newline at end of file
+</html>
--- a/ARIA/1.0/tests/test-files/author-requirements/568.html	Fri Aug 31 16:11:09 2012 -0400
+++ b/ARIA/1.0/tests/test-files/author-requirements/568.html	Fri Sep 07 15:56:57 2012 -0400
@@ -10,23 +10,24 @@
           if (parent) {
               parent.removeChild (element);
               var div = document.createElement ('div');
-              div.setAttribute ('role', 'checkbox');
+              div.setAttribute ('role', newRole);
               div.setAttribute ('id', 'test');
               div.setAttribute ('tabindex', '0');
               div.setAttribute ('onclick', 'changeRoleByRemoval (this, "checkbox");');
               div.setAttribute ('onkeydown', 'changeRoleByRemoval (this, "checkbox");');
               div.innerHTML = "This &lt;div&gt; has role '" + newRole + "'";
               parent.appendChild (div);
-              div.focus();
           }
       }
-      function doOnload() {
-          document.getElementById('test').focus();
-          window.setTimeout ("changeRoleByRemoval (document.getElementById('test'), 'checkbox')", 1000);
-      }
   </script>
   </head>
-  <body onload="doOnload();">
+  <body>
+    <div>
     <div role="button" id="test" tabindex="0" onclick="changeRoleByRemoval (this, 'checkbox');" onkeydown="changeRoleByRemoval (this, 'checkbox');">This &lt;div&gt; has role 'button'</div>
+    </div>
+    <p>
+      <button onclick="changeRoleByRemoval (document.getElementById ('test'), 'checkbox')" type="button">Change Role</button>
+      <button onclick="window.location.reload()" type="button">Reload Page</button>
+    </p>
   </body>
-</html>
\ No newline at end of file
+</html>