Skip to content

Instantly share code, notes, and snippets.

@patrickfox
Last active April 29, 2020 21:27
Show Gist options
  • Save patrickfox/a2f632689c7bdf3f640d66a5b16b4d24 to your computer and use it in GitHub Desktop.
Save patrickfox/a2f632689c7bdf3f640d66a5b16b4d24 to your computer and use it in GitHub Desktop.
Accessibility Testing Snippets

Log All aria-label

javascript:(function(){let l=document.all;for(let t=0,e=l.length;t<e;t++){let e=l[t].getAttribute("aria-label");e&&console.log(e)}})();

Wish List

  • Verify all ID refs for:
    • aria-labelledby
    • aria-describedby
  • Identify all tabindex
  • Identify all tabindex w/values > 0
  • Identify all aria-live and live role elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment