Skip to content

Conversation

@connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented Feb 10, 2021

  1. rebaseline the accessibility sample artifact
  2. upgrade to 4.1.2

Do not squash.

@connorjclark connorjclark requested a review from a team as a code owner February 10, 2021 18:40
@connorjclark connorjclark requested review from patrickhulce and removed request for a team February 10, 2021 18:40
@google-cla google-cla bot added the cla: yes label Feb 10, 2021
{
"impact": "critical",
"html": "<img src=\"blob:http://localhost:10200/54001a08-60c6-4ea1-aeec-ca1831fd81f1\">",
"html": "<img src=\"blob:http://localhost:10200/65381135-47e9-4deb-9f84-bfc18dbf2534\">",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These urls are random for each run.

Still glad to have done the rebaseline by itself, otherwise it wouldn't be clear that there is no difference in this version from 4.1.1.

],
"Accessibility": {
"violations": [
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking this went away because the smoke test page has since been "fixed" of a color contrast issue. Or maybe the axe violation check was modified since last time this ran.

Do we want to resolve this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given it was a consequence of us rebaselining and not of this version bump, I'm not concerned. IMO, the goal here of sample artifacts is to test at least some of the axe-audits and it's not particularly important which ones get exercised.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is still failing on stable but not in Canary. Looks like the root cause is the text color styling via /deep/ but that not being supported anymore:

body /deep/ div {
color: pink; /* FAIL - deprecation warning */
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! Do you agree it's not a blocker here @brendankenny ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We should probably update at some point just because that /deep/ does nothing (I think we also previously removed the deprecation notice it used to generate because Chrome doesn't even bother anymore), but agreed that's more a smoke test thing, not the purpose of the sample artifacts/sample_v2

"id": "aria-progressbar-name",
"title": "ARIA `progressbar` elements have accessible names",
"description": "When an element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).",
"score": 1,
Copy link
Collaborator Author

@connorjclark connorjclark Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems these were trivially passing w/ score 1 because aria-progressbar-name check was never found in the axe results, so when LH sees that it just spits out score: 1. https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/accessibility/axe-audit.js#L101

side note: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/accessibility/axe-audit.js#L37 why is score 1 if this is marked n/a? Shouldn't we do null, because that's what the audit result will end up being anyway?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra explanation: I scratched my head for a second, but in order for us to mark as notApplicable if the audit isn't "informative" we need to explicitly find it in axe's inapplicable set.

why is score 1 if this is marked n/a? Shouldn't we do null, because that's what the audit result will end up being anyway?

Yeah we should. My guess is that while authoring "not applicable" feels closest to "this is passing, don't worry about it" and then 1 gets used.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM though we're both operating on the same source of advice here :)

],
"Accessibility": {
"violations": [
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given it was a consequence of us rebaselining and not of this version bump, I'm not concerned. IMO, the goal here of sample artifacts is to test at least some of the axe-audits and it's not particularly important which ones get exercised.

"id": "aria-progressbar-name",
"title": "ARIA `progressbar` elements have accessible names",
"description": "When an element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).",
"score": 1,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra explanation: I scratched my head for a second, but in order for us to mark as notApplicable if the audit isn't "informative" we need to explicitly find it in axe's inapplicable set.

why is score 1 if this is marked n/a? Shouldn't we do null, because that's what the audit result will end up being anyway?

Yeah we should. My guess is that while authoring "not applicable" feels closest to "this is passing, don't worry about it" and then 1 gets used.

/** @type {import('axe-core/axe')} */
// @ts-expect-error axe defined by axeLibSource
const axe = window.axe;
axe.configure({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dylanb is this correct?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


/** @param {import('axe-core/axe').Result} result */
const augmentAxeNodes = result => {
result.helpUrl = result.helpUrl.replace(application, 'lighthouse');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 carrying this uid to the url seemed odd. good call.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we use helpUrl anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems we don't even use this field but w.e.

// Augment the node objects with outerHTML snippet & custom path string
axeResults.violations.forEach(augmentAxeNodes);
axeResults.incomplete.forEach(augmentAxeNodes);
axeResults.inapplicable.forEach(augmentAxeNodes);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed now? if something's inapplicable, it shouldn't have any nodes at all or it would be applicable...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

help url change. Didn't want to recreate the looping stuff for just that.

application,
},
// @ts-ignore
noHtml: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is fine since Accessibility isn't in our PublicGathererArtifacts, but we also ship back our snippets which except for eliding are the same thing verbatim, so we aren't exactly creating Fort Knox over here :)

@brendankenny
Copy link
Contributor

brendankenny commented Feb 10, 2021

Do not squash.

is this a description of what you did or a request? (just noticed the force pushes which you usually don't do :)

@connorjclark
Copy link
Collaborator Author

Don't want to squash the PR, the first commit is just a rebaseline and the second is the actual upgrade.

@brendankenny
Copy link
Contributor

Don't want to squash the PR, the first commit is just a rebaseline and the second is the actual upgrade.

Is there a reason this change is different than usual? We rebaseline artifacts at the same time as updating gatherers lots of times, often when the artifact is hilariously out of date. My vote is don't open the pandoras box for different merge workflows (changes can always go in separate PRs if it's helpful to separate, and smaller PRs are always a bonus :)

@connorjclark
Copy link
Collaborator Author

Don't want to squash the PR, the first commit is just a rebaseline and the second is the actual upgrade.

Is there a reason this change is different than usual? We rebaseline artifacts at the same time as updating gatherers lots of times, often when the artifact is hilariously out of date. My vote is don't open the pandoras box for different merge workflows (changes can always go in separate PRs if it's helpful to separate, and smaller PRs are always a bonus :)

#12075 (comment)

This workflow is equivalent to me doing a PR (upgrade axe) on top of the first PR (rebaseline) and waiting for both to land in sequence, except it's simpler to update this way imo. Reviewer can separate the diffs themselves in the commit selector.

I don't do this often, I know @patrickhulce does sometimes, I've never found it problematic wrt reviewing.

@brendankenny
Copy link
Contributor

This workflow is equivalent to me doing a PR (upgrade axe) on top of the first PR (rebaseline) and waiting for both to land in sequence, except it's simpler to update this way imo. Reviewer can separate the diffs themselves in the commit selector.

And a squashed commit is equivalent to updating axe and running yarn update:sample-artifacts afterwards :P We didn't even update the artifacts for 4.1.1, so clearly not that important to us.

Landing separate commits for preserving people's work (e.g. they do the majority of a PR but can't finish it) or preserving git but otherwise keeping it simple seems worth it.

Just my opinion. The PR is R: @patrickhulce.

@patrickhulce
Copy link
Collaborator

re: squash

  • The split commits were very nice for reviewing initially, this to me was the primary benefit of the split
  • I mostly agree that I don't see a huge benefit to keeping them separate after landing. I mean who knows maybe there's a world in which we want to come back and check whether a particular artifact change was due to 4.1.2 or 4.1.1? Going into repo settings and re-enabling rebase and merge just for this PR and then turning it off again feels a bit like overkill for this benefit, IMO, but if someone with the power to actually change those settings agrees its worth it, I'm fine with it :)
  • I don't really think either way is worth a large amount of discussion. Up to whoever has the power to change those repo settings to be convinced by what's already here if it lands rebased or squashed. Sound good?

@connorjclark connorjclark merged commit f9f799c into master Feb 11, 2021
@connorjclark connorjclark deleted the up-axe branch February 11, 2021 19:06
paulirish pushed a commit that referenced this pull request Mar 23, 2021
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.

6 participants