Skip to content
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

core(audits): Point best practices audit links to web.dev #9538

Merged
merged 1 commit into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lighthouse-core/audits/deprecations.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
failureTitle: 'Uses deprecated APIs',
/** Description of a Lighthouse audit that tells the user why they should not use deprecated APIs on their page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Deprecated APIs will eventually be removed from the browser. ' +
'[Learn more](https://www.chromestatus.com/features#deprecated).',
'[Learn more](https://web.dev/deprecations).',
/** [ICU Syntax] Label for the audit identifying the number of warnings generated by using deprecated APIs. */
displayValue: `{itemCount, plural,
=1 {1 warning found}
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/dobetterweb/appcache-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const UIStrings = {
failureTitle: 'Uses Application Cache',
/** Description of a Lighthouse audit that tells the user why they should not use the Application Cache API. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Application Cache is deprecated. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/appcache).',
'[Learn more](https://web.dev/appcache-manifest).',
/**
* @description Label for the audit identifying uses of the Application Cache.
* @example {clock.appcache} AppCacheManifest
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-core/audits/dobetterweb/doctype.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const UIStrings = {
failureTitle: 'Page lacks the HTML doctype, thus triggering quirks-mode',
/** Description of a Lighthouse audit that tells the user why they should define an HTML doctype. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Specifying a doctype prevents the browser ' +
'from switching to quirks-mode. Read more on the ' +
'[MDN Web Docs page](https://developer.mozilla.org/en-US/docs/Glossary/Doctype)',
Copy link
Collaborator

Choose a reason for hiding this comment

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

man we're really not making good progress on getting rid of Learn more are we team 😆

(I think this is the right thing to do here @mfriesenhahn, just a bummer that we've been talking about following our own advice for a long time and it's sad to see one more convert to "Learn more")

'from switching to quirks-mode. ' +
'[Learn more](https://web.dev/doctype).',
Copy link
Member

Choose a reason for hiding this comment

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

This can probably fit with the line above.

/** Explanatory message stating that the document has no doctype. */
explanationNoDoctype: 'Document must contain a doctype',
/** Explanatory message stating that the publicId field is not empty. */
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/dobetterweb/dom-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const UIStrings = {
`depth < ${MAX_DOM_TREE_DEPTH} elements and fewer than ${MAX_DOM_TREE_WIDTH} ` +
'children/parent element. A large DOM can increase memory usage, cause longer ' +
'[style calculations](https://developers.google.com/web/fundamentals/performance/rendering/reduce-the-scope-and-complexity-of-style-calculations), ' +
Copy link
Member

Choose a reason for hiding this comment

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

Just curious if style calculations and layout reflows will be replaced sometime?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably! 😄

@addyosmani can probably give a better sense of the priority of those docs relative to other stuff in the perf section.

'and produce costly [layout reflows](https://developers.google.com/speed/articles/reflow). [Learn more](https://developers.google.com/web/tools/lighthouse/audits/dom-size).',
'and produce costly [layout reflows](https://developers.google.com/speed/articles/reflow). [Learn more](https://web.dev/dom-size).',
/** Table column header for the type of statistic. These statistics describe how big the DOM is (count of DOM elements, children, depth). */
columnStatistic: 'Statistic',
/** Table column header for the DOM element. Each DOM element is described with its HTML representation. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user why and how they should secure cross-origin links. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Add `rel="noopener"` or `rel="noreferrer"` to any external links to improve ' +
'performance and prevent security vulnerabilities. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/noopener).',
'[Learn more](https://web.dev/external-anchors-use-rel-noopener).',
Copy link
Collaborator

Choose a reason for hiding this comment

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

FWIW this doc just came up in #9531 about possibly needing some tweaks

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've added this comment to web.dev issue 1342 for tracking.

/**
* @description Warning that some links' destinations cannot be determined and therefore the audit cannot evaluate the link's safety.
* @example {<a target="_blank">} anchorHTML
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/dobetterweb/geolocation-on-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user why they should not ask for geolocation permissions on load. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Users are mistrustful of or confused by sites that request their ' +
'location without context. Consider tying the request to a user action instead. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/geolocation-on-load).',
'[Learn more](https://web.dev/geolocation-on-start).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/dobetterweb/js-libraries.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const UIStrings = {
/** Title of a Lighthouse audit that provides detail on the Javascript libraries that are used on the page. */
title: 'Detected JavaScript libraries',
/** Description of a Lighthouse audit that tells the user what this audit is detecting. This is displayed after a user expands the section to see more. No character length limits. */
description: 'All front-end JavaScript libraries detected on the page.',
description: 'All front-end JavaScript libraries detected on the page. [Learn more](https://web.dev/js-libraries).',
/** Label for a column in a data table; entries will be the version numbers of the detected Javascript libraries. */
columnVersion: 'Version',
};
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/dobetterweb/no-document-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user why they should avoid `document.write`. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'For users on slow connections, external scripts dynamically injected via ' +
'`document.write()` can delay page load by tens of seconds. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/document-write).',
'[Learn more](https://web.dev/no-document-write).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user why they should be concerned about the third party Javascript libraries that they use. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Some third-party scripts may contain known security vulnerabilities ' +
'that are easily identified and exploited by attackers. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/vulnerabilities).',
'[Learn more](https://web.dev/no-vulnerable-libraries).',
/** [ICU Syntax] Label for the audit identifying the number of vulnerable Javascript libraries found. */
displayValue: `{itemCount, plural,
=1 {1 vulnerability detected}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user why they should not ask for notification permission on load. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Users are mistrustful of or confused by sites that request to send ' +
'notifications without context. Consider tying the request to user gestures ' +
'instead. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/notifications-on-load).',
'instead. [Learn more](https://web.dev/notification-on-start).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const UIStrings = {
failureTitle: 'Prevents users to paste into password fields',
/** Description of a Lighthouse audit that tells the user why they should allow pasting of content into password fields. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Preventing password pasting undermines good security policy. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/password-pasting).',
'[Learn more](https://web.dev/password-inputs-can-be-pasted-into).',
/** Table column header for the HTML elements that do not allow pasting of content. */
columnFailingElem: 'Failing Elements',
};
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/dobetterweb/uses-http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
failureTitle: 'Does not use HTTP/2 for all of its resources',
/** Description of a Lighthouse audit that tells the user why they should use HTTP/2. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'HTTP/2 offers many benefits over HTTP/1.1, including binary headers, ' +
'multiplexing, and server push. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http2).',
'multiplexing, and server push. [Learn more](https://web.dev/uses-http2).',
/** [ICU Syntax] Label identifying the number of network requests that were not served with HTTP/2. */
displayValue: `{itemCount, plural,
=1 {1 request not served via HTTP/2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user why they should use passive event listeners on the page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Consider marking your touch and wheel event listeners as `passive` ' +
'to improve your page\'s scroll performance. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/passive-event-listeners).',
'[Learn more](https://web.dev/uses-passive-event-listeners).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
3 changes: 2 additions & 1 deletion lighthouse-core/audits/errors-in-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const UIStrings = {
failureTitle: 'Browser errors were logged to the console',
/** Description of a Lighthouse audit that tells the user why errors being logged to the devtools console are a cause for concern and so should be fixed. This is displayed after a user expands the section to see more. No character length limits. */
description: 'Errors logged to the console indicate unresolved problems. ' +
'They can come from network request failures and other browser concerns.',
'They can come from network request failures and other browser concerns. ' +
'[Learn more](https://web.dev/errors-in-console)',
/** Label for a column in a data table; entries in the column will be the descriptions of logged browser errors. */
columnDesc: 'Description',
};
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/image-aspect-ratio.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
failureTitle: 'Displays images with incorrect aspect ratio',
/** Description of a Lighthouse audit that tells the user why they should maintain the correct aspect ratios for all images. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Image display dimensions should match natural aspect ratio. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/aspect-ratio).',
'[Learn more](https://web.dev/image-aspect-ratio).',
/**
* @description Warning that the size information for an image was nonsensical.
* @example {https://image.cdn.com/} url
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/is-on-https.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const UIStrings = {
'sensitive data. HTTPS prevents intruders from tampering with or passively listening ' +
'in on the communications between your app and your users, and is a prerequisite for ' +
'HTTP/2 and many new web platform APIs. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).',
'[Learn more](https://web.dev/is-on-https).',
/** [ICU Syntax] Label identifying the number of insecure network requests found by an audit of a web page. */
displayValue: `{itemCount, plural,
=1 {1 insecure request found}
Expand Down
Loading