jdan / tota11y

an accessibility (a11y) visualization toolkit
http://khan.github.io/tota11y/
MIT License
5.04k stars 279 forks source link

Provide the ability to ignore/exclude custom elements #186

Open codebymikey opened 3 years ago

codebymikey commented 3 years ago

It should be possible to exclude certain elements from the audit. We already have this:

https://github.com/Khan/tota11y/blob/eb44df56719a27e2a727005e0c69d88f91204e4c/plugins/shared/audit.js#L15-L22

We can add a default utility selector like .tota11y-ignore to exclude those elements similar to how Google Translate's notranslate class works.

It should however also be possible to provide custom CSS selectors if the library user would rather not or is unable to modify the DOM elements.