lighthouse 12.8.1 → 12.8.2-dev.20250829

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.
Files changed (119) hide show
  1. package/cli/test/smokehouse/config/exclusions.js +2 -0
  2. package/cli/test/smokehouse/frontends/lib.js +1 -3
  3. package/cli/test/smokehouse/frontends/smokehouse-bin.js +6 -2
  4. package/cli/test/smokehouse/report-assert.js +1 -2
  5. package/core/audits/accessibility/accesskeys.js +2 -2
  6. package/core/audits/accessibility/aria-allowed-attr.js +2 -2
  7. package/core/audits/accessibility/aria-hidden-body.js +2 -2
  8. package/core/audits/accessibility/aria-hidden-focus.js +2 -2
  9. package/core/audits/accessibility/aria-input-field-name.js +2 -2
  10. package/core/audits/accessibility/aria-required-attr.js +2 -2
  11. package/core/audits/accessibility/aria-required-children.js +2 -2
  12. package/core/audits/accessibility/aria-required-parent.js +2 -2
  13. package/core/audits/accessibility/aria-roles.js +2 -2
  14. package/core/audits/accessibility/aria-text.js +2 -2
  15. package/core/audits/accessibility/aria-toggle-field-name.js +2 -2
  16. package/core/audits/accessibility/aria-valid-attr-value.js +2 -2
  17. package/core/audits/accessibility/aria-valid-attr.js +2 -2
  18. package/core/audits/accessibility/button-name.js +2 -2
  19. package/core/audits/accessibility/bypass.js +2 -2
  20. package/core/audits/accessibility/color-contrast.js +2 -2
  21. package/core/audits/accessibility/definition-list.js +2 -2
  22. package/core/audits/accessibility/dlitem.js +2 -2
  23. package/core/audits/accessibility/document-title.js +2 -2
  24. package/core/audits/accessibility/duplicate-id-aria.js +2 -2
  25. package/core/audits/accessibility/empty-heading.js +2 -2
  26. package/core/audits/accessibility/form-field-multiple-labels.js +2 -2
  27. package/core/audits/accessibility/frame-title.js +2 -2
  28. package/core/audits/accessibility/heading-order.js +2 -2
  29. package/core/audits/accessibility/html-has-lang.js +2 -2
  30. package/core/audits/accessibility/html-lang-valid.js +2 -2
  31. package/core/audits/accessibility/html-xml-lang-mismatch.js +2 -2
  32. package/core/audits/accessibility/identical-links-same-purpose.js +2 -2
  33. package/core/audits/accessibility/image-alt.js +2 -2
  34. package/core/audits/accessibility/image-redundant-alt.js +2 -2
  35. package/core/audits/accessibility/input-button-name.js +2 -2
  36. package/core/audits/accessibility/input-image-alt.js +2 -2
  37. package/core/audits/accessibility/label-content-name-mismatch.js +2 -2
  38. package/core/audits/accessibility/label.js +2 -2
  39. package/core/audits/accessibility/landmark-one-main.js +2 -2
  40. package/core/audits/accessibility/link-in-text-block.js +2 -2
  41. package/core/audits/accessibility/link-name.js +2 -2
  42. package/core/audits/accessibility/list.js +2 -2
  43. package/core/audits/accessibility/listitem.js +2 -2
  44. package/core/audits/accessibility/meta-refresh.js +2 -2
  45. package/core/audits/accessibility/meta-viewport.js +2 -2
  46. package/core/audits/accessibility/object-alt.js +2 -2
  47. package/core/audits/accessibility/select-name.js +2 -2
  48. package/core/audits/accessibility/skip-link.js +2 -2
  49. package/core/audits/accessibility/tabindex.js +2 -2
  50. package/core/audits/accessibility/table-duplicate-name.js +2 -2
  51. package/core/audits/accessibility/table-fake-caption.js +2 -2
  52. package/core/audits/accessibility/target-size.js +2 -2
  53. package/core/audits/accessibility/td-has-header.js +2 -2
  54. package/core/audits/accessibility/td-headers-attr.js +2 -2
  55. package/core/audits/accessibility/th-has-data-cells.js +2 -2
  56. package/core/audits/accessibility/valid-lang.js +2 -2
  57. package/core/audits/accessibility/video-caption.js +2 -2
  58. package/core/audits/errors-in-console.js +6 -2
  59. package/core/audits/insights/image-delivery-insight.js +0 -5
  60. package/core/audits/insights/insight-audit.js +12 -1
  61. package/core/audits/non-composited-animations.d.ts +1 -0
  62. package/core/audits/non-composited-animations.js +43 -5
  63. package/core/lib/bf-cache-strings.js +5 -0
  64. package/core/lib/deprecations-strings.d.ts +54 -74
  65. package/core/lib/deprecations-strings.js +7 -29
  66. package/dist/report/bundle.esm.js +10 -10
  67. package/dist/report/flow.js +13 -13
  68. package/dist/report/standalone.js +11 -11
  69. package/package.json +19 -27
  70. package/shared/localization/locales/ar-XB.json +95 -20
  71. package/shared/localization/locales/ar.json +95 -20
  72. package/shared/localization/locales/bg.json +84 -9
  73. package/shared/localization/locales/ca.json +84 -9
  74. package/shared/localization/locales/cs.json +84 -9
  75. package/shared/localization/locales/da.json +84 -9
  76. package/shared/localization/locales/de.json +83 -8
  77. package/shared/localization/locales/el.json +85 -10
  78. package/shared/localization/locales/en-GB.json +83 -8
  79. package/shared/localization/locales/en-US.json +3 -6
  80. package/shared/localization/locales/en-XL.json +3 -6
  81. package/shared/localization/locales/es-419.json +83 -8
  82. package/shared/localization/locales/es.json +84 -9
  83. package/shared/localization/locales/fi.json +83 -8
  84. package/shared/localization/locales/fil.json +84 -9
  85. package/shared/localization/locales/fr.json +84 -9
  86. package/shared/localization/locales/he.json +105 -30
  87. package/shared/localization/locales/hi.json +84 -9
  88. package/shared/localization/locales/hr.json +84 -9
  89. package/shared/localization/locales/hu.json +84 -9
  90. package/shared/localization/locales/id.json +84 -9
  91. package/shared/localization/locales/it.json +83 -8
  92. package/shared/localization/locales/ja.json +84 -9
  93. package/shared/localization/locales/ko.json +84 -9
  94. package/shared/localization/locales/lt.json +84 -9
  95. package/shared/localization/locales/lv.json +84 -9
  96. package/shared/localization/locales/nl.json +83 -8
  97. package/shared/localization/locales/no.json +84 -9
  98. package/shared/localization/locales/pl.json +83 -8
  99. package/shared/localization/locales/pt-PT.json +84 -9
  100. package/shared/localization/locales/pt.json +84 -9
  101. package/shared/localization/locales/ro.json +84 -9
  102. package/shared/localization/locales/ru.json +84 -9
  103. package/shared/localization/locales/sk.json +83 -8
  104. package/shared/localization/locales/sl.json +84 -9
  105. package/shared/localization/locales/sr-Latn.json +85 -10
  106. package/shared/localization/locales/sr.json +85 -10
  107. package/shared/localization/locales/sv.json +84 -9
  108. package/shared/localization/locales/ta.json +84 -9
  109. package/shared/localization/locales/te.json +83 -8
  110. package/shared/localization/locales/th.json +92 -17
  111. package/shared/localization/locales/tr.json +84 -9
  112. package/shared/localization/locales/uk.json +84 -9
  113. package/shared/localization/locales/vi.json +83 -8
  114. package/shared/localization/locales/zh-HK.json +84 -9
  115. package/shared/localization/locales/zh-TW.json +84 -9
  116. package/shared/localization/locales/zh.json +85 -10
  117. package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +0 -1
  118. package/cli/test/smokehouse/core-tests.js +0 -140
  119. package/types/internal/node-fetch.d.ts +0 -4
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that checks if the document has a main landmark. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that checks if the document has a main landmark. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Document has a main landmark.',
18
- /** Title of an accesibility audit that checks if the document has a main landmark. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that checks if the document has a main landmark. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'Document does not have a main landmark.',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'One main landmark helps screen reader users navigate a web page. ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all link elements can be distinguished without relying on color. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all link elements can be distinguished without relying on color. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Links are distinguishable without relying on color.',
18
- /** Title of an accesibility audit that evaluates if all link elements can be distinguished without relying on color. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if all link elements can be distinguished without relying on color. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'Links rely on color to be distinguishable.',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Low-contrast text is difficult or impossible for many users to read. Link text ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all link elements have a non-generic name to screen readers. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all link elements have a non-generic name to screen readers. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Links have a discernible name',
18
- /** Title of an accesibility audit that evaluates if all link elements have a non-generic name to screen readers. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if all link elements have a non-generic name to screen readers. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'Links do not have a discernible name',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Link text (and alternate text for images, when used as links) that is ' +
@@ -13,10 +13,10 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all list elements have a valid structure containing only list items. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all list elements have a valid structure containing only list items. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Lists contain only `<li>` elements and script supporting elements ' +
18
18
  '(`<script>` and `<template>`).',
19
- /** Title of an accesibility audit that evaluates if all list elements have a valid structure containing only list items. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
+ /** Title of an accessibility audit that evaluates if all list elements have a valid structure containing only list items. 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: 'Lists do not contain only `<li>` elements and script ' +
21
21
  'supporting elements (`<script>` and `<template>`).',
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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** 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. */
16
+ /** Title of an accessibility 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. */
17
17
  title: 'List items (`<li>`) are contained within `<ul>`, `<ol>` or `<menu>` parent elements',
18
- /** 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. */
18
+ /** Title of an accessibility 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. */
19
19
  failureTitle: 'List items (`<li>`) are not contained within `<ul>`, ' +
20
20
  '`<ol>` or `<menu>` parent elements.',
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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if the page uses a meta tag that refreshes the page automatically. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if the page uses a meta tag that refreshes the page automatically. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'The document does not use `<meta http-equiv="refresh">`',
18
- /** Title of an accesibility audit that evaluates if the page uses a meta tag that refreshes the page automatically. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if the page uses a meta tag that refreshes the page automatically. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'The document uses `<meta http-equiv="refresh">`',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Users do not expect a page to refresh automatically, and doing so will move ' +
@@ -13,10 +13,10 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if the page has limited the scaling properties of the page in a way that harms users with low vision. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if the page has limited the scaling properties of the page in a way that harms users with low vision. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: '`[user-scalable="no"]` is not used in the `<meta name="viewport">` ' +
18
18
  'element and the `[maximum-scale]` attribute is not less than 5.',
19
- /** Title of an accesibility audit that evaluates if the page has limited the scaling properties of the page in a way that harms users with low vision. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
+ /** Title of an accessibility audit that evaluates if the page has limited the scaling properties of the page in a way that harms users with low vision. 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: '`[user-scalable="no"]` is used in the `<meta name="viewport">` ' +
21
21
  'element or the `[maximum-scale]` attribute is less than 5.',
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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all object elements have an alt HTML attribute that describes their contents. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all object elements have an alt HTML attribute that describes their contents. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: '`<object>` elements have alternate text',
18
- /** Title of an accesibility audit that evaluates if all object elements have an alt HTML attribute that describes their contents. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if all object elements have an alt HTML attribute that describes their contents. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: '`<object>` elements do not have alternate text',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Screen readers cannot translate non-text content. Adding alternate text to ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all select elements have programmatically associated label elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all select elements have programmatically associated label elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Select elements have associated label elements.',
18
- /** Title of an accesibility audit that evaluates if all select elements have programmatically associated 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. */
18
+ /** Title of an accessibility audit that evaluates if all select elements have programmatically associated 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. */
19
19
  failureTitle: 'Select elements do not have associated label elements.',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Form elements without effective labels can create frustrating experiences ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if the skip link is focusable. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if the skip link is focusable. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Skip links are focusable.',
18
- /** Title of an accesibility audit that evaluates if the skip link is focusable. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if the skip link is focusable. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'Skip links are not focusable.',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Including a skip link can help users skip to the main content to save time. ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if any elements have custom tabindex HTML attributes that might frustrate users of assitive technology. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if any elements have custom tabindex HTML attributes that might frustrate users of assitive technology. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'No element has a `[tabindex]` value greater than 0',
18
- /** Title of an accesibility audit that evaluates if any elements have custom tabindex HTML attributes that might frustrate users of assitive technology. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if any elements have custom tabindex HTML attributes that might frustrate users of assitive technology. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'Some elements have a `[tabindex]` value greater than 0',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'A value greater than 0 implies an explicit navigation ordering. ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if tables have different content in the summary attribute and caption element. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if tables have different content in the summary attribute and caption element. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Tables have different content in the summary attribute and `<caption>`.',
18
- /** Title of an accesibility audit that evaluates if tables have different content in the summary attribute and caption element. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if tables have different content in the summary attribute and caption element. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'Tables have the same content in the summary attribute and `<caption>.`',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'The summary attribute should describe the table structure, while `<caption>` ' +
@@ -13,10 +13,10 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all tables use caption instead of colspan to indicate a caption. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all tables use caption instead of colspan to indicate a caption. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Tables use `<caption>` instead of cells with the `[colspan]` attribute to indicate a ' +
18
18
  'caption.',
19
- /** Title of an accesibility audit that evaluates if all tables use caption instead of colspan to indicate a caption. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
+ /** Title of an accessibility audit that evaluates if all tables use caption instead of colspan to indicate a caption. 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: 'Tables do not use `<caption>` instead of cells with the `[colspan]` attribute ' +
21
21
  'to indicate a caption.',
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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that checks if all touch targets have sufficient size and spacing. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that checks if all touch targets have sufficient size and spacing. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: 'Touch targets have sufficient size and spacing.',
18
- /** Title of an accesibility audit that checks if all touch targets have sufficient size and spacing. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that checks if all touch targets have sufficient size and spacing. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: 'Touch targets do not have sufficient size or spacing.',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Touch targets with sufficient size and spacing help users who may have ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all large table elements use the headers HTML attribute. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all large table elements use the headers HTML attribute. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: '`<td>` elements in a large `<table>` have one or more table headers.',
18
- /** Title of an accesibility audit that evaluates if all large table elements use the headers HTML attribute. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if all large table elements use the headers HTML attribute. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: '`<td>` elements in a large `<table>` do not have table headers.',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Screen readers have features to make navigating tables easier. Ensuring ' +
@@ -14,10 +14,10 @@ import AxeAudit from './axe-audit.js';
14
14
  import * as i18n from '../../lib/i18n/i18n.js';
15
15
 
16
16
  const UIStrings = {
17
- /** Title of an accesibility audit that evaluates if all table cell elements in a table that use the headers HTML attribute use it correctly to refer to header cells within the same table. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
+ /** Title of an accessibility audit that evaluates if all table cell elements in a table that use the headers HTML attribute use it correctly to refer to header cells within the same table. This title is descriptive of the successful state and is shown to users when no user action is required. */
18
18
  title: 'Cells in a `<table>` element that use the `[headers]` attribute refer ' +
19
19
  'to table cells within the same table.',
20
- /** Title of an accesibility audit that evaluates if all table cell elements in a table that use the headers HTML attribute use it correctly to refer to header cells within the same table. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
20
+ /** Title of an accessibility audit that evaluates if all table cell elements in a table that use the headers HTML attribute use it correctly to refer to header cells within the same table. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
21
21
  failureTitle: 'Cells in a `<table>` element that use the `[headers]` attribute refer ' +
22
22
  'to an element `id` not found within the same table.',
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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
@@ -13,10 +13,10 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all table header elements have children. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all table header elements have children. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: '`<th>` elements and elements with `[role="columnheader"/"rowheader"]` have ' +
18
18
  'data cells they describe.',
19
- /** Title of an accesibility audit that evaluates if all table header elements have children. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
+ /** Title of an accessibility audit that evaluates if all table header elements have children. 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: '`<th>` elements and elements with ' +
21
21
  '`[role="columnheader"/"rowheader"]` do not have data cells they describe.',
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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all lang HTML attributes are valid BCP 47 languages. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all lang HTML attributes are valid BCP 47 languages. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: '`[lang]` attributes have a valid value',
18
- /** Title of an accesibility audit that evaluates if all lang HTML attributes are valid BCP 47 languages. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if all lang HTML attributes are valid BCP 47 languages. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: '`[lang]` attributes do not have a valid value',
20
20
  /** 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
21
  description: 'Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) ' +
@@ -13,9 +13,9 @@ import AxeAudit from './axe-audit.js';
13
13
  import * as i18n from '../../lib/i18n/i18n.js';
14
14
 
15
15
  const UIStrings = {
16
- /** Title of an accesibility audit that evaluates if all video elements contain a child track element that has captions describing their audio. This title is descriptive of the successful state and is shown to users when no user action is required. */
16
+ /** Title of an accessibility audit that evaluates if all video elements contain a child track element that has captions describing their audio. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
17
  title: '`<video>` elements contain a `<track>` element with `[kind="captions"]`',
18
- /** Title of an accesibility audit that evaluates if all video elements contain a child track element that has captions describing their audio. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
18
+ /** Title of an accessibility audit that evaluates if all video elements contain a child track element that has captions describing their audio. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
19
  failureTitle: '`<video>` elements do not contain a `<track>` element ' +
20
20
  'with `[kind="captions"]`.',
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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
@@ -14,6 +14,10 @@ import log from 'lighthouse-logger';
14
14
  import {Audit} from './audit.js';
15
15
  import {JSBundles} from '../computed/js-bundles.js';
16
16
  import * as i18n from '../lib/i18n/i18n.js';
17
+ import {Util} from '../../shared/util.js';
18
+
19
+ const KB = 1024;
20
+ const MAX_CONSOLE_ERRORS = 1000;
17
21
 
18
22
  const UIStrings = {
19
23
  /** Title of a Lighthouse audit that provides detail on browser errors. This descriptive title is shown to users when no browser errors were logged into the devtools console. */
@@ -90,10 +94,10 @@ class ErrorLogs extends Audit {
90
94
  const bundle = bundles.find(bundle => bundle.script.scriptId === item.scriptId);
91
95
  return {
92
96
  source: item.source,
93
- description: item.text,
97
+ description: item.text ? Util.truncate(item.text, 10 * KB) : undefined,
94
98
  sourceLocation: Audit.makeSourceLocationFromConsoleMessage(item, bundle),
95
99
  };
96
- });
100
+ }).slice(0, MAX_CONSOLE_ERRORS);
97
101
 
98
102
  const tableRows = ErrorLogs.filterAccordingToOptions(consoleRows, auditOptions)
99
103
  .sort((a, b) => (a.description || '').localeCompare(b.description || ''));
@@ -46,11 +46,6 @@ class ImageDeliveryInsight extends Audit {
46
46
  */
47
47
  static async audit(artifacts, context) {
48
48
  return adaptInsightToAuditProduct(artifacts, context, 'ImageDelivery', (insight) => {
49
- if (!insight.optimizableImages.length) {
50
- // TODO: show UIStrings.noOptimizableImages?
51
- return;
52
- }
53
-
54
49
  /** @type {LH.Audit.Details.Table['headings']} */
55
50
  const headings = [
56
51
  /* eslint-disable max-len */
@@ -79,7 +79,7 @@ async function adaptInsightToAuditProduct(artifacts, context, insightName, creat
79
79
  details = cbResult;
80
80
  }
81
81
 
82
- if (!details || (details.type === 'table' && details.items.length === 0)) {
82
+ if (!details) {
83
83
  return {
84
84
  scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
85
85
  score: null,
@@ -94,6 +94,17 @@ async function adaptInsightToAuditProduct(artifacts, context, insightName, creat
94
94
  details.debugData.wastedBytes = insight.wastedBytes;
95
95
  }
96
96
 
97
+ // TODO: FontDisplay insight (and maybe others) can return -Infinity savings when
98
+ // passing. That's weird. For now, just delete those.
99
+ if (insight.metricSavings) {
100
+ for (const [metric, value] of Object.entries(insight.metricSavings)) {
101
+ if (!Number.isFinite(value)) {
102
+ // @ts-expect-error
103
+ delete insight.metricSavings[metric];
104
+ }
105
+ }
106
+ }
107
+
97
108
  // This hack is to add metric adorners if an insight category links it to a metric,
98
109
  // but doesn't output a metric savings for that metric.
99
110
  let metricSavings = insight.metricSavings;
@@ -11,6 +11,7 @@ export namespace UIStrings {
11
11
  let description: string;
12
12
  let displayValue: string;
13
13
  let unsupportedCSSProperty: string;
14
+ let unsupportedCustomCSSProperty: string;
14
15
  let transformDependsBoxSize: string;
15
16
  let filterMayMovePixels: string;
16
17
  let nonReplaceCompositeMode: string;
@@ -32,6 +32,14 @@ const UIStrings = {
32
32
  =1 {Unsupported CSS Property: {properties}}
33
33
  other {Unsupported CSS Properties: {properties}}
34
34
  }`,
35
+ /**
36
+ * @description [ICU Syntax] Descriptive reason for why a user-provided animation failed to be optimized by the browser due to custom CSS properties (CSS variables) not being supported on the compositor. Shown in a table with a list of other potential failure reasons.
37
+ * @example {--swing-y, --rotation} properties
38
+ */
39
+ unsupportedCustomCSSProperty: `{propertyCount, plural,
40
+ =1 {Custom CSS properties cannot be animated on the compositor: {properties}}
41
+ other {Custom CSS properties cannot be animated on the compositor: {properties}}
42
+ }`,
35
43
  /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to a `transform` property being dependent on the size of the element itself. Shown in a table with a list of other potential failure reasons. */
36
44
  transformDependsBoxSize: 'Transform-related property depends on box size',
37
45
  /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to a `filter` property possibly moving pixels. Shown in a table with a list of other potential failure reasons. */
@@ -90,14 +98,44 @@ function getActionableFailureReasons(failureCode, unsupportedProperties) {
90
98
  return ACTIONABLE_FAILURE_REASONS
91
99
  .filter(reason => failureCode & reason.flag)
92
100
  .map(reason => {
101
+ // Handle both regular CSS properties and custom CSS properties
93
102
  if (reason.text === UIStrings.unsupportedCSSProperty) {
94
- return str_(reason.text, {
95
- propertyCount: unsupportedProperties.length,
96
- properties: unsupportedProperties.join(', '),
97
- });
103
+ const customProperties = new Set();
104
+ const nonCustomProperties = new Set();
105
+
106
+ // Separate custom properties (starting with '--') from regular properties
107
+ for (const property of unsupportedProperties) {
108
+ if (property.startsWith('--')) {
109
+ customProperties.add(property);
110
+ } else {
111
+ nonCustomProperties.add(property);
112
+ }
113
+ }
114
+
115
+ const reasons = [];
116
+
117
+ // Add regular CSS properties message if any exist
118
+ if (nonCustomProperties.size > 0) {
119
+ reasons.push(str_(UIStrings.unsupportedCSSProperty, {
120
+ propertyCount: nonCustomProperties.size,
121
+ properties: Array.from(nonCustomProperties).join(', '),
122
+ }));
123
+ }
124
+
125
+ // Add custom CSS properties message if any exist
126
+ if (customProperties.size > 0) {
127
+ reasons.push(str_(UIStrings.unsupportedCustomCSSProperty, {
128
+ propertyCount: customProperties.size,
129
+ properties: Array.from(customProperties).join(', '),
130
+ }));
131
+ }
132
+
133
+ return reasons;
98
134
  }
135
+
99
136
  return str_(reason.text);
100
- });
137
+ })
138
+ .flat(); // Flatten array since we might return multiple messages for unsupported properties
101
139
  }
102
140
 
103
141
  class NonCompositedAnimations extends Audit {
@@ -284,6 +284,10 @@ const UIStrings = {
284
284
  * @description Description text for not restored reason SharedWorker.
285
285
  */
286
286
  sharedWorker: 'Pages that use SharedWorker are not currently eligible for back/forward cache.',
287
+ /**
288
+ * @description Description text for not restored reason SharedWorkerMessage.
289
+ */
290
+ sharedWorkerMessage: 'The page was evicted from the cache because it received a message from a SharedWorker',
287
291
  /**
288
292
  * @description Description text for not restored reason WebLocks.
289
293
  */
@@ -626,6 +630,7 @@ const NotRestoredReasonDescription = {
626
630
  IndexedDBConnection: {name: str_(UIStrings.indexedDBConnection)},
627
631
  WebXR: {name: str_(UIStrings.webXR)},
628
632
  SharedWorker: {name: str_(UIStrings.sharedWorker)},
633
+ SharedWorkerMessage: {name: str_(UIStrings.sharedWorkerMessage)},
629
634
  WebLocks: {name: str_(UIStrings.webLocks)},
630
635
  WebHID: {name: str_(UIStrings.webHID)},
631
636
  WebShare: {name: str_(UIStrings.webShare)},