From db5205182732568373d08585e0aec3f8c2e9d284 Mon Sep 17 00:00:00 2001 From: Patrick Hulce Date: Mon, 14 May 2018 10:00:07 -0700 Subject: [PATCH] core(lhr): audit id, title, description (#5190) --- lighthouse-core/audits/audit.js | 9 +- .../report/html/renderer/category-renderer.js | 6 +- .../renderer/performance-category-renderer.js | 14 +- .../report/html/renderer/report-renderer.js | 4 +- lighthouse-core/report/report-generator.js | 2 +- lighthouse-core/runner.js | 4 +- lighthouse-core/test/audits/audit-test.js | 2 +- .../html/renderer/category-renderer-test.js | 12 +- lighthouse-core/test/results/sample_v2.json | 960 +++++++++--------- lighthouse-core/test/runner-test.js | 4 +- typings/audit.d.ts | 6 +- 11 files changed, 512 insertions(+), 511 deletions(-) diff --git a/lighthouse-core/audits/audit.js b/lighthouse-core/audits/audit.js index ccfd6783d2a5..a7331faddee9 100644 --- a/lighthouse-core/audits/audit.js +++ b/lighthouse-core/audits/audit.js @@ -184,7 +184,12 @@ class Audit { } return { + id: audit.meta.name, + title: auditDescription, + description: audit.meta.helpText, + score, + scoreDisplayMode, rawValue: result.rawValue, displayValue: result.displayValue, @@ -192,10 +197,6 @@ class Audit { errorMessage: result.errorMessage, warnings: result.warnings, - scoreDisplayMode, - name: audit.meta.name, - description: auditDescription, - helpText: audit.meta.helpText, details: result.details, }; } diff --git a/lighthouse-core/report/html/renderer/category-renderer.js b/lighthouse-core/report/html/renderer/category-renderer.js index 0796b7c12460..84d1cbac90ad 100644 --- a/lighthouse-core/report/html/renderer/category-renderer.js +++ b/lighthouse-core/report/html/renderer/category-renderer.js @@ -31,7 +31,7 @@ class CategoryRenderer { renderAudit(audit, index) { const tmpl = this.dom.cloneTemplate('#tmpl-lh-audit', this.templateContext); const auditEl = this.dom.find('.lh-audit', tmpl); - auditEl.id = audit.result.name; + auditEl.id = audit.result.id; const scoreDisplayMode = audit.result.scoreDisplayMode; if (audit.result.displayValue) { @@ -40,9 +40,9 @@ class CategoryRenderer { } const titleEl = this.dom.find('.lh-audit__title', auditEl); - titleEl.appendChild(this.dom.convertMarkdownCodeSnippets(audit.result.description)); + titleEl.appendChild(this.dom.convertMarkdownCodeSnippets(audit.result.title)); this.dom.find('.lh-audit__description', auditEl) - .appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText)); + .appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.description)); // Append audit details to header section so the entire audit is within a
. const header = /** @type {!HTMLDetailsElement} */ (this.dom.find('details', auditEl)); diff --git a/lighthouse-core/report/html/renderer/performance-category-renderer.js b/lighthouse-core/report/html/renderer/performance-category-renderer.js index 02cde575881c..ad55a4677df4 100644 --- a/lighthouse-core/report/html/renderer/performance-category-renderer.js +++ b/lighthouse-core/report/html/renderer/performance-category-renderer.js @@ -15,18 +15,18 @@ class PerformanceCategoryRenderer extends CategoryRenderer { _renderMetric(audit) { const tmpl = this.dom.cloneTemplate('#tmpl-lh-metric', this.templateContext); const element = this.dom.find('.lh-metric', tmpl); - element.id = audit.result.name; + element.id = audit.result.id; const rating = Util.calculateRating(audit.result.score, audit.result.scoreDisplayMode); element.classList.add(`lh-metric--${rating}`); const titleEl = this.dom.find('.lh-metric__title', tmpl); - titleEl.textContent = audit.result.description; + titleEl.textContent = audit.result.title; const valueEl = this.dom.find('.lh-metric__value', tmpl); valueEl.textContent = Util.formatDisplayValue(audit.result.displayValue); const descriptionEl = this.dom.find('.lh-metric__description', tmpl); - descriptionEl.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText)); + descriptionEl.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.description)); if (audit.result.scoreDisplayMode === 'error') { descriptionEl.textContent = ''; @@ -48,10 +48,10 @@ class PerformanceCategoryRenderer extends CategoryRenderer { const tmpl = this.dom.cloneTemplate('#tmpl-lh-opportunity', this.templateContext); const element = this.dom.find('.lh-load-opportunity', tmpl); element.classList.add(`lh-load-opportunity--${Util.calculateRating(audit.result.score)}`); - element.id = audit.result.name; + element.id = audit.result.id; const titleEl = this.dom.find('.lh-load-opportunity__title', tmpl); - titleEl.textContent = audit.result.description; + titleEl.textContent = audit.result.title; this.dom.find('.lh-audit__index', element).textContent = `${index + 1}`; if (audit.result.errorMessage || audit.result.explanation) { @@ -70,7 +70,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer { const displayValue = Util.formatDisplayValue(audit.result.displayValue); const sparklineWidthPct = `${summaryInfo.wastedMs / scale * 100}%`; const wastedMs = Util.formatSeconds(summaryInfo.wastedMs, 0.01); - const auditDescription = this.dom.convertMarkdownLinkSnippets(audit.result.helpText); + const auditDescription = this.dom.convertMarkdownLinkSnippets(audit.result.description); this.dom.find('.lh-load-opportunity__sparkline', tmpl).title = displayValue; this.dom.find('.lh-load-opportunity__wasted-stat', tmpl).title = displayValue; this.dom.find('.lh-sparkline__bar', tmpl).style.width = sparklineWidthPct; @@ -144,7 +144,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer { const thumbnailAudit = category.auditRefs.find(audit => audit.id === 'screenshot-thumbnails'); const thumbnailResult = thumbnailAudit && thumbnailAudit.result; if (thumbnailResult && thumbnailResult.details) { - timelineEl.id = thumbnailResult.name; + timelineEl.id = thumbnailResult.id; const thumbnailDetails = /** @type {!DetailsRenderer.FilmstripDetails} */ (thumbnailResult.details); const filmstripEl = this.detailsRenderer.render(thumbnailDetails); diff --git a/lighthouse-core/report/html/renderer/report-renderer.js b/lighthouse-core/report/html/renderer/report-renderer.js index e75abe523ab1..a1db4f4a1127 100644 --- a/lighthouse-core/report/html/renderer/report-renderer.js +++ b/lighthouse-core/report/html/renderer/report-renderer.js @@ -194,12 +194,12 @@ if (typeof module !== 'undefined' && module.exports) { /** * @typedef {{ * rawValue: (number|boolean|undefined), - * name: string, + * id: string, + * title: string, * description: string, * explanation: (string|undefined), * errorMessage: (string|undefined), * displayValue: (string|Array|undefined), - * helpText: string, * scoreDisplayMode: string, * error: boolean, * score: (number|null), diff --git a/lighthouse-core/report/report-generator.js b/lighthouse-core/report/report-generator.js index 0424389b4cb1..384bc36b368c 100644 --- a/lighthouse-core/report/report-generator.js +++ b/lighthouse-core/report/report-generator.js @@ -74,7 +74,7 @@ class ReportGenerator { const audit = lhr.audits[auditRef.id]; // CSV validator wants all scores to be numeric, use -1 for now const numericScore = audit.score === null ? -1 : audit.score; - return [category.title, audit.name, audit.description, audit.scoreDisplayMode, numericScore] + return [category.title, audit.id, audit.title, audit.scoreDisplayMode, numericScore] .map(value => value.toString()) .map(escape); }); diff --git a/lighthouse-core/runner.js b/lighthouse-core/runner.js index e3a4b175b545..9269c87254ab 100644 --- a/lighthouse-core/runner.js +++ b/lighthouse-core/runner.js @@ -111,10 +111,10 @@ class Runner { /** @type {Object} */ const resultsById = {}; for (const audit of auditResults) { - resultsById[audit.name] = audit; + resultsById[audit.id] = audit; if (audit.warnings && audit.warnings.length) { - const prefixedWarnings = audit.warnings.map(msg => `${audit.description}: ${msg}`); + const prefixedWarnings = audit.warnings.map(msg => `${audit.title}: ${msg}`); lighthouseRunWarnings.push(...prefixedWarnings); } } diff --git a/lighthouse-core/test/audits/audit-test.js b/lighthouse-core/test/audits/audit-test.js index ec874526daea..75139e5d5f9c 100644 --- a/lighthouse-core/test/audits/audit-test.js +++ b/lighthouse-core/test/audits/audit-test.js @@ -82,7 +82,7 @@ describe('Audit', () => { const auditResult = Audit.generateAuditResult(FailingAudit, {rawValue: false}); assert.ok(Number.isFinite(auditResult.score)); assert.equal(auditResult.score, 0); - assert.equal(auditResult.description, 'Failing'); + assert.equal(auditResult.title, 'Failing'); }); }); diff --git a/lighthouse-core/test/report/html/renderer/category-renderer-test.js b/lighthouse-core/test/report/html/renderer/category-renderer-test.js index 957a4fad5635..41e696870d37 100644 --- a/lighthouse-core/test/report/html/renderer/category-renderer-test.js +++ b/lighthouse-core/test/report/html/renderer/category-renderer-test.js @@ -58,7 +58,7 @@ describe('CategoryRenderer', () => { const title = auditDOM.querySelector('.lh-audit__title'); const description = auditDOM.querySelector('.lh-audit__description'); - assert.equal(title.textContent, auditRef.result.description); + assert.equal(title.textContent, auditRef.result.title); assert.ok(description.querySelector('a'), 'audit help text contains coverted markdown links'); assert.ok(auditDOM.classList.contains('lh-audit--fail')); assert.ok(auditDOM.classList.contains(`lh-audit--${auditRef.result.scoreDisplayMode}`)); @@ -67,13 +67,13 @@ describe('CategoryRenderer', () => { it('renders an audit explanation when appropriate', () => { const audit1 = renderer.renderAudit({ scoreDisplayMode: 'binary', score: 0, - result: {helpText: 'help text', explanation: 'A reason', description: 'Audit title'}, + result: {description: 'help text', explanation: 'A reason', title: 'Audit title'}, }); assert.ok(audit1.querySelector('.lh-debug')); const audit2 = renderer.renderAudit({ scoreDisplayMode: 'binary', score: 0, - result: {helpText: 'help text', description: 'Audit title'}, + result: {description: 'help text', title: 'Audit title'}, }); assert.ok(!audit2.querySelector('.lh-debug')); }); @@ -81,7 +81,7 @@ describe('CategoryRenderer', () => { it('renders an informative audit', () => { const auditDOM = renderer.renderAudit({ id: 'informative', score: 0, - result: {description: 'It informs', helpText: 'help text', scoreDisplayMode: 'informative'}, + result: {title: 'It informs', description: 'help text', scoreDisplayMode: 'informative'}, }); assert.ok(auditDOM.matches('.lh-audit--informative')); @@ -117,8 +117,8 @@ describe('CategoryRenderer', () => { // TODO(phulce): revisit if top-level warnings approach is too noisy it.skip('renders audits with warnings as failed', () => { const auditResult = { - description: 'Audit', - helpText: 'Learn more', + title: 'Audit', + description: 'Learn more', warnings: ['It may not have worked!'], score: 1, }; diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 7497c30cec99..e342928edad1 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -9,13 +9,13 @@ ], "audits": { "is-on-https": { + "id": "is-on-https", + "title": "Does not use HTTPS", + "description": "All sites should be protected with HTTPS, even ones that don't handle 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).", "score": 0, + "scoreDisplayMode": "binary", "rawValue": false, "displayValue": "1 insecure request found", - "scoreDisplayMode": "binary", - "name": "is-on-https", - "description": "Does not use HTTPS", - "helpText": "All sites should be protected with HTTPS, even ones that don't handle 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).", "details": { "type": "table", "headings": [ @@ -33,98 +33,98 @@ } }, "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).", "score": 0, - "rawValue": false, "scoreDisplayMode": "binary", - "name": "redirects-http", - "description": "Does not redirect HTTP traffic to HTTPS", - "helpText": "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)." + "rawValue": false }, "service-worker": { + "id": "service-worker", + "title": "Does not register a 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://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).", "score": 0, - "rawValue": false, "scoreDisplayMode": "binary", - "name": "service-worker", - "description": "Does not register a service worker", - "helpText": "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)." + "rawValue": false }, "works-offline": { + "id": "works-offline", + "title": "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).", "score": 0, - "rawValue": false, - "warnings": [], "scoreDisplayMode": "binary", - "name": "works-offline", - "description": "Does not respond with a 200 when offline", - "helpText": "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)." + "rawValue": false, + "warnings": [] }, "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).", "score": 1, - "rawValue": true, - "warnings": [], "scoreDisplayMode": "binary", - "name": "viewport", - "description": "Has a `` tag with `width` or `initial-scale`", - "helpText": "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)." + "rawValue": true, + "warnings": [] }, "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).", "score": 1, - "rawValue": true, "scoreDisplayMode": "binary", - "name": "without-javascript", - "description": "Contains some content when JavaScript is not available", - "helpText": "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)." + "rawValue": true }, "first-contentful-paint": { + "id": "first-contentful-paint", + "title": "First Contentful Paint", + "description": "First contentful paint marks the time at which the first text/image is painted. [Learn more](https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics#first_paint_and_first_contentful_paint).", "score": 0.51, + "scoreDisplayMode": "numeric", "rawValue": 3969.135, "displayValue": [ "%10d ms", 3969.135 - ], - "scoreDisplayMode": "numeric", - "name": "first-contentful-paint", - "description": "First Contentful Paint", - "helpText": "First contentful paint marks the time at which the first text/image is painted. [Learn more](https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics#first_paint_and_first_contentful_paint)." + ] }, "first-meaningful-paint": { + "id": "first-meaningful-paint", + "title": "First Meaningful Paint", + "description": "First Meaningful Paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint).", "score": 0.51, + "scoreDisplayMode": "numeric", "rawValue": 3969.136, "displayValue": [ "%10d ms", 3969.136 - ], - "scoreDisplayMode": "numeric", - "name": "first-meaningful-paint", - "description": "First Meaningful Paint", - "helpText": "First Meaningful Paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint)." + ] }, "load-fast-enough-for-pwa": { + "id": "load-fast-enough-for-pwa", + "title": "Page load is fast enough on 3G", + "description": "A fast page load over a 3G network ensures a good mobile user experience. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/fast-3g).", "score": 1, - "rawValue": 4927.278, "scoreDisplayMode": "binary", - "name": "load-fast-enough-for-pwa", - "description": "Page load is fast enough on 3G", - "helpText": "A fast page load over a 3G network ensures a good mobile user experience. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/fast-3g)." + "rawValue": 4927.278 }, "speed-index": { + "id": "speed-index", + "title": "Speed Index", + "description": "Speed Index shows how quickly the contents of a page are visibly populated. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/speed-index).", "score": 0.74, + "scoreDisplayMode": "numeric", "rawValue": 4417, "displayValue": [ "%10d ms", 4417 - ], - "scoreDisplayMode": "numeric", - "name": "speed-index", - "description": "Speed Index", - "helpText": "Speed Index shows how quickly the contents of a page are visibly populated. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/speed-index)." + ] }, "screenshot-thumbnails": { + "id": "screenshot-thumbnails", + "title": "Screenshot Thumbnails", + "description": "This is what the load of your site looked like.", "score": null, - "rawValue": true, "scoreDisplayMode": "informative", - "name": "screenshot-thumbnails", - "description": "Screenshot Thumbnails", - "helpText": "This is what the load of your site looked like.", + "rawValue": true, "details": { "type": "filmstrip", "scale": 4927.278, @@ -183,24 +183,24 @@ } }, "estimated-input-latency": { + "id": "estimated-input-latency", + "title": "Estimated Input Latency", + "description": "The score above is an estimate of how long your app takes to respond to user input, in milliseconds, during the busiest 5s window of page load. If your latency is higher than 50 ms, users may perceive your app as laggy. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/estimated-input-latency).", "score": 1, + "scoreDisplayMode": "numeric", "rawValue": 16, "displayValue": [ "%d ms", 16 - ], - "scoreDisplayMode": "numeric", - "name": "estimated-input-latency", - "description": "Estimated Input Latency", - "helpText": "The score above is an estimate of how long your app takes to respond to user input, in milliseconds, during the busiest 5s window of page load. If your latency is higher than 50 ms, users may perceive your app as laggy. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/estimated-input-latency)." + ] }, "errors-in-console": { + "id": "errors-in-console", + "title": "Browser errors were logged to the console", + "description": "Errors logged to the console indicate unresolved problems. They can come from network request failures and other browser concerns.", "score": 0, - "rawValue": 5, "scoreDisplayMode": "binary", - "name": "errors-in-console", - "description": "Browser errors were logged to the console", - "helpText": "Errors logged to the console indicate unresolved problems. They can come from network request failures and other browser concerns.", + "rawValue": 5, "details": { "type": "table", "headings": [ @@ -245,13 +245,13 @@ } }, "time-to-first-byte": { + "id": "time-to-first-byte", + "title": "Keep server response times low (TTFB)", + "description": "Time To First Byte identifies the time at which your server sends a response. [Learn more](https://developers.google.com/web/tools/chrome-devtools/network-performance/issues).", "score": 1, + "scoreDisplayMode": "binary", "rawValue": 570.5630000000001, "displayValue": "", - "scoreDisplayMode": "binary", - "name": "time-to-first-byte", - "description": "Keep server response times low (TTFB)", - "helpText": "Time To First Byte identifies the time at which your server sends a response. [Learn more](https://developers.google.com/web/tools/chrome-devtools/network-performance/issues).", "details": { "summary": { "wastedMs": -29.436999999999898 @@ -259,37 +259,37 @@ } }, "first-cpu-idle": { + "id": "first-cpu-idle", + "title": "First CPU Idle", + "description": "First CPU Idle marks the first time at which the page's main thread is quiet enough to handle input. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-interactive).", "score": 0.72, + "scoreDisplayMode": "numeric", "rawValue": 4927.278, "displayValue": [ "%10d ms", 4927.278 - ], - "scoreDisplayMode": "numeric", - "name": "first-cpu-idle", - "description": "First CPU Idle", - "helpText": "First CPU Idle marks the first time at which the page's main thread is quiet enough to handle input. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-interactive)." + ] }, "interactive": { + "id": "interactive", + "title": "Time to Interactive", + "description": "Interactive marks the time at which the page is fully interactive. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/consistently-interactive).", "score": 0.78, + "scoreDisplayMode": "numeric", "rawValue": 4927.278, "displayValue": [ "%10d ms", 4927.278 - ], - "scoreDisplayMode": "numeric", - "name": "interactive", - "description": "Time to Interactive", - "helpText": "Interactive marks the time at which the page is fully interactive. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/consistently-interactive)." + ] }, "user-timings": { + "id": "user-timings", + "title": "User Timing marks and measures", + "description": "Consider instrumenting your app with the User Timing API to create custom, real-world measurements of key user experiences. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/user-timing).", "score": null, + "scoreDisplayMode": "not-applicable", "rawValue": true, "displayValue": "", - "scoreDisplayMode": "not-applicable", - "name": "user-timings", - "description": "User Timing marks and measures", - "helpText": "Consider instrumenting your app with the User Timing API to create custom, real-world measurements of key user experiences. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/user-timing).", "details": { "type": "table", "headings": [], @@ -297,13 +297,13 @@ } }, "critical-request-chains": { + "id": "critical-request-chains", + "title": "Critical Request Chains", + "description": "The Critical Request Chains below show you what resources are issued with a high priority. Consider reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains).", "score": null, + "scoreDisplayMode": "informative", "rawValue": false, "displayValue": "12 chains found", - "scoreDisplayMode": "informative", - "name": "critical-request-chains", - "description": "Critical Request Chains", - "helpText": "The Critical Request Chains below show you what resources are issued with a high priority. Consider reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains).", "details": { "type": "criticalrequestchain", "header": { @@ -461,16 +461,16 @@ } }, "redirects": { + "id": "redirects", + "title": "Avoid multiple page redirects", + "description": "Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/speed/docs/insights/AvoidRedirects).", "score": 1, + "scoreDisplayMode": "numeric", "rawValue": 0, "displayValue": [ "%d ms", 0 ], - "scoreDisplayMode": "numeric", - "name": "redirects", - "description": "Avoid multiple page redirects", - "helpText": "Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/speed/docs/insights/AvoidRedirects).", "details": { "type": "table", "headings": [], @@ -481,57 +481,57 @@ } }, "webapp-install-banner": { + "id": "webapp-install-banner", + "title": "User will not be prompted to Install the Web App", + "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).", "score": 0, - "rawValue": false, - "explanation": "Failures: No manifest was fetched,\nSite does not register a service worker.", "scoreDisplayMode": "binary", - "name": "webapp-install-banner", - "description": "User will not be prompted to Install the Web App", - "helpText": "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)." + "rawValue": false, + "explanation": "Failures: No manifest was fetched,\nSite does not register a service worker." }, "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).", "score": 0, - "rawValue": false, - "explanation": "Failures: No manifest was fetched.", "scoreDisplayMode": "binary", - "name": "splash-screen", - "description": "Is not configured for a custom splash screen", - "helpText": "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)." + "rawValue": false, + "explanation": "Failures: No manifest was fetched." }, "themed-omnibox": { + "id": "themed-omnibox", + "title": "Address bar does not match brand colors", + "description": "The browser address bar can be themed to match your site. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).", "score": 0, - "rawValue": false, - "explanation": "Failures: No manifest was fetched,\nNo `` tag found.", "scoreDisplayMode": "binary", - "name": "themed-omnibox", - "description": "Address bar does not match brand colors", - "helpText": "The browser address bar can be themed to match your site. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar)." + "rawValue": false, + "explanation": "Failures: No manifest was fetched,\nNo `` tag found." }, "manifest-short-name-length": { + "id": "manifest-short-name-length", + "title": "Manifest's `short_name` will be truncated when displayed on homescreen", + "description": "Make your app's `short_name` fewer than 12 characters to ensure that it's not truncated on homescreens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/manifest-short_name-is-not-truncated).", "score": 0, - "rawValue": false, "scoreDisplayMode": "binary", - "name": "manifest-short-name-length", - "description": "Manifest's `short_name` will be truncated when displayed on homescreen", - "helpText": "Make your app's `short_name` fewer than 12 characters to ensure that it's not truncated on homescreens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/manifest-short_name-is-not-truncated)." + "rawValue": false }, "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).", "score": 1, - "rawValue": true, - "explanation": "", "scoreDisplayMode": "binary", - "name": "content-width", - "description": "Content is sized correctly for the viewport", - "helpText": "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)." + "rawValue": true, + "explanation": "" }, "image-aspect-ratio": { + "id": "image-aspect-ratio", + "title": "Displays images with incorrect aspect ratio", + "description": "Image display dimensions should match natural aspect ratio.", "score": 0, + "scoreDisplayMode": "binary", "rawValue": false, "warnings": [], - "scoreDisplayMode": "binary", - "name": "image-aspect-ratio", - "description": "Displays images with incorrect aspect ratio", - "helpText": "Image display dimensions should match natural aspect ratio.", "details": { "type": "table", "headings": [ @@ -567,13 +567,13 @@ } }, "deprecations": { + "id": "deprecations", + "title": "Uses deprecated API's", + "description": "Deprecated APIs will eventually be removed from the browser. [Learn more](https://www.chromestatus.com/features#deprecated).", "score": 0, + "scoreDisplayMode": "binary", "rawValue": false, "displayValue": "3 warnings found", - "scoreDisplayMode": "binary", - "name": "deprecations", - "description": "Uses deprecated API's", - "helpText": "Deprecated APIs will eventually be removed from the browser. [Learn more](https://www.chromestatus.com/features#deprecated).", "details": { "type": "table", "headings": [ @@ -615,16 +615,16 @@ } }, "mainthread-work-breakdown": { + "id": "mainthread-work-breakdown", + "title": "Minimizes main thread work", + "description": "Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this.", "score": 0.98, + "scoreDisplayMode": "numeric", "rawValue": 1359.7759999930859, "displayValue": [ "%10d ms", 1359.7759999930859 ], - "scoreDisplayMode": "numeric", - "name": "mainthread-work-breakdown", - "description": "Minimizes main thread work", - "helpText": "Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this.", "details": { "type": "table", "headings": [ @@ -720,16 +720,16 @@ } }, "bootup-time": { + "id": "bootup-time", + "title": "JavaScript boot-up time", + "description": "Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/bootup).", "score": 0.9, + "scoreDisplayMode": "numeric", "rawValue": 1302.3579999804497, "displayValue": [ "%10d ms", 1302.3579999804497 ], - "scoreDisplayMode": "numeric", - "name": "bootup-time", - "description": "JavaScript boot-up time", - "helpText": "Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/bootup).", "details": { "type": "table", "headings": [ @@ -777,16 +777,16 @@ } }, "uses-rel-preload": { + "id": "uses-rel-preload", + "title": "Preload key requests", + "description": "Consider using to prioritize fetching late-discovered resources sooner. [Learn more](https://developers.google.com/web/updates/2016/03/link-rel-preload).", "score": 1, + "scoreDisplayMode": "numeric", "rawValue": 0, "displayValue": [ "Potential savings of %10d ms", 0 ], - "scoreDisplayMode": "numeric", - "name": "uses-rel-preload", - "description": "Preload key requests", - "helpText": "Consider using to prioritize fetching late-discovered resources sooner. [Learn more](https://developers.google.com/web/updates/2016/03/link-rel-preload).", "details": { "type": "table", "headings": [], @@ -797,16 +797,16 @@ } }, "uses-rel-preconnect": { + "id": "uses-rel-preconnect", + "title": "Avoid multiple, costly round trips to any origin", + "description": "Consider adding preconnect or dns-prefetch resource hints to establish early connections to important third-party origins. [Learn more](https://developers.google.com/web/fundamentals/performance/resource-prioritization#preconnect).", "score": 1, + "scoreDisplayMode": "numeric", "rawValue": 0, "displayValue": [ "Potential savings of %10d ms", 0 ], - "scoreDisplayMode": "numeric", - "name": "uses-rel-preconnect", - "description": "Avoid multiple, costly round trips to any origin", - "helpText": "Consider adding preconnect or dns-prefetch resource hints to establish early connections to important third-party origins. [Learn more](https://developers.google.com/web/fundamentals/performance/resource-prioritization#preconnect).", "details": { "type": "table", "headings": [], @@ -817,12 +817,12 @@ } }, "font-display": { + "id": "font-display", + "title": "All text remains visible during webfont loads", + "description": "Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading. [Learn more](https://developers.google.com/web/updates/2016/02/font-display).", "score": 1, - "rawValue": true, "scoreDisplayMode": "binary", - "name": "font-display", - "description": "All text remains visible during webfont loads", - "helpText": "Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading. [Learn more](https://developers.google.com/web/updates/2016/02/font-display).", + "rawValue": true, "details": { "type": "table", "headings": [], @@ -830,12 +830,12 @@ } }, "network-requests": { + "id": "network-requests", + "title": "Network Requests", + "description": "Lists the network requests that were made during page load.", "score": null, - "rawValue": 18, "scoreDisplayMode": "informative", - "name": "network-requests", - "description": "Network Requests", - "helpText": "Lists the network requests that were made during page load.", + "rawValue": 18, "details": { "type": "table", "headings": [ @@ -1046,12 +1046,12 @@ } }, "metrics": { + "id": "metrics", + "title": "Metrics", + "description": "Collects all available metrics.", "score": null, - "rawValue": 4927.278, "scoreDisplayMode": "informative", - "name": "metrics", - "description": "Metrics", - "helpText": "Collects all available metrics.", + "rawValue": 4927.278, "details": { "items": [ { @@ -1091,116 +1091,116 @@ } }, "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).", "score": null, - "rawValue": false, "scoreDisplayMode": "manual", - "name": "pwa-cross-browser", - "description": "Site works cross-browser", - "helpText": "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)." + "rawValue": false }, "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).", "score": null, - "rawValue": false, "scoreDisplayMode": "manual", - "name": "pwa-page-transitions", - "description": "Page transitions don't feel like they block on the network", - "helpText": "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)." + "rawValue": false }, "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).", "score": null, - "rawValue": false, "scoreDisplayMode": "manual", - "name": "pwa-each-page-has-url", - "description": "Each page has a URL", - "helpText": "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)." + "rawValue": false }, "accesskeys": { + "id": "accesskeys", + "title": "`[accesskey]` values are unique", + "description": "Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. [Learn more](https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "accesskeys", - "description": "`[accesskey]` values are unique", - "helpText": "Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. [Learn more](https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse)." + "rawValue": true }, "aria-allowed-attr": { + "id": "aria-allowed-attr", + "title": "`[aria-*]` attributes match their roles", + "description": "Each ARIA `role` supports a specific subset of `aria-*` attributes. Mismatching these invalidates the `aria-*` attributes. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-allowed-attr?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "aria-allowed-attr", - "description": "`[aria-*]` attributes match their roles", - "helpText": "Each ARIA `role` supports a specific subset of `aria-*` attributes. Mismatching these invalidates the `aria-*` attributes. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-allowed-attr?application=lighthouse)." + "rawValue": true }, "aria-required-attr": { + "id": "aria-required-attr", + "title": "`[role]`s have all required `[aria-*]` attributes", + "description": "Some ARIA roles have required attributes that describe the state of the element to screen readers. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-attr?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "aria-required-attr", - "description": "`[role]`s have all required `[aria-*]` attributes", - "helpText": "Some ARIA roles have required attributes that describe the state of the element to screen readers. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-attr?application=lighthouse)." + "rawValue": true }, "aria-required-children": { + "id": "aria-required-children", + "title": "Elements with `[role]` that require specific children `[role]`s, are present", + "description": "Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-children?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "aria-required-children", - "description": "Elements with `[role]` that require specific children `[role]`s, are present", - "helpText": "Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-children?application=lighthouse)." + "rawValue": true }, "aria-required-parent": { + "id": "aria-required-parent", + "title": "`[role]`s are contained by their required parent element", + "description": "Some ARIA child roles must be contained by specific parent roles to properly perform their intended accessibility functions. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-parent?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "aria-required-parent", - "description": "`[role]`s are contained by their required parent element", - "helpText": "Some ARIA child roles must be contained by specific parent roles to properly perform their intended accessibility functions. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-parent?application=lighthouse)." + "rawValue": true }, "aria-roles": { + "id": "aria-roles", + "title": "`[role]` values are valid", + "description": "ARIA roles must have valid values in order to perform their intended accessibility functions. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-roles?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "aria-roles", - "description": "`[role]` values are valid", - "helpText": "ARIA roles must have valid values in order to perform their intended accessibility functions. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-roles?application=lighthouse)." + "rawValue": true }, "aria-valid-attr-value": { + "id": "aria-valid-attr-value", + "title": "`[aria-*]` attributes have valid values", + "description": "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid values. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-valid-attr-value?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "aria-valid-attr-value", - "description": "`[aria-*]` attributes have valid values", - "helpText": "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid values. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-valid-attr-value?application=lighthouse)." + "rawValue": true }, "aria-valid-attr": { + "id": "aria-valid-attr", + "title": "`[aria-*]` attributes are valid and not misspelled", + "description": "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid names. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-valid-attr?application=lighthouse).", "score": null, - "rawValue": true, "scoreDisplayMode": "not-applicable", - "name": "aria-valid-attr", - "description": "`[aria-*]` attributes are valid and not misspelled", - "helpText": "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid names. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-valid-attr?application=lighthouse)." + "rawValue": true }, "audio-caption": { + "id": "audio-caption", + "title": "`