Skip to content

Instantly share code, notes, and snippets.

@mvsde
Last active August 10, 2023 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvsde/d339346e2c6b38ac37eaccd377cf7b20 to your computer and use it in GitHub Desktop.
Save mvsde/d339346e2c6b38ac37eaccd377cf7b20 to your computer and use it in GitHub Desktop.
Accessibility testing bookmarklets
javascript:(function(){
document.querySelectorAll(`link[rel="stylesheet"], style`).forEach((element) => element.remove());
document.querySelectorAll(`*`).forEach((element) => element.removeAttribute(`style`));
})();
javascript:(function(){
document.querySelectorAll(`details`).forEach((element) => element.open = true);
})();
javascript:(function(){
const element = document.createElement(`div`);
element.style.padding = `1rem`;
element.style.background = `black`;
element.style.color = `yellow`;
element.innerText = document.title;
document.body.prepend(element);
})();
javascript:(function(){
const timeout = prompt(`Show debugger in seconds`, 2);
setTimeout(function () { debugger }, timeout * 1000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment