-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "impact" field to rules #2644
Comments
Interesting suggestion. Right now a rules impact is determined at run time by looking through each of its checks and getting the highest impact, so it's not something we could manually add to the rules json file. And since rules and checks can be configured by the user, it's not something we could hard-code either. |
Ah, I hadn't realized that. We could reference the checks of each rule then. Would it be accurate-enough to consider the impact of a rule by using all the checks listed in a rule's |
Not sure on the weighting part, but if you were to scan the rule file and get all it's checks, then scan each check JSON file looking at the impact, you could probably deduce the final impact and assign a weight to it. |
It's not the cleanest of code, but here's where we generate a rules impact for the rule description doc. You could probably do something similar to get the final impact level https://github.com/dequelabs/axe-core/blob/develop/build/configure.js#L238-L263 |
The
doc/rule-descriptions.md
file marks each rule's impact. It'd be nice if this was also represented in thelib/rules
json files. Lighthouse already usesaxe-core
's impact /tags
to determine how to weigh each rule, and we're looking to automate it with a script to make it more concrete, so I figure this field would be a big help.The text was updated successfully, but these errors were encountered: