From 4ce5e974cfd705983c6af6c85f51b5ddbedaa12c Mon Sep 17 00:00:00 2001 From: Michael Friesenhahn Date: Thu, 8 Aug 2019 19:47:21 -0700 Subject: [PATCH 1/3] core(audits): Point PWA audit links to web.dev --- lighthouse-core/audits/content-width.js | 2 +- .../audits/installable-manifest.js | 2 +- .../audits/load-fast-enough-for-pwa.js | 2 +- .../audits/manual/pwa-cross-browser.js | 2 +- .../audits/manual/pwa-each-page-has-url.js | 2 +- .../audits/manual/pwa-page-transitions.js | 2 +- lighthouse-core/audits/offline-start-url.js | 2 +- lighthouse-core/audits/redirects-http.js | 2 +- lighthouse-core/audits/service-worker.js | 2 +- lighthouse-core/audits/splash-screen.js | 2 +- lighthouse-core/audits/themed-omnibox.js | 2 +- lighthouse-core/audits/viewport.js | 2 +- lighthouse-core/audits/without-javascript.js | 2 +- lighthouse-core/audits/works-offline.js | 2 +- lighthouse-core/lib/i18n/locales/en-US.json | 2 +- lighthouse-core/lib/i18n/locales/en-XL.json | 2 +- lighthouse-core/test/results/sample_v2.json | 28 +++++++++---------- proto/sample_v2_round_trip.json | 28 +++++++++---------- 18 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lighthouse-core/audits/content-width.js b/lighthouse-core/audits/content-width.js index 710a269f93e8..9cf66d6c7f84 100644 --- a/lighthouse-core/audits/content-width.js +++ b/lighthouse-core/audits/content-width.js @@ -18,7 +18,7 @@ class ContentWidth extends Audit { failureTitle: 'Content is not sized correctly for the viewport', description: 'If the width of your app\'s content doesn\'t match the width ' + 'of the viewport, your app might not be optimized for mobile screens. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', + '[Learn more](https://web.dev/content-width).', requiredArtifacts: ['ViewportDimensions', 'TestedAsMobileDevice'], }; } diff --git a/lighthouse-core/audits/installable-manifest.js b/lighthouse-core/audits/installable-manifest.js index 280f05d24094..a646445b5209 100644 --- a/lighthouse-core/audits/installable-manifest.js +++ b/lighthouse-core/audits/installable-manifest.js @@ -33,7 +33,7 @@ class InstallableManifest extends MultiCheckAudit { failureTitle: 'Web app manifest does not meet the installability requirements', description: 'Browsers can proactively prompt users to add your app to their homescreen, ' + 'which can lead to higher engagement. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).', + '[Learn more](https://web.dev/installable-manifest).', requiredArtifacts: ['URL', 'WebAppManifest'], }; } diff --git a/lighthouse-core/audits/load-fast-enough-for-pwa.js b/lighthouse-core/audits/load-fast-enough-for-pwa.js index 052cedcc2d23..5f98a5745f9a 100644 --- a/lighthouse-core/audits/load-fast-enough-for-pwa.js +++ b/lighthouse-core/audits/load-fast-enough-for-pwa.js @@ -27,7 +27,7 @@ const UIStrings = { /** Imperative title of a Lighthouse audit that tells the user that their page has loaded fast enough to be considered a Progressive Web App. This imperative title is shown to users when the web page has loaded too slowly to be considered a Progressive Web App. */ failureTitle: 'Page load is not fast enough on mobile networks', /** Description of a Lighthouse audit that tells the user *why* they need to load fast enough on mobile networks. 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: 'A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/fast-3g).', + description: 'A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://web.dev/load-fast-enough-for-pwa).', /** Label for the audit identifying the time it took for the page to become interactive. */ displayValueText: 'Interactive at {timeInMs, number, seconds}\xa0s', /** Label for the audit identifying the time it took for the page to become interactive on a mobile network. */ diff --git a/lighthouse-core/audits/manual/pwa-cross-browser.js b/lighthouse-core/audits/manual/pwa-cross-browser.js index b28bf97a5e1f..2516a674371b 100644 --- a/lighthouse-core/audits/manual/pwa-cross-browser.js +++ b/lighthouse-core/audits/manual/pwa-cross-browser.js @@ -20,7 +20,7 @@ class PWACrossBrowser extends ManualAudit { return Object.assign({ id: 'pwa-cross-browser', description: 'To reach the most number of users, sites should work across ' + - 'every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).', + 'every major browser. [Learn more](https://web.dev/pwa-cross-browser).', title: 'Site works cross-browser', }, super.partialMeta); } diff --git a/lighthouse-core/audits/manual/pwa-each-page-has-url.js b/lighthouse-core/audits/manual/pwa-each-page-has-url.js index 835cd8d06f19..d21472ad6712 100644 --- a/lighthouse-core/audits/manual/pwa-each-page-has-url.js +++ b/lighthouse-core/audits/manual/pwa-each-page-has-url.js @@ -19,7 +19,7 @@ class PWAEachPageHasURL extends ManualAudit { return Object.assign({ id: 'pwa-each-page-has-url', description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + - 'unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).', + 'unique for the purpose of shareability on social media. [Learn more](https://web.dev/pwa-each-page-has-url).', title: 'Each page has a URL', }, super.partialMeta); } diff --git a/lighthouse-core/audits/manual/pwa-page-transitions.js b/lighthouse-core/audits/manual/pwa-page-transitions.js index 10cbe7bdb099..2befb92e89a8 100644 --- a/lighthouse-core/audits/manual/pwa-page-transitions.js +++ b/lighthouse-core/audits/manual/pwa-page-transitions.js @@ -19,7 +19,7 @@ class PWAPageTransitions extends ManualAudit { return Object.assign({ id: 'pwa-page-transitions', description: 'Transitions should feel snappy as you tap around, even on a slow network, a ' + - 'key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).', + 'key to perceived performance. [Learn more](https://web.dev/pwa-page-transitions).', title: 'Page transitions don\'t feel like they block on the network', }, super.partialMeta); } diff --git a/lighthouse-core/audits/offline-start-url.js b/lighthouse-core/audits/offline-start-url.js index 72d4c2282c2c..364a984ba4c1 100644 --- a/lighthouse-core/audits/offline-start-url.js +++ b/lighthouse-core/audits/offline-start-url.js @@ -16,7 +16,7 @@ class OfflineStartUrl extends Audit { id: 'offline-start-url', title: 'start_url responds with a 200 when offline', failureTitle: 'start_url does not respond with a 200 when offline', - description: 'A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + description: 'A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://web.dev/offline-start-url).', requiredArtifacts: ['WebAppManifest', 'StartUrl'], }; } diff --git a/lighthouse-core/audits/redirects-http.js b/lighthouse-core/audits/redirects-http.js index 9162a18b0ce1..86c2cd27a7ce 100644 --- a/lighthouse-core/audits/redirects-http.js +++ b/lighthouse-core/audits/redirects-http.js @@ -17,7 +17,7 @@ class RedirectsHTTP extends Audit { title: 'Redirects HTTP traffic to HTTPS', failureTitle: 'Does not redirect HTTP traffic to HTTPS', description: 'If you\'ve already set up HTTPS, make sure that you redirect all HTTP ' + - 'traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).', + 'traffic to HTTPS. [Learn more](https://web.dev/redirects-http).', requiredArtifacts: ['HTTPRedirect'], }; } diff --git a/lighthouse-core/audits/service-worker.js b/lighthouse-core/audits/service-worker.js index f5518c93740c..20d8b241da9f 100644 --- a/lighthouse-core/audits/service-worker.js +++ b/lighthouse-core/audits/service-worker.js @@ -19,7 +19,7 @@ class ServiceWorker extends Audit { failureTitle: 'Does not register a service worker that controls page and start_url', description: 'The service worker is the technology that enables your app to use many ' + 'Progressive Web App features, such as offline, add to homescreen, and push ' + - 'notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).', + 'notifications. [Learn more](https://web.dev/service-worker).', requiredArtifacts: ['URL', 'ServiceWorker', 'WebAppManifest'], }; } diff --git a/lighthouse-core/audits/splash-screen.js b/lighthouse-core/audits/splash-screen.js index 7a4cc0af5020..bea786b06f6e 100644 --- a/lighthouse-core/audits/splash-screen.js +++ b/lighthouse-core/audits/splash-screen.js @@ -32,7 +32,7 @@ class SplashScreen extends MultiCheckAudit { failureTitle: 'Is not configured for a custom splash screen', description: 'A themed splash screen ensures a high-quality experience when ' + 'users launch your app from their homescreens. [Learn ' + - 'more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen).', + 'more](https://web.dev/splash-screen).', requiredArtifacts: ['WebAppManifest'], }; } diff --git a/lighthouse-core/audits/themed-omnibox.js b/lighthouse-core/audits/themed-omnibox.js index 6d2deca8f084..71a0389e6341 100644 --- a/lighthouse-core/audits/themed-omnibox.js +++ b/lighthouse-core/audits/themed-omnibox.js @@ -29,7 +29,7 @@ class ThemedOmnibox extends MultiCheckAudit { title: 'Sets an address-bar theme color', failureTitle: 'Does not set an address-bar theme color', description: 'The browser address bar can be themed to match your site. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).', + '[Learn more](https://web.dev/themed-omnibox).', requiredArtifacts: ['WebAppManifest', 'MetaElements'], }; } diff --git a/lighthouse-core/audits/viewport.js b/lighthouse-core/audits/viewport.js index 000e53eca32c..56ff01ca883a 100644 --- a/lighthouse-core/audits/viewport.js +++ b/lighthouse-core/audits/viewport.js @@ -19,7 +19,7 @@ class Viewport extends Audit { failureTitle: 'Does not have a `` tag with `width` ' + 'or `initial-scale`', description: 'Add a viewport meta tag to optimize your app for mobile screens. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).', + '[Learn more](https://web.dev/viewport).', requiredArtifacts: ['MetaElements'], }; } diff --git a/lighthouse-core/audits/without-javascript.js b/lighthouse-core/audits/without-javascript.js index acbcb51699de..ff8573d6a6fc 100644 --- a/lighthouse-core/audits/without-javascript.js +++ b/lighthouse-core/audits/without-javascript.js @@ -18,7 +18,7 @@ class WithoutJavaScript extends Audit { failureTitle: 'Does not provide fallback content when JavaScript is not available', description: 'Your app should display some content when JavaScript is disabled, even if ' + 'it\'s just a warning to the user that JavaScript is required to use the app. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).', + '[Learn more](https://web.dev/without-javascript).', requiredArtifacts: ['HTMLWithoutJavaScript'], }; } diff --git a/lighthouse-core/audits/works-offline.js b/lighthouse-core/audits/works-offline.js index 6d0f4446cff5..5b74427c1991 100644 --- a/lighthouse-core/audits/works-offline.js +++ b/lighthouse-core/audits/works-offline.js @@ -19,7 +19,7 @@ class WorksOffline extends Audit { failureTitle: 'Current page does not respond with a 200 when offline', description: 'If you\'re building a Progressive Web App, consider using a service worker ' + 'so that your app can work offline. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + '[Learn more](https://web.dev/works-offline).', requiredArtifacts: ['Offline', 'URL'], }; } diff --git a/lighthouse-core/lib/i18n/locales/en-US.json b/lighthouse-core/lib/i18n/locales/en-US.json index 7f65c17fd653..e45743851b89 100644 --- a/lighthouse-core/lib/i18n/locales/en-US.json +++ b/lighthouse-core/lib/i18n/locales/en-US.json @@ -708,7 +708,7 @@ "message": "Uses HTTPS" }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | description": { - "message": "A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/fast-3g)." + "message": "A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://web.dev/load-fast-enough-for-pwa)." }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | displayValueText": { "message": "Interactive at {timeInMs, number, seconds} s" diff --git a/lighthouse-core/lib/i18n/locales/en-XL.json b/lighthouse-core/lib/i18n/locales/en-XL.json index 4ff4399b076f..9bd619b4231e 100644 --- a/lighthouse-core/lib/i18n/locales/en-XL.json +++ b/lighthouse-core/lib/i18n/locales/en-XL.json @@ -708,7 +708,7 @@ "message": "Ûśêś ĤT́T̂ṔŜ" }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | description": { - "message": "Â f́âśt̂ ṕâǵê ĺôád̂ óv̂ér̂ á ĉél̂ĺûĺâŕ n̂ét̂ẃôŕk̂ én̂śûŕêś â ǵôód̂ ḿôb́îĺê úŝér̂ éx̂ṕêŕîén̂ćê. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/fast-3g)." + "message": "Â f́âśt̂ ṕâǵê ĺôád̂ óv̂ér̂ á ĉél̂ĺûĺâŕ n̂ét̂ẃôŕk̂ én̂śûŕêś â ǵôód̂ ḿôb́îĺê úŝér̂ éx̂ṕêŕîén̂ćê. [Ĺêár̂ń m̂ór̂é](https://web.dev/load-fast-enough-for-pwa)." }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | displayValueText": { "message": "Îńt̂ér̂áĉt́îv́ê át̂ {timeInMs, number, seconds} ś" diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 43998b04b85e..43bd5e1f03c0 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -37,21 +37,21 @@ "redirects-http": { "id": "redirects-http", "title": "Does not redirect HTTP traffic to HTTPS", - "description": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).", + "description": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://web.dev/redirects-http).", "score": 0, "scoreDisplayMode": "binary" }, "service-worker": { "id": "service-worker", "title": "Does not register a service worker that controls page and start_url", - "description": "The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).", + "description": "The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. [Learn more](https://web.dev/service-worker).", "score": 0, "scoreDisplayMode": "binary" }, "works-offline": { "id": "works-offline", "title": "Current page does not respond with a 200 when offline", - "description": "If you're building a Progressive Web App, consider using a service worker so that your app can work offline. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).", + "description": "If you're building a Progressive Web App, consider using a service worker so that your app can work offline. [Learn more](https://web.dev/works-offline).", "score": 0, "scoreDisplayMode": "binary", "warnings": [] @@ -59,7 +59,7 @@ "viewport": { "id": "viewport", "title": "Has a `` tag with `width` or `initial-scale`", - "description": "Add a viewport meta tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).", + "description": "Add a viewport meta tag to optimize your app for mobile screens. [Learn more](https://web.dev/viewport).", "score": 1, "scoreDisplayMode": "binary", "warnings": [] @@ -67,7 +67,7 @@ "without-javascript": { "id": "without-javascript", "title": "Contains some content when JavaScript is not available", - "description": "Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).", + "description": "Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. [Learn more](https://web.dev/without-javascript).", "score": 1, "scoreDisplayMode": "binary" }, @@ -92,7 +92,7 @@ "load-fast-enough-for-pwa": { "id": "load-fast-enough-for-pwa", "title": "Page load is fast enough on mobile networks", - "description": "A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/fast-3g).", + "description": "A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://web.dev/load-fast-enough-for-pwa).", "score": 1, "scoreDisplayMode": "binary", "numericValue": 4927.278 @@ -468,7 +468,7 @@ "installable-manifest": { "id": "installable-manifest", "title": "Web app manifest does not meet the installability requirements", - "description": "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).", + "description": "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://web.dev/installable-manifest).", "score": 0, "scoreDisplayMode": "binary", "explanation": "Failures: No manifest was fetched.", @@ -496,7 +496,7 @@ "splash-screen": { "id": "splash-screen", "title": "Is not configured for a custom splash screen", - "description": "A themed splash screen ensures a high-quality experience when users launch your app from their homescreens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen).", + "description": "A themed splash screen ensures a high-quality experience when users launch your app from their homescreens. [Learn more](https://web.dev/splash-screen).", "score": 0, "scoreDisplayMode": "binary", "explanation": "Failures: No manifest was fetched.", @@ -516,7 +516,7 @@ "themed-omnibox": { "id": "themed-omnibox", "title": "Does not set an address-bar theme color", - "description": "The browser address bar can be themed to match your site. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).", + "description": "The browser address bar can be themed to match your site. [Learn more](https://web.dev/themed-omnibox).", "score": 0, "scoreDisplayMode": "binary", "explanation": "Failures: No manifest was fetched,\nNo `` tag found.", @@ -538,7 +538,7 @@ "content-width": { "id": "content-width", "title": "Content is sized correctly for the viewport", - "description": "If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).", + "description": "If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. [Learn more](https://web.dev/content-width).", "score": 1, "scoreDisplayMode": "binary", "explanation": "" @@ -1286,7 +1286,7 @@ "offline-start-url": { "id": "offline-start-url", "title": "start_url does not respond with a 200 when offline", - "description": "A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).", + "description": "A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://web.dev/offline-start-url).", "score": 0, "scoreDisplayMode": "binary", "explanation": "No usable web app manifest found on page.", @@ -1527,21 +1527,21 @@ "pwa-cross-browser": { "id": "pwa-cross-browser", "title": "Site works cross-browser", - "description": "To reach the most number of users, sites should work across every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).", + "description": "To reach the most number of users, sites should work across every major browser. [Learn more](https://web.dev/pwa-cross-browser).", "score": null, "scoreDisplayMode": "manual" }, "pwa-page-transitions": { "id": "pwa-page-transitions", "title": "Page transitions don't feel like they block on the network", - "description": "Transitions should feel snappy as you tap around, even on a slow network, a key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).", + "description": "Transitions should feel snappy as you tap around, even on a slow network, a key to perceived performance. [Learn more](https://web.dev/pwa-page-transitions).", "score": null, "scoreDisplayMode": "manual" }, "pwa-each-page-has-url": { "id": "pwa-each-page-has-url", "title": "Each page has a URL", - "description": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).", + "description": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://web.dev/pwa-each-page-has-url).", "score": null, "scoreDisplayMode": "manual" }, diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index 56dc2663b7ae..047392f02282 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -225,7 +225,7 @@ "title": "Background and foreground colors do not have a sufficient contrast ratio." }, "content-width": { - "description": "If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).", + "description": "If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. [Learn more](https://web.dev/content-width).", "id": "content-width", "score": 1.0, "scoreDisplayMode": "binary", @@ -1021,7 +1021,7 @@ "title": "`` elements have `[alt]` text" }, "installable-manifest": { - "description": "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).", + "description": "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://web.dev/installable-manifest).", "details": { "items": [ { @@ -1271,7 +1271,7 @@ "title": "List items (`
  • `) are contained within `