pa11y / pa11y-ci

Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
https://pa11y.org
GNU Lesser General Public License v3.0
515 stars 63 forks source link

Ignore specific rule for specific elements #143

Closed stephanietuerk closed 3 years ago

stephanietuerk commented 3 years ago

I am aware of how you can ignore specific rules (https://github.com/pa11y/pa11y-ci/issues/60), but is there a way to ignore a specific rule only for specific elements?

My case is the following: I have one instance of text <p> that is repeated 10 times on my page and I'd like to not check color contrast on this one piece of text. The repetition occurs via the repetition of the component it is in, and the component contains other text/elements that I do want checked.

Any solutions to turning it off just for that one element?

stephanietuerk commented 3 years ago

https://github.com/pa11y/pa11y#hideelements-string

this seems to take care of it; closing