Difference between revisions of "Random Testing RJ"

From Level Access Web Labs
Jump to navigation Jump to search
Line 8: Line 8:
 
   document.getElementById("myAnchor").blur();
 
   document.getElementById("myAnchor").blur();
 
}
 
}
 
    function realNextSibling(obj) {
 
        if (obj.nextSibling) {
 
          if (obj.nextSibling.nodeType == 3) {
 
            return obj.nextSibling.nextSibling
 
          }
 
        }
 
        return obj.nextSibling;
 
      }
 
 
      function realPreviousSibling(obj) {
 
        if (obj.previousSibling) {
 
          if (obj.previousSibling.nodeType == 3) {
 
            return obj.previousSibling.previousSibling
 
          }
 
        }
 
        return obj.previousSibling;
 
      }
 
 
      function change(e) {
 
        var evt = e ? e : window.event;
 
        var set = document.getElementsByClassName("accbutton");
 
        var index=-1;
 
 
        // find the index of the current accordion header (button)
 
        for (var i = 0; i < set.length; i++) {
 
          if (set[i].id == e.target.id)
 
    var index = i;
 
  }
 
 
        if (e.which == 38 || e.which == 37 || e.which ==33) {  // up, left, pageUP
 
          index--;
 
          if (index < 0) {
 
            index = set.length-1;
 
          }
 
          // page up also toggles
 
          //if (e.which ==33)
 
          //    toggle((set[index]), true);
 
 
          set[index].focus();
 
        }
 
 
        else if (e.which == 40 || e.which ==39 || e.which ==34) { // right, down, pageDN
 
          index++;
 
          if (index >= set.length)
 
            index = 0;
 
          // page down also toggles
 
        //  if (e.which ==34)
 
        //      toggle((set[index]),true);
 
 
          set[index].focus();
 
        }
 
 
        // home
 
else if (e.which == 36) {
 
          set[0].focus();
 
}
 
 
        // end
 
else if (e.which == 35) {
 
          set[set.length-1].focus();
 
}
 
 
      }
 
 
      function toggle(obj,alwaysopen) {
 
        var alwaysopen = (typeof alwaysopen === "undefined") ? false : alwaysopen;
 
 
        if (obj.getAttribute("aria-expanded") == "false" || alwaysopen) {
 
        obj.setAttribute("aria-expanded","true");
 
if (obj.getAttribute("data-invalidmarkup") == "true") {
 
document.getElementById("r4").removeAttribute("hidden");
 
} else {
 
        realNextSibling(obj).removeAttribute("hidden");
 
}
 
        }
 
        else if (obj.getAttribute("aria-expanded") == "true" ) {
 
        obj.setAttribute("aria-expanded","false");
 
if (obj.getAttribute("data-invalidmarkup") == "true") {
 
document.getElementById("r4").removeAttribute("hidden");
 
} else {
 
        realNextSibling(obj).setAttribute("hidden","hidden");
 
}
 
        }
 
      }
 
  
 
</script>
 
</script>
Line 143: Line 58:
 
</section></div>
 
</section></div>
 
--DELETE ME <br><br>
 
--DELETE ME <br><br>
 
 
-- Delete Me <br><br>
 
      <div id="container">
 
      <div>
 
        <button class="accbutton" id="b1" onkeydown="change(event);" aria-expanded="true" aria-controls="r1" onclick="toggle(this);">Web Accessibility</button>
 
        <div class="panel" role="region" id="r1" aria-labelledby="b1">
 
          <div><a href="https://amp.ssbbartgroup.com/public/standards/view_violations.php?media_type_id=9">Structure</a></div>
 
          <div><a href="https://amp.ssbbartgroup.com/public/standards/view_violations.php?media_type_id=4">Forms</a></div>
 
          <div><a href="https://amp.ssbbartgroup.com/public/standards/view_violations.php?media_type_id=10">Color and Contrast</a></div>
 
        <div><label>Search</label> <input type="text"/> </div>
 
        </div>
 
      </div>
 
      <div>
 
     
 
      </div>
 
 
--Delete Me <br><br>
 
 
         <h3>div container with style="display: table-cell" and role of region</h3>
 
         <h3>div container with style="display: table-cell" and role of region</h3>
 
         <div style="display: table-cell" role="region" aria-label="test">
 
         <div style="display: table-cell" role="region" aria-label="test">

Revision as of 19:11, 1 February 2019

-DELETE ME--

--DELETE ME

div container with style="display: table-cell" and role of region

Hello world
Goodbye World

div container with style="display: table-cell"

Hello world
Goodbye World

div container with style="display:table" and role of region

Hello world
Goodbye World


JavaScript Focus

The following errors has occurred
Error Number 1
Error Number 2

Notes

Random Testing - Not accessible examples

Test Results

What are the test results?