This is essentially the same request as https://github.com/pa11y/pa11y-ci/issues/143. That issue was closed by the OP since since a workaround worked for them however I think there is still a lot of value that could be gained from allowing only disabling certain rules for certain elements.
For example we have a page heading that is placed on top of an image background which triggers WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.BgImage. Due to certain design restrictions we can't change that so we'd like to ignore the warning but we don't want to disable the rule entirely and potentially miss instances of that rule violation in other places which we can change, and we also don't want to disable all rules for that specific element and any of it's children since we don't want to miss any other violations that element or it's children might create in the future.
This is essentially the same request as https://github.com/pa11y/pa11y-ci/issues/143. That issue was closed by the OP since since a workaround worked for them however I think there is still a lot of value that could be gained from allowing only disabling certain rules for certain elements.
For example we have a page heading that is placed on top of an image background which triggers
WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.BgImage
. Due to certain design restrictions we can't change that so we'd like to ignore the warning but we don't want to disable the rule entirely and potentially miss instances of that rule violation in other places which we can change, and we also don't want to disable all rules for that specific element and any of it's children since we don't want to miss any other violations that element or it's children might create in the future.