-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
new_audit(crawlable-anchors): adds an anchor-href audit #10662
new_audit(crawlable-anchors): adds an anchor-href audit #10662
Conversation
thanks for the PR! couple of quickfire comments (leaving the full review to shane):
We recently moved the proto roundtrip to happen entirely in CI. #10557 . You still need to do Since you modified a gather, you will also need to update All of our audits have a web.dev article linked in the description. I don't know what the turnaround time for that might be, but we shouldn't request it of @kaycebasques until we're good with the audit. Maybe there's good alternative we can use in the meantime, do you know of any? Can you provide screenshots in the original comment? |
e7f82f8
to
52b666c
Compare
e0ad667
to
1a3fa4c
Compare
Thanks for explaining @connorjclark. Curious why we should discard the other changes, but in the end I did For the web.dev article, here's a quick draft text which could be a starting point. There are also these existing pages:
Screenshots added in the original comment Would be cool to see this working in DevTools, wondering if there are any tips for getting a local version of Lighthouse integrated with chrome/chromium during development |
Avoid churn, keep
Cool! Seems like we can block this PR on that new article being published, shouldn't be much of a delay.
#10241 mentions that there are some necessary changes in Chromium for 6.0 to work as intended. Probably should still work enough to test things out. assuming you have a local build of chromium, you run doc for chromium devtools: https://docs.google.com/document/d/1WNF-KqRSzPLUUfZqQG5AFeU_Ll8TfWYcJasa_XGf7ro/edit#heading=h.xz439gqj1lwr I think it may be possible these days to use a release build of Chromium, pass a flag to it pointing to a development build of the devtools–skipping the burden of building Chromium. |
Should maybe be named something more specific like Also it would be good to try to address the questions brought up at the end of #10590 (comment)
From the fail examples, it seems like a lot of sites are going to get a lot of hits on this :) How much would fixing them help the site? It seems like if it's trivial to switch a js-only "anchor" that behaves like a real anchor to a real anchor (possibly augmented with js) it's worth it so search engines better know the connections, but OTOH if a site is (ab)using anchors for more button-like things, the ROI for them to fix might be really low and this will come off more as nagging for Lighthouse users. |
Hey @patrickhulce thanks again for the tips, messages are updated.
Unless I'm mistaken on what the DBW tester is, I think because this is around SEO, it should go into the SEO smoke tests? Anyway have done that (smoke tests in the SEO section) for now, but happy to move them elsewhere if that's better. Kept the smokes a little light to adhere to the testing pyramid. I think the unit tests cover a good amount. That being said the |
Sure even better :) I think there's still a little bleed over from before the SEO were split out, but good call 👍 |
So good @umaar , great job! My mouse was literally hovering over the approve button, but then I decided to try one more site and I have now waffled on one minor point. I'm sorry 😞 I know I said we should look at click handler when you asked if we should ignore I think we should ignore
Hopefully this is just 2 lines for exposure, 1 line for the audit check and a few lines for the test and we're done if you agree :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉 awesome job @umaar! 👍
Hey thanks for being so thorough with this PR @patrickhulce . I think you're right, it's better to be flexible and help users see the value in this audit, rather than it turning into an audit which gets habitually ignored. And it's really nice how you take time to explain + justify each suggestion, it means I get to understand the reasoning behind things and learn a new perspective! @AVGP we now have a well defined list of fail criteria. Following this web.dev template, shall I make a PR documenting exactly when this audit will fail? E.g., referring to the |
@connorjclark I'm curious what your take on the commit message would've been here for a new audit where the score is basically repeating the message :) |
Hey, still have more work to do here but thought the general approach could be sanity checked in the meantime. I guess things to check here:
anchorHref
property from the anchor elements gatherer?Quick q around the tests, typically for a new audit we have a unit test for the gatherer + audit, update the jest snapshots, then run a
yarn update:sample-json
? Does the protobuf stuff come into play here, as in wouldyarn compile-proto && yarn build-proto-roundtrip
be needed also? I also see an Updating fixture dumps doc and ayarn update:sample-artifacts
command.I think it'd be cool to have a doc like, "you added/removed an audit, here's what you need to update" (that may exist somewhere and I've missed it though!)
Screenshots:
Run with
./lighthouse-cli/index.js --view --only-audits=crawlable-anchors http://example.com
Related issue: #10590