dequelabs/axe-core

Expose a rule's `enabled` property in the official API

已關閉

#5,116 建立於 2026年5月24日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (783 個分叉)batch import
feathelp wanted

倉庫指標

星標
 (5,457 顆星)
PR 合併指標
 (平均合併 6天) (30 天內合併 21 個 PR)

描述

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.

貢獻者指南