You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose a rule's enabled property in the official API #5116
To my knowledge, there's currently no official way to get the list of rules that are enabled when axe.run() is called with no options.
There's an axe.getRules() method, but that returns all rules, including the ones that are disabled by default.
There is an undocumented way to get such a list today (axe._audit.rules.filter(rule => rule.enabled)).
It would be great to expose the ability to filter rules by whether they're enabled as part of the official API, for example by adding the enabled key to the rule objects returned by axe.getRules(), or by introducing a new method.
Activity
WilcoFiers commentedon May 25, 2026
@pomerantsev I think adding
enabledtogetRulesis an excellent idea. Would you be up for opening a pull request?As for
axe._audit. I'd strongly advice against that. We are at some point going to remove allaxe._properties.pomerantsev commentedon May 25, 2026
Thanks @WilcoFiers, I'll give it a try.
feat(getRules): include rule enabled state in returned objects
feat(getRules): include rule enabled state in returned objects (#5118)
chore(release): v4.12.0 (#5122)