-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Audit doctype #5213
Comments
+9001 to this. It’s surprisingly common to still see web pages without one. |
Hey there @jakearchibald, are their some docs I can use to learn how to contribute a new audit to lighthouse? Would love to work on this one. Thanks! |
For this particular audit, you could just check if |
if there's a For this you're going to need a gatherer and an audit. Generally the gatherer will collect the information on the doctype from the browser and the audit will do the actual correctness testing. The PR for that audit (#3227) lays out pretty well how to get a gatherer and audit to work together, how to add to them to a config, unit tests needed, etc (though most of the SEO category stuff won't be necessary...it would just go into Best Practices in the default config). Let us know how things go! |
Thanks for all of the input everyone. I am going to dig into this. Will let you know should I run into any problems. |
@mathiasbynens @brendankenny Would this audit go inside |
I do not see the following file in the current codebase so, I am guessing a file such as this is no longer required? Because this line already exists https://github.com/GoogleChrome/lighthouse/pull/3227/files#diff-37b42887961ae2bfa58b7e227cf7a672R229 I probably do not need to add an entry in this file either? Thanks in advance. |
Yes, |
For |
Would it help if I opened a WIP PR so folks can see whether I am going in the right direction? @midzer |
@schalkneethling I have not implemented an audit for lighthouse yet, just a minor contribution. Would have to dig deep into this one as well, you've been first to answer this open issue. I think thats more a question to regular contributors/maintainers if they assist you in a WIP PR. |
@brendankenny Thoughts? |
@schalkneethling yeah go ahead and open up a PR and we can discuss impl details there :) |
Opened the PR: #5274 When running the test I get the following which to me suggests that what I am passing to
|
Recommend
<!DOCTYPE html>
to avoid quirks mode.https://developer.mozilla.org/en-US/docs/Glossary/Doctype
The text was updated successfully, but these errors were encountered: