Created
May 10, 2020 11:34
-
-
Save AndreasJacobsen/10ad9a79cf2ba744e9dfcae62b511984 to your computer and use it in GitHub Desktop.
Tab navigation HTML checker, this snippet prints the HTML for all elements reachable by the tab key.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkTabPress(e) { | |
if (e.keyCode === 9) { | |
console.log(e.target) | |
} | |
} | |
let body = document.querySelector('body'); | |
body.addEventListener('keyup', checkTabPress); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment