Skip to content

Conversation

@brgibson
Copy link
Contributor

@brgibson brgibson commented Aug 7, 2025

Summary
This is a change (and proposal/discussion) to implement a consistent way to weight accessibility audits.

Describe the need for this change
As part of my ongoing tracking of lighthouse a11y scores, I've been noticing that occasionally, my scores fluctuate from 100 to 99 because of the aria-allowed-role audit.

When I look at the Deque documentation for this audit, I notice that is NOT tagged as part of wcag, but is only tagged as a Deque best-practice. Additionally, it is marked as User Impact: Minor.

You can see my proposal in my comments in the default-config.js:

image

I also want to call out the sections at the bottom that I have adjusted:

image

Callout: We may want to include a bit more wiggle room than the strict rules I have proposed. If that is the case, I think that too should be documented to help people understand why certain rules are weighted in one way vs another.

Related Issues/PRs
w3c/html-aria#543 is a proposal to adjust textarea elements to allow role="combobox."

It is related because this is what I am getting flagged for using. This is consistent with the approach that google uses for their main search box and from my testing it works well across browser and across screen reader.

@brgibson brgibson requested a review from a team as a code owner August 7, 2025 00:23
@brgibson brgibson requested review from connorjclark and removed request for a team August 7, 2025 00:23
@google-cla
Copy link

google-cla bot commented Aug 7, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@brgibson brgibson changed the title core(a11y): adjust weights and document a consistent approach to determining weights core(a11y): adjust weights and document approach Aug 7, 2025
@brgibson brgibson force-pushed the a11y-adjust-weights branch from 816c5e3 to 5c11b1c Compare August 7, 2025 06:57
@brgibson
Copy link
Contributor Author

Greetings @connorjclark. I'm sure you are busy, but I want to make sure this PR doesn't slowly fade into oblivion 😄

Let me know if there is anything I can do to answer any questions or help make reviewing these changes easier for you or your team.

@connorjclark
Copy link
Collaborator

connorjclark commented Aug 28, 2025

If I understand correctly: currently we weigh the a11y audits based on each axe rule's severity (that should be pretty consistent, but it's possible severity of some rules may have changed without us noticing). And your proposal is to additionally not score an audit if the severity is minor and merely a "best practice", ie. not in wcag (weight: 1 -> 0) – but otherwise, we treat "deque best practice rules" the same as rules backed by wcag. Is that correct?

If so, I think that would be a good change.

Could you help me understand the actual delta in audit weights? I'm having trouble telling by just looking at the diff.

We can't make scoring changes w/o a breaking release, but there will be one in October.

@brgibson
Copy link
Contributor Author

brgibson commented Aug 29, 2025

If I understand correctly: currently we weigh the a11y audits based on each axe rule's severity (that should be pretty consistent, but it's possible severity of some rules may have changed without us noticing). And your proposal is to additionally not score an audit if the severity is minor and merely a "best practice", ie. not in wcag (weight: 1 -> 0) – but otherwise, we treat "deque best practice rules" the same as rules backed by wcag. Is that correct?

@connorjclark Yes. Your summary is correct 👍

Could you help me understand the actual delta in audit weights? I'm having trouble telling by just looking at the diff.

We can't make scoring changes w/o a breaking release, but there will be one in October.

@connorjclark Agreed, this will affect scoring changes.

I've created a branch to make the default.js changes more readable. https://github.com/GoogleChrome/lighthouse/pull/16667/files.

For easier diffing It adjusts default.js by:

  • removing comments on (most) unchanged lines
  • removing the reordering of line items

I've also summarized the changes in this screenshot.

Please note, in the screenshot, I have also added an additional question. The TLDR is: What do you think about the values I have chosen for Deque 'best-practices' audits?

I'm open to suggestions, adjustments, and discussions. Many thanks for taking a look at this 🙇

simplified diff with annotations and an additional questions

@brgibson
Copy link
Contributor Author

brgibson commented Sep 5, 2025

Greetings @connorjclark, just wanted to make sure you saw my previous comment. Thanks!

@connorjclark
Copy link
Collaborator

connorjclark commented Sep 5, 2025

I think we should continue weighing best-practice checks that are not Minor. I want to keep deferring to Deque's expertise, but raising the bar a tiny bit to omit the minor ones feels alright to me.

Whether they are equal to the wcag one is a bit more subjective. I could see us down-shifting the rubric for best-practices (minor: 0, moderate: 1, Serious: 3, Critical: 7). I'll ask around internally.

Thanks for producing #16667. FYI, it there may be a few weeks until this is accepted, but I don't think we'll require any additional work from your end. Thanks for taking the time to make this proposal.

EDIT: @paulirish and I quickly settled on just doing what you have in your PR (minor + best-practices = 0), not the "down-shifting" thing I mentioned above. Had no strong reason to choose one over the other, so we preferred the smaller change.

@brgibson
Copy link
Contributor Author

@connorjclark sounds great. let me know if there is anything else you need from me and many thanks for taking the time to review 🙇

@connorjclark connorjclark changed the title core(a11y): adjust weights and document approach core(scoring): adjust a11y weights and document approach Sep 24, 2025
@connorjclark connorjclark merged commit 5d325d0 into GoogleChrome:main Sep 24, 2025
21 of 25 checks passed
@connorjclark
Copy link
Collaborator

Thanks Ben!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants