jenwachter
10/3/2015 - 5:15 PM

JavaScript library that logs the focused element when tabbing through a page. Helpful when working on the accessibility of a webpage. Requir

JavaScript library that logs the focused element when tabbing through a page. Helpful when working on the accessibility of a webpage. Requires jQuery.

$(function() {

  console.log("start tabbin'");

  $("body").on("keyup", function (e) {

    if (e.which === 9) {

      var focused = $(":focus");
      console.log(focused.html());

    }

  });

});