lighthouse 9.5.0-dev.20220509 → 9.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +70 -0
- package/dist/report/bundle.esm.js +400 -808
- package/dist/report/flow.js +22 -27
- package/dist/report/standalone.js +18 -23
- package/flow-report/src/summary/category.tsx +1 -1
- package/jest.config.js +1 -1
- package/lighthouse-cli/.eslintrc.cjs +4 -3
- package/lighthouse-cli/bin.js +1 -0
- package/lighthouse-cli/cli-flags.js +4 -3
- package/lighthouse-cli/commands/commands.js +1 -0
- package/lighthouse-cli/commands/list-audits.js +1 -0
- package/lighthouse-cli/commands/list-locales.js +1 -0
- package/lighthouse-cli/commands/list-trace-categories.js +1 -0
- package/lighthouse-cli/index.js +1 -0
- package/lighthouse-cli/printer.js +1 -0
- package/lighthouse-cli/run.js +24 -9
- package/lighthouse-cli/sentry-prompt.js +1 -0
- package/lighthouse-cli/test/smokehouse/core-tests.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/back-compat-util.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/lib.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/node.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js +1 -0
- package/lighthouse-cli/test/smokehouse/lib/child-process-error.js +1 -0
- package/lighthouse-cli/test/smokehouse/lib/concurrent-mapper.js +1 -0
- package/lighthouse-cli/test/smokehouse/lib/local-console.js +1 -0
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js +23 -109
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/cli.js +3 -2
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/devtools.js +19 -28
- package/lighthouse-cli/test/smokehouse/report-assert.js +4 -3
- package/lighthouse-cli/test/smokehouse/smokehouse.js +1 -1
- package/lighthouse-cli/test/smokehouse/version-check-test.js +3 -0
- package/lighthouse-cli/test/smokehouse/version-check.js +1 -0
- package/lighthouse-core/audits/accessibility/accesskeys.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-allowed-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-command-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-hidden-body.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-hidden-focus.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-input-field-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-meter-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-progressbar-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-required-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-required-children.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-required-parent.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-roles.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-toggle-field-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-tooltip-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-treeitem-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-valid-attr-value.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-valid-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/button-name.js +1 -1
- package/lighthouse-core/audits/accessibility/bypass.js +1 -1
- package/lighthouse-core/audits/accessibility/color-contrast.js +1 -1
- package/lighthouse-core/audits/accessibility/definition-list.js +1 -1
- package/lighthouse-core/audits/accessibility/dlitem.js +1 -1
- package/lighthouse-core/audits/accessibility/document-title.js +1 -1
- package/lighthouse-core/audits/accessibility/duplicate-id-active.js +1 -1
- package/lighthouse-core/audits/accessibility/duplicate-id-aria.js +1 -1
- package/lighthouse-core/audits/accessibility/form-field-multiple-labels.js +1 -1
- package/lighthouse-core/audits/accessibility/frame-title.js +1 -1
- package/lighthouse-core/audits/accessibility/heading-order.js +1 -1
- package/lighthouse-core/audits/accessibility/html-has-lang.js +1 -1
- package/lighthouse-core/audits/accessibility/html-lang-valid.js +1 -1
- package/lighthouse-core/audits/accessibility/image-alt.js +1 -1
- package/lighthouse-core/audits/accessibility/input-image-alt.js +1 -1
- package/lighthouse-core/audits/accessibility/label.js +1 -1
- package/lighthouse-core/audits/accessibility/link-name.js +1 -1
- package/lighthouse-core/audits/accessibility/list.js +1 -1
- package/lighthouse-core/audits/accessibility/listitem.js +5 -5
- package/lighthouse-core/audits/accessibility/meta-refresh.js +1 -1
- package/lighthouse-core/audits/accessibility/meta-viewport.js +1 -1
- package/lighthouse-core/audits/accessibility/object-alt.js +1 -1
- package/lighthouse-core/audits/accessibility/tabindex.js +1 -1
- package/lighthouse-core/audits/accessibility/td-headers-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/th-has-data-cells.js +1 -1
- package/lighthouse-core/audits/accessibility/valid-lang.js +1 -1
- package/lighthouse-core/audits/accessibility/video-caption.js +1 -1
- package/lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js +1 -2
- package/lighthouse-core/audits/byte-efficiency/duplicated-javascript.js +12 -11
- package/lighthouse-core/audits/byte-efficiency/efficient-animated-content.js +1 -1
- package/lighthouse-core/audits/byte-efficiency/legacy-javascript.js +24 -22
- package/lighthouse-core/audits/byte-efficiency/offscreen-images.js +2 -3
- package/lighthouse-core/audits/byte-efficiency/render-blocking-resources.js +3 -2
- package/lighthouse-core/audits/byte-efficiency/unminified-css.js +5 -3
- package/lighthouse-core/audits/byte-efficiency/unminified-javascript.js +11 -10
- package/lighthouse-core/audits/byte-efficiency/unused-css-rules.js +1 -0
- package/lighthouse-core/audits/byte-efficiency/unused-javascript.js +8 -11
- package/lighthouse-core/audits/byte-efficiency/uses-responsive-images.js +1 -1
- package/lighthouse-core/audits/byte-efficiency/uses-text-compression.js +1 -1
- package/lighthouse-core/audits/deprecations.js +598 -8
- package/lighthouse-core/audits/diagnostics.js +3 -4
- package/lighthouse-core/audits/dobetterweb/doctype.js +9 -20
- package/lighthouse-core/audits/dobetterweb/geolocation-on-start.js +1 -1
- package/lighthouse-core/audits/dobetterweb/no-document-write.js +1 -1
- package/lighthouse-core/audits/dobetterweb/notification-on-start.js +1 -1
- package/lighthouse-core/audits/dobetterweb/uses-http2.js +1 -2
- package/lighthouse-core/audits/dobetterweb/uses-passive-event-listeners.js +1 -1
- package/lighthouse-core/audits/errors-in-console.js +2 -2
- package/lighthouse-core/audits/long-tasks.js +2 -3
- package/lighthouse-core/audits/metrics/experimental-interaction-to-next-paint.js +3 -1
- package/lighthouse-core/audits/metrics/first-contentful-paint-3g.js +2 -2
- package/lighthouse-core/audits/metrics/first-contentful-paint.js +2 -3
- package/lighthouse-core/audits/metrics/first-meaningful-paint.js +2 -3
- package/lighthouse-core/audits/metrics/interactive.js +2 -3
- package/lighthouse-core/audits/metrics/largest-contentful-paint.js +2 -3
- package/lighthouse-core/audits/metrics/max-potential-fid.js +2 -3
- package/lighthouse-core/audits/metrics/speed-index.js +2 -3
- package/lighthouse-core/audits/metrics/total-blocking-time.js +2 -3
- package/lighthouse-core/audits/metrics.js +2 -3
- package/lighthouse-core/audits/no-unload-listeners.js +15 -7
- package/lighthouse-core/audits/predictive-perf.js +1 -2
- package/lighthouse-core/audits/preload-lcp-image.js +3 -3
- package/lighthouse-core/audits/redirects.js +1 -1
- package/lighthouse-core/audits/script-treemap-data.js +45 -45
- package/lighthouse-core/audits/seo/http-status-code.js +4 -2
- package/lighthouse-core/audits/seo/link-text.js +0 -2
- package/lighthouse-core/audits/server-response-time.js +17 -2
- package/lighthouse-core/audits/service-worker.js +2 -7
- package/lighthouse-core/audits/timing-budget.js +2 -3
- package/lighthouse-core/audits/uses-rel-preconnect.js +1 -1
- package/lighthouse-core/audits/uses-rel-preload.js +1 -1
- package/lighthouse-core/audits/valid-source-maps.js +14 -12
- package/lighthouse-core/audits/violation-audit.js +1 -1
- package/lighthouse-core/audits/work-during-interaction.js +280 -0
- package/lighthouse-core/computed/critical-request-chains.js +9 -5
- package/lighthouse-core/computed/js-bundles.js +11 -11
- package/lighthouse-core/computed/main-resource.js +2 -3
- package/lighthouse-core/computed/metrics/first-contentful-paint-all-frames.js +1 -1
- package/lighthouse-core/computed/metrics/first-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/first-meaningful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/interactive.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-first-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-first-meaningful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-interactive.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-largest-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-max-potential-fid.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-metric.js +5 -3
- package/lighthouse-core/computed/metrics/lantern-speed-index.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-total-blocking-time.js +1 -1
- package/lighthouse-core/computed/metrics/largest-contentful-paint-all-frames.js +1 -1
- package/lighthouse-core/computed/metrics/largest-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/max-potential-fid.js +1 -1
- package/lighthouse-core/computed/metrics/metric.js +0 -1
- package/lighthouse-core/computed/metrics/responsiveness.js +12 -9
- package/lighthouse-core/computed/metrics/speed-index.js +1 -1
- package/lighthouse-core/computed/metrics/timing-summary.js +6 -13
- package/lighthouse-core/computed/metrics/total-blocking-time.js +1 -1
- package/lighthouse-core/computed/module-duplication.js +5 -6
- package/lighthouse-core/computed/page-dependency-graph.js +28 -55
- package/lighthouse-core/computed/resource-summary.js +5 -5
- package/lighthouse-core/computed/unused-css.js +7 -6
- package/lighthouse-core/computed/unused-javascript-summary.js +36 -16
- package/lighthouse-core/config/budget.js +2 -2
- package/lighthouse-core/config/default-config.js +1 -2
- package/lighthouse-core/config/metrics-to-audits.js +5 -0
- package/lighthouse-core/fraggle-rock/api.js +1 -1
- package/lighthouse-core/fraggle-rock/config/default-config.js +8 -5
- package/lighthouse-core/fraggle-rock/gather/base-artifacts.js +3 -6
- package/lighthouse-core/fraggle-rock/gather/driver.js +2 -2
- package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +26 -51
- package/lighthouse-core/fraggle-rock/gather/runner-helpers.js +3 -0
- package/lighthouse-core/fraggle-rock/gather/session.js +2 -2
- package/lighthouse-core/fraggle-rock/gather/snapshot-runner.js +4 -5
- package/lighthouse-core/fraggle-rock/gather/timespan-runner.js +6 -6
- package/lighthouse-core/gather/connections/cri.js +0 -1
- package/lighthouse-core/gather/driver/execution-context.js +2 -4
- package/lighthouse-core/gather/driver/navigation.js +9 -9
- package/lighthouse-core/gather/driver/network-monitor.js +3 -16
- package/lighthouse-core/gather/driver.js +1 -6
- package/lighthouse-core/gather/fetcher.js +210 -34
- package/lighthouse-core/gather/gather-runner.js +17 -13
- package/lighthouse-core/gather/gatherers/accessibility.js +4 -16
- package/lighthouse-core/gather/gatherers/console-messages.js +2 -4
- package/lighthouse-core/gather/gatherers/dobetterweb/doctype.js +2 -4
- package/lighthouse-core/gather/gatherers/full-page-screenshot.js +2 -3
- package/lighthouse-core/gather/gatherers/js-usage.js +87 -12
- package/lighthouse-core/gather/gatherers/link-elements.js +14 -12
- package/lighthouse-core/gather/gatherers/main-document-content.js +8 -8
- package/lighthouse-core/gather/gatherers/script-elements.js +56 -7
- package/lighthouse-core/gather/gatherers/seo/robots-txt.js +30 -2
- package/lighthouse-core/gather/gatherers/source-maps.js +1 -3
- package/lighthouse-core/gather/gatherers/trace-elements.js +21 -2
- package/lighthouse-core/gather/gatherers/web-app-manifest.js +2 -2
- package/lighthouse-core/index.js +2 -26
- package/lighthouse-core/lib/cdt/generated/SourceMap.js +1 -1
- package/lighthouse-core/lib/dependency-graph/simulator/network-analyzer.js +29 -8
- package/lighthouse-core/lib/navigation-error.js +4 -13
- package/lighthouse-core/lib/script-helpers.js +6 -11
- package/lighthouse-core/lib/url-shim.js +2 -2
- package/lighthouse-core/runner.js +5 -0
- package/lighthouse-core/scripts/manual-chrome-launcher.js +1 -0
- package/lighthouse-core/util-commonjs.js +24 -28
- package/package.json +12 -12
- package/readme.md +1 -1
- package/report/.eslintrc.cjs +1 -3
- package/report/assets/styles.css +10 -12
- package/report/assets/templates.html +9 -10
- package/report/clients/bundle.js +1 -0
- package/report/clients/standalone.js +1 -0
- package/report/generator/report-generator.js +21 -46
- package/report/renderer/api.js +1 -0
- package/report/renderer/category-renderer.js +1 -0
- package/report/renderer/components.js +304 -303
- package/report/renderer/crc-details-renderer.js +1 -0
- package/report/renderer/details-renderer.js +10 -10
- package/report/renderer/dom.js +1 -0
- package/report/renderer/drop-down-menu.js +1 -0
- package/report/renderer/element-screenshot-renderer.js +4 -0
- package/report/renderer/features-util.js +1 -0
- package/report/renderer/i18n.js +62 -118
- package/report/renderer/logger.js +1 -0
- package/report/renderer/open-tab.js +3 -1
- package/report/renderer/performance-category-renderer.js +1 -0
- package/report/renderer/pwa-category-renderer.js +1 -0
- package/report/renderer/report-renderer.js +1 -0
- package/report/renderer/report-ui-features.js +1 -0
- package/report/renderer/snippet-renderer.js +1 -0
- package/report/renderer/swap-locale-feature.js +1 -0
- package/report/renderer/text-encoding.js +1 -0
- package/report/renderer/topbar-features.js +1 -0
- package/report/renderer/util.js +24 -27
- package/report/test/clients/bundle-test.js +4 -0
- package/report/test/generator/file-namer-test.js +1 -0
- package/report/test/generator/report-generator-test.js +20 -25
- package/report/test/renderer/category-renderer-test.js +3 -0
- package/report/test/renderer/components-test.js +3 -0
- package/report/test/renderer/crc-details-renderer-test.js +3 -0
- package/report/test/renderer/details-renderer-test.js +12 -58
- package/report/test/renderer/dom-test.js +3 -0
- package/report/test/renderer/element-screenshot-renderer-test.js +6 -3
- package/report/test/renderer/i18n-test.js +25 -70
- package/report/test/renderer/performance-category-renderer-test.js +4 -11
- package/report/test/renderer/pwa-category-renderer-test.js +3 -0
- package/report/test/renderer/report-renderer-axe-test.js +3 -0
- package/report/test/renderer/report-renderer-test.js +3 -0
- package/report/test/renderer/report-ui-features-test.js +3 -0
- package/report/test/renderer/snippet-renderer-test.js +3 -0
- package/report/test/renderer/text-encoding-test.js +3 -0
- package/report/test/renderer/util-test.js +5 -2
- package/report/test-assets/faux-psi.js +1 -2
- package/shared/localization/locales/en-US.json +260 -53
- package/shared/localization/locales/en-XL.json +260 -53
- package/shared/test/localization/format-test.js +2 -0
- package/shared/test/localization/locales-test.js +2 -0
- package/shared/test/localization/swap-locale-test.js +2 -0
- package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +2 -0
- package/third-party/chromium-synchronization/installability-errors-test.js +2 -0
- package/tsconfig.json +0 -1
- package/types/artifacts.d.ts +9 -48
- package/types/config.d.ts +0 -2
- package/types/externs.d.ts +2 -2
- package/types/gatherer.d.ts +2 -1
- package/types/global-lh.d.ts +0 -3
- package/types/lhr/audit-details.d.ts +3 -1
- package/types/lhr/lhr.d.ts +2 -2
- package/types/lhr/treemap.d.ts +1 -0
- package/lighthouse-core/audits/script-elements-test-audit.js +0 -30
- package/lighthouse-core/gather/gatherers/scripts.js +0 -154
- package/report/test/.eslintrc.cjs +0 -11
- package/shared/test/localization/.eslintrc.cjs +0 -11
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
|
+
'use strict';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @fileoverview Compares chromium version strings: 103.0.5017.0
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Access keys let users quickly focus a part of the page. For proper ' +
|
|
23
23
|
'navigation, each access key must be unique. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/accesskeys/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Each ARIA `role` supports a specific subset of `aria-*` attributes. ' +
|
|
23
23
|
'Mismatching these invalidates the `aria-*` attributes. [Learn ' +
|
|
24
|
-
'more](https://
|
|
24
|
+
'more](https://web.dev/aria-allowed-attr/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accessibility audit that evaluates if important HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: '`button`, `link`, and `menuitem` elements do not have accessible names.',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://
|
|
22
|
+
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks if the html <body> element does not have an aria-hidden attribute set on it. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: '`[aria-hidden="true"]` is present on the document `<body>`',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'Assistive technologies, like screen readers, work inconsistently when `aria-hidden="true"` is set on the document `<body>`. [Learn more](https://
|
|
22
|
+
description: 'Assistive technologies, like screen readers, work inconsistently when `aria-hidden="true"` is set on the document `<body>`. [Learn more](https://web.dev/aria-hidden-body/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks if all elements that have an aria-hidden attribute do not contain focusable descendent elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: '`[aria-hidden="true"]` elements contain focusable descendents',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'Focusable descendents within an `[aria-hidden="true"]` element prevent those interactive elements from being available to users of assistive technologies like screen readers. [Learn more](https://
|
|
22
|
+
description: 'Focusable descendents within an `[aria-hidden="true"]` element prevent those interactive elements from being available to users of assistive technologies like screen readers. [Learn more](https://web.dev/aria-hidden-focus/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks that all ARIA input fields have an accessible name. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'ARIA input fields do not have accessible names',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'When an input field doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://
|
|
22
|
+
description: 'When an input field doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accessibility audit that evaluates if meter HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'ARIA `meter` elements do not have accessible names.',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://
|
|
22
|
+
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accessibility audit that evaluates if progressbar HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'ARIA `progressbar` elements do not have accessible names.',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'When a `progressbar` element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://
|
|
22
|
+
description: 'When a `progressbar` element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
failureTitle: '`[role]`s do not have all required `[aria-*]` attributes',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Some ARIA roles have required attributes that describe the state ' +
|
|
23
|
-
'of the element to screen readers. [Learn more](https://
|
|
23
|
+
'of the element to screen readers. [Learn more](https://web.dev/aria-required-attr/).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -24,7 +24,7 @@ const UIStrings = {
|
|
|
24
24
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
25
25
|
description: 'Some ARIA parent roles must contain specific child roles to perform ' +
|
|
26
26
|
'their intended accessibility functions. ' +
|
|
27
|
-
'[Learn more](https://
|
|
27
|
+
'[Learn more](https://web.dev/aria-required-children/).',
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
23
23
|
description: 'Some ARIA child roles must be contained by specific parent roles to ' +
|
|
24
24
|
'properly perform their intended accessibility functions. ' +
|
|
25
|
-
'[Learn more](https://
|
|
25
|
+
'[Learn more](https://web.dev/aria-required-parent/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'ARIA roles must have valid values in order to perform their ' +
|
|
23
23
|
'intended accessibility functions. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/aria-roles/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks that all ARIA toggle fields have an accessible name. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'ARIA toggle fields do not have accessible names',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'When a toggle field doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://
|
|
22
|
+
description: 'When a toggle field doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accessibility audit that evaluates if tooltip HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'ARIA `tooltip` elements do not have accessible names.',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://
|
|
22
|
+
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accessibility audit that evaluates if treeitem HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'ARIA `treeitem` elements do not have accessible names.',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://
|
|
22
|
+
description: 'When an element doesn\'t have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more](https://web.dev/aria-name/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Assistive technologies, like screen readers, can\'t interpret ARIA ' +
|
|
23
23
|
'attributes with invalid values. [Learn ' +
|
|
24
|
-
'more](https://
|
|
24
|
+
'more](https://web.dev/aria-valid-attr-value/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Assistive technologies, like screen readers, can\'t interpret ARIA ' +
|
|
23
23
|
'attributes with invalid names. [Learn ' +
|
|
24
|
-
'more](https://
|
|
24
|
+
'more](https://web.dev/aria-valid-attr/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'When a button doesn\'t have an accessible name, screen readers announce it ' +
|
|
23
23
|
'as "button", making it unusable for users who rely on screen readers. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/button-name/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
23
23
|
description: 'Adding ways to bypass repetitive content lets keyboard users navigate the ' +
|
|
24
24
|
'page more efficiently. ' +
|
|
25
|
-
'[Learn more](https://
|
|
25
|
+
'[Learn more](https://web.dev/bypass/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
'sufficient contrast ratio.',
|
|
23
23
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
24
24
|
description: 'Low-contrast text is difficult or impossible for many users to read. ' +
|
|
25
|
-
'[Learn more](https://
|
|
25
|
+
'[Learn more](https://web.dev/color-contrast/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
24
24
|
description: 'When definition lists are not properly marked up, screen readers may produce ' +
|
|
25
25
|
'confusing or inaccurate output. ' +
|
|
26
|
-
'[Learn more](https://
|
|
26
|
+
'[Learn more](https://web.dev/definition-list/).',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Definition list items (`<dt>` and `<dd>`) must be wrapped in a ' +
|
|
23
23
|
'parent `<dl>` element to ensure that screen readers can properly announce them. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/dlitem/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'The title gives screen reader users an overview of the page, and search ' +
|
|
23
23
|
'engine users rely on it heavily to determine if a page is relevant to their search. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/document-title/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks if there are any duplicate id HTML attributes on active, focusable elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: '`[id]` attributes on active, focusable elements are not unique',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'All focusable elements must have a unique `id` to ensure that they\'re visible to assistive technologies. [Learn more](https://
|
|
22
|
+
description: 'All focusable elements must have a unique `id` to ensure that they\'re visible to assistive technologies. [Learn more](https://web.dev/duplicate-id-active/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks if there are any duplicate ARIA IDs on the page. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'ARIA IDs are not unique',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'The value of an ARIA ID must be unique to prevent other instances from being overlooked by assistive technologies. [Learn more](https://
|
|
22
|
+
description: 'The value of an ARIA ID must be unique to prevent other instances from being overlooked by assistive technologies. [Learn more](https://web.dev/duplicate-id-aria/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks if any form fields have multiple label elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'Form fields have multiple labels',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'Form fields with multiple labels can be confusingly announced by assistive technologies like screen readers which use either the first, the last, or all of the labels. [Learn more](https://
|
|
22
|
+
description: 'Form fields with multiple labels can be confusingly announced by assistive technologies like screen readers which use either the first, the last, or all of the labels. [Learn more](https://web.dev/form-field-multiple-labels/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
failureTitle: '`<frame>` or `<iframe>` elements do not have a title',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Screen reader users rely on frame titles to describe the contents of frames. ' +
|
|
23
|
-
'[Learn more](https://
|
|
23
|
+
'[Learn more](https://web.dev/frame-title/).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
19
19
|
/** Title of an accesibility audit that checks if heading elements (<h1>, <h2>, etc) appear in numeric order and only ever increase in steps of 1. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
20
|
failureTitle: 'Heading elements are not in a sequentially-descending order',
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'Properly ordered headings that do not skip levels convey the semantic structure of the page, making it easier to navigate and understand when using assistive technologies. [Learn more](https://
|
|
22
|
+
description: 'Properly ordered headings that do not skip levels convey the semantic structure of the page, making it easier to navigate and understand when using assistive technologies. [Learn more](https://web.dev/heading-order/).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
'that the page is in the default language that the user chose when setting up the ' +
|
|
24
24
|
'screen reader. If the page isn\'t actually in the default language, then the screen ' +
|
|
25
25
|
'reader might not announce the page\'s text correctly. ' +
|
|
26
|
-
'[Learn more](https://
|
|
26
|
+
'[Learn more](https://web.dev/html-has-lang/).',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
23
23
|
description: 'Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) ' +
|
|
24
24
|
'helps screen readers announce text properly. ' +
|
|
25
|
-
'[Learn more](https://
|
|
25
|
+
'[Learn more](https://web.dev/html-lang-valid/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Informative elements should aim for short, descriptive alternate text. ' +
|
|
23
23
|
'Decorative elements can be ignored with an empty alt attribute. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/image-alt/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'When an image is being used as an `<input>` button, providing alternative ' +
|
|
23
23
|
'text can help screen reader users understand the purpose of the button. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/input-image-alt/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Labels ensure that form controls are announced properly by assistive ' +
|
|
23
23
|
'technologies, like screen readers. [Learn ' +
|
|
24
|
-
'more](https://
|
|
24
|
+
'more](https://web.dev/label/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
description: 'Link text (and alternate text for images, when used as links) that is ' +
|
|
23
23
|
'discernible, unique, and focusable improves the navigation experience for ' +
|
|
24
24
|
'screen reader users. ' +
|
|
25
|
-
'[Learn more](https://
|
|
25
|
+
'[Learn more](https://web.dev/link-name/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
24
24
|
description: 'Screen readers have a specific way of announcing lists. Ensuring proper list ' +
|
|
25
25
|
'structure aids screen reader output. ' +
|
|
26
|
-
'[Learn more](https://
|
|
26
|
+
'[Learn more](https://web.dev/list/).',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -15,14 +15,14 @@ const i18n = require('../../lib/i18n/i18n.js');
|
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/** Title of an accesibility audit that evaluates if any list item elements do not have list parent elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
|
|
18
|
-
title: 'List items (`<li>`) are contained within `<ul
|
|
18
|
+
title: 'List items (`<li>`) are contained within `<ul>` or `<ol>` parent elements',
|
|
19
19
|
/** Title of an accesibility audit that evaluates if any list item elements do not have list parent elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
|
|
20
|
-
failureTitle: 'List items (`<li>`) are not contained within `<ul
|
|
21
|
-
'
|
|
20
|
+
failureTitle: 'List items (`<li>`) are not contained within `<ul>` ' +
|
|
21
|
+
'or `<ol>` parent elements.',
|
|
22
22
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
23
23
|
description: 'Screen readers require list items (`<li>`) to be contained within a ' +
|
|
24
|
-
'parent `<ul
|
|
25
|
-
'[Learn more](https://
|
|
24
|
+
'parent `<ul>` or `<ol>` to be announced properly. ' +
|
|
25
|
+
'[Learn more](https://web.dev/listitem/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
description: 'Users do not expect a page to refresh automatically, and doing so will move ' +
|
|
23
23
|
'focus back to the top of the page. This may create a frustrating or ' +
|
|
24
24
|
'confusing experience. ' +
|
|
25
|
-
'[Learn more](https://
|
|
25
|
+
'[Learn more](https://web.dev/meta-refresh/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
24
24
|
description: 'Disabling zooming is problematic for users with low vision who rely on ' +
|
|
25
25
|
'screen magnification to properly see the contents of a web page. ' +
|
|
26
|
-
'[Learn more](https://
|
|
26
|
+
'[Learn more](https://web.dev/meta-viewport/).',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Screen readers cannot translate non-text content. Adding alternate text to ' +
|
|
23
23
|
'`<object>` elements helps screen readers convey meaning to users. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/object-alt/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'A value greater than 0 implies an explicit navigation ordering. ' +
|
|
23
23
|
'Although technically valid, this often creates frustrating experiences ' +
|
|
24
|
-
'for users who rely on assistive technologies. [Learn more](https://
|
|
24
|
+
'for users who rely on assistive technologies. [Learn more](https://web.dev/tabindex/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -25,7 +25,7 @@ const UIStrings = {
|
|
|
25
25
|
description: 'Screen readers have features to make navigating tables easier. Ensuring ' +
|
|
26
26
|
'`<td>` cells using the `[headers]` attribute only refer to other cells in the same ' +
|
|
27
27
|
'table may improve the experience for screen reader users. ' +
|
|
28
|
-
'[Learn more](https://
|
|
28
|
+
'[Learn more](https://web.dev/td-headers-attr/).',
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -24,7 +24,7 @@ const UIStrings = {
|
|
|
24
24
|
description: 'Screen readers have features to make navigating tables easier. Ensuring ' +
|
|
25
25
|
'table headers always refer to some set of cells may improve the experience for screen ' +
|
|
26
26
|
'reader users. ' +
|
|
27
|
-
'[Learn more](https://
|
|
27
|
+
'[Learn more](https://web.dev/th-has-data-cells/).',
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) ' +
|
|
23
23
|
'on elements helps ensure that text is pronounced correctly by a screen reader. ' +
|
|
24
|
-
'[Learn more](https://
|
|
24
|
+
'[Learn more](https://web.dev/valid-lang/).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
23
23
|
description: 'When a video provides a caption it is easier for deaf and hearing impaired ' +
|
|
24
24
|
'users to access its information. ' +
|
|
25
|
-
'[Learn more](https://
|
|
25
|
+
'[Learn more](https://web.dev/video-caption/).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
@@ -109,7 +109,6 @@ class UnusedBytes extends Audit {
|
|
|
109
109
|
const gatherContext = artifacts.GatherContext;
|
|
110
110
|
const trace = artifacts.traces[Audit.DEFAULT_PASS];
|
|
111
111
|
const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
|
|
112
|
-
const URL = artifacts.URL;
|
|
113
112
|
const settings = context?.settings || {};
|
|
114
113
|
const simulatorOptions = {
|
|
115
114
|
devtoolsLog,
|
|
@@ -132,7 +131,7 @@ class UnusedBytes extends Audit {
|
|
|
132
131
|
this.audit_(artifacts, networkRecords, context),
|
|
133
132
|
// Page dependency graph is only used in navigation mode.
|
|
134
133
|
gatherContext.gatherMode === 'navigation' ?
|
|
135
|
-
PageDependencyGraph.request({trace, devtoolsLog
|
|
134
|
+
PageDependencyGraph.request({trace, devtoolsLog}, context) :
|
|
136
135
|
null,
|
|
137
136
|
LoadSimulator.request(simulatorOptions, context),
|
|
138
137
|
]);
|
|
@@ -48,7 +48,7 @@ class DuplicatedJavascript extends ByteEfficiencyAudit {
|
|
|
48
48
|
title: str_(UIStrings.title),
|
|
49
49
|
description: str_(UIStrings.description),
|
|
50
50
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
51
|
-
requiredArtifacts: ['devtoolsLogs', 'traces', 'SourceMaps', '
|
|
51
|
+
requiredArtifacts: ['devtoolsLogs', 'traces', 'SourceMaps', 'ScriptElements',
|
|
52
52
|
'GatherContext', 'URL'],
|
|
53
53
|
};
|
|
54
54
|
}
|
|
@@ -85,10 +85,10 @@ class DuplicatedJavascript extends ByteEfficiencyAudit {
|
|
|
85
85
|
|
|
86
86
|
const normalizedSource = 'node_modules/' + DuplicatedJavascript._getNodeModuleName(source);
|
|
87
87
|
const aggregatedSourceDatas = groupedDuplication.get(normalizedSource) || [];
|
|
88
|
-
for (const {
|
|
89
|
-
let sourceData = aggregatedSourceDatas.find(d => d.
|
|
88
|
+
for (const {scriptUrl, resourceSize} of sourceDatas) {
|
|
89
|
+
let sourceData = aggregatedSourceDatas.find(d => d.scriptUrl === scriptUrl);
|
|
90
90
|
if (!sourceData) {
|
|
91
|
-
sourceData = {
|
|
91
|
+
sourceData = {scriptUrl, resourceSize: 0};
|
|
92
92
|
aggregatedSourceDatas.push(sourceData);
|
|
93
93
|
}
|
|
94
94
|
sourceData.resourceSize += resourceSize;
|
|
@@ -156,20 +156,21 @@ class DuplicatedJavascript extends ByteEfficiencyAudit {
|
|
|
156
156
|
let wastedBytesTotal = 0;
|
|
157
157
|
for (let i = 0; i < sourceDatas.length; i++) {
|
|
158
158
|
const sourceData = sourceDatas[i];
|
|
159
|
-
const
|
|
160
|
-
const script = artifacts.Scripts.find(script => script.scriptId === scriptId);
|
|
161
|
-
const url = script?.url || '';
|
|
159
|
+
const url = sourceData.scriptUrl;
|
|
162
160
|
|
|
163
161
|
/** @type {number|undefined} */
|
|
164
162
|
let transferRatio = transferRatioByUrl.get(url);
|
|
165
163
|
if (transferRatio === undefined) {
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
const fakeScript = /** @type {LH.Artifacts.ScriptElement} */ ({src: url});
|
|
165
|
+
const networkRecord = getRequestForScript(networkRecords, fakeScript);
|
|
166
|
+
|
|
167
|
+
const script = artifacts.ScriptElements.find(script => script.src === url);
|
|
168
|
+
if (!script || script.content === null) {
|
|
169
|
+
// This should never happen because we found the wasted bytes from bundles, which required contents in a ScriptElement.
|
|
168
170
|
continue;
|
|
169
171
|
}
|
|
170
172
|
|
|
171
|
-
const contentLength = script.length;
|
|
172
|
-
const networkRecord = getRequestForScript(networkRecords, script);
|
|
173
|
+
const contentLength = script.content.length;
|
|
173
174
|
transferRatio = DuplicatedJavascript._estimateTransferRatio(networkRecord, contentLength);
|
|
174
175
|
transferRatioByUrl.set(url, transferRatio);
|
|
175
176
|
}
|
|
@@ -37,7 +37,7 @@ class EfficientAnimatedContent extends ByteEfficiencyAudit {
|
|
|
37
37
|
title: str_(UIStrings.title),
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
39
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
40
|
-
requiredArtifacts: ['devtoolsLogs', 'traces', 'GatherContext'
|
|
40
|
+
requiredArtifacts: ['devtoolsLogs', 'traces', 'GatherContext'],
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
|