core(config): Re-weight a11y scores based on severity and frequency #3515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a stab at re-weighting the a11y tests, accounting for severity and frequency. This isn't a super scientific process but I'll try to explain my methodology.
For each weight I tried to consider two factors:
Because we don't have the ability to identify non-applicable tests yet, it means that there are some items which are uncommon but should be fatal. For example, a video without captions is pretty bad and should really sting, but if we weigh it too heavily, it's like an automatic free 10 points to the 99.9% of sites which don't use
<video>
. In these cases I had to stick to a middle-of-the-road weight so they still hurt if they actually occur, but they also don't give too much of a free boost to everybody else. Fixing dequelabs/axe-core#473 will help a lot here.I tested the new weights against 3 sites. I don't want to publicly shame anyone here so I'll just call them "Good site", "OK site", and "Bad site". Here's a before and after of their scores:
New weights are as follows: