Difference between revisions of "Event Watcher"

From Level Access Web Labs
Jump to navigation Jump to search
m
 
(10 intermediate revisions by 2 users not shown)
Line 23: Line 23:
 
           var c = e.keyCode ? e.keyCode : "";
 
           var c = e.keyCode ? e.keyCode : "";
 
           var d = document.createElement("div");
 
           var d = document.createElement("div");
           var t = document.createTextNode(evt.type+" " + evt.target + " " + c);
+
          var k = "";
 +
          if (c) {
 +
            k = "(" + keyCode(c) + ")";
 +
          }
 +
           var t = document.createTextNode(evt.type+" " + evt.target + " " + c + " " + k);
 
           d.appendChild(t);
 
           d.appendChild(t);
 
           var log1 = document.getElementById("log1");
 
           var log1 = document.getElementById("log1");
Line 40: Line 44:
  
 
       function setup() {
 
       function setup() {
var elements = ['s1','i1','b1','a1','d1','d2','d3','d4'];
+
var elements = ['s1','i1','b1','a1','d1','d2','d3','d4','r1','c1'];
 
var el;
 
var el;
  
Line 82: Line 86:
 
     <button onfocus="test(event);" id="b1"> Do nothing </button>
 
     <button onfocus="test(event);" id="b1"> Do nothing </button>
  
     <a aria-label="SSB" tabindex="0" href="#a1" id="a1">SSB </a>
+
     <a aria-label="Level Access" tabindex="0" href="#a1" id="a1">Level Access</a>
 +
    <label><input type="checkbox" id="c1" >Order now!</label>
 
     <div id="d1" tabindex="0" onclick="goSomewhere();" > div area with tabindex </div>
 
     <div id="d1" tabindex="0" onclick="goSomewhere();" > div area with tabindex </div>
 
     <div id="d2" onclick="goSomewhere();" > div area with no tabindex </div>
 
     <div id="d2" onclick="goSomewhere();" > div area with no tabindex </div>
 
     <div id="d3" onclick="goSomewhere();" >  
 
     <div id="d3" onclick="goSomewhere();" >  
 
     <div id="d4" >div area with no tabindex and delegate </div>
 
     <div id="d4" >div area with no tabindex and delegate </div>
 +
    <input type="radio" id="r1"> <span>Unlabeled radio button</span>
 
     </div>
 
     </div>
 
   <h3>Log area</h3>
 
   <h3>Log area</h3>
Line 92: Line 98:
 
       </div>
 
       </div>
 
     <button onclick="setup();"> start</button>
 
     <button onclick="setup();"> start</button>
 +
    <script type="text/javascript">
 +
        module = [];
 +
    </script>
 +
    <script type="text/javascript" src="https://unpkg.com/keycode">
 
  </body>
 
  </body>
 
</html>
 
</html>
 
[[Category:Techniques]]
 
[[Category:Techniques]]

Latest revision as of 17:49, 28 September 2021

Move through the fields below and watch the events that are sent by the browser. For example, use with AT to find out what events are being fired.

  • onfocus, onblur, onclick, ondbclik, onmouseup, onmousedown, onmouseover
  • onkeypress, onkeydown, onkeyup, touchstart, touchend, touchmove, touchcancel

Event types and their target object will be displayed in the section below. Raw event objects will also be logged to the browser console, and may be reviewed with the developer tools.

Level Access
div area with tabindex
div area with no tabindex
div area with no tabindex and delegate
Unlabeled radio button

Log area