Expose a rule's `enabled` property in the official API · Issue #5116 · dequelabs/axe-core · GitHub
Skip to content

Expose a rule's enabled property in the official API #5116

Closed

Description

@pomerantsev

Product

axe-core

Feature Description

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

  1. added
    featNew feature or enhancement
    ungroomedTicket needs a maintainer to prioritize and label
    on May 24, 2026
  2. WilcoFiers commented on May 25, 2026

    @WilcoFiers
    Contributor

    @pomerantsev I think adding enabled to getRules is 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 all axe._ properties.

  3. added
    help wantedWe welcome PRs or discussions for issues marked as help wanted
    and removed
    ungroomedTicket needs a maintainer to prioritize and label
    on May 25, 2026
  4. pomerantsev commented on May 25, 2026

    @pomerantsev
    ContributorAuthor

    Thanks @WilcoFiers, I'll give it a try.

  5. added a commit that references this issue on May 27, 2026
    9c8760c
  6. added a commit that references this issue on May 29, 2026
    75bf772
  7. added a commit that references this issue on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or enhancementhelp wantedWe welcome PRs or discussions for issues marked as help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions