lighthouse 13.4.1 → 13.5.0
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/build-tracker.config.js +1 -1
- package/cli/test/smokehouse/lighthouse-runners/bundle.js +3 -3
- package/cli/test/smokehouse/lighthouse-runners/devtools-mcp.js +2 -1
- package/core/audits/accessibility/accesskeys.js +1 -1
- package/core/audits/accessibility/aria-allowed-attr.js +1 -1
- package/core/audits/accessibility/aria-allowed-role.js +1 -1
- package/core/audits/accessibility/aria-command-name.js +1 -1
- package/core/audits/accessibility/aria-conditional-attr.js +1 -1
- package/core/audits/accessibility/aria-deprecated-role.js +1 -1
- package/core/audits/accessibility/aria-dialog-name.js +1 -1
- package/core/audits/accessibility/aria-hidden-body.js +1 -1
- package/core/audits/accessibility/aria-hidden-focus.js +1 -1
- package/core/audits/accessibility/aria-input-field-name.js +1 -1
- package/core/audits/accessibility/aria-meter-name.js +1 -1
- package/core/audits/accessibility/aria-progressbar-name.js +1 -1
- package/core/audits/accessibility/aria-prohibited-attr.js +1 -1
- package/core/audits/accessibility/aria-required-attr.js +1 -1
- package/core/audits/accessibility/aria-required-children.js +1 -1
- package/core/audits/accessibility/aria-required-parent.js +1 -1
- package/core/audits/accessibility/aria-roles.js +1 -1
- package/core/audits/accessibility/aria-text.js +1 -1
- package/core/audits/accessibility/aria-toggle-field-name.js +1 -1
- package/core/audits/accessibility/aria-tooltip-name.js +1 -1
- package/core/audits/accessibility/aria-treeitem-name.js +1 -1
- package/core/audits/accessibility/aria-valid-attr-value.js +1 -1
- package/core/audits/accessibility/aria-valid-attr.js +1 -1
- package/core/audits/accessibility/autocomplete-valid.js +1 -1
- package/core/audits/accessibility/button-name.js +1 -1
- package/core/audits/accessibility/bypass.js +1 -1
- package/core/audits/accessibility/color-contrast.js +1 -1
- package/core/audits/accessibility/definition-list.js +1 -1
- package/core/audits/accessibility/dlitem.js +1 -1
- package/core/audits/accessibility/document-title.js +1 -1
- package/core/audits/accessibility/duplicate-id-aria.js +1 -1
- package/core/audits/accessibility/empty-heading.js +1 -1
- package/core/audits/accessibility/form-field-multiple-labels.js +1 -1
- package/core/audits/accessibility/frame-title.js +1 -1
- package/core/audits/accessibility/heading-order.js +1 -1
- package/core/audits/accessibility/html-has-lang.js +1 -1
- package/core/audits/accessibility/html-lang-valid.js +1 -1
- package/core/audits/accessibility/html-xml-lang-mismatch.js +1 -1
- package/core/audits/accessibility/identical-links-same-purpose.js +1 -1
- package/core/audits/accessibility/image-alt.js +1 -1
- package/core/audits/accessibility/image-redundant-alt.js +1 -1
- package/core/audits/accessibility/input-button-name.js +1 -1
- package/core/audits/accessibility/input-image-alt.js +1 -1
- package/core/audits/accessibility/label-content-name-mismatch.js +1 -1
- package/core/audits/accessibility/label.js +1 -1
- package/core/audits/accessibility/landmark-one-main.js +1 -1
- package/core/audits/accessibility/link-in-text-block.js +1 -1
- package/core/audits/accessibility/link-name.js +1 -1
- package/core/audits/accessibility/list.js +1 -1
- package/core/audits/accessibility/listitem.js +1 -1
- package/core/audits/accessibility/meta-refresh.js +1 -1
- package/core/audits/accessibility/meta-viewport.js +1 -1
- package/core/audits/accessibility/object-alt.js +1 -1
- package/core/audits/accessibility/presentation-role-conflict.js +1 -1
- package/core/audits/accessibility/select-name.js +1 -1
- package/core/audits/accessibility/skip-link.js +1 -1
- package/core/audits/accessibility/svg-img-alt.js +1 -1
- package/core/audits/accessibility/tabindex.js +1 -1
- package/core/audits/accessibility/table-duplicate-name.js +1 -1
- package/core/audits/accessibility/table-fake-caption.js +1 -1
- package/core/audits/accessibility/target-size.js +1 -1
- package/core/audits/accessibility/td-has-header.js +1 -1
- package/core/audits/accessibility/td-headers-attr.js +1 -1
- package/core/audits/accessibility/th-has-data-cells.js +1 -1
- package/core/audits/accessibility/valid-lang.js +1 -1
- package/core/audits/accessibility/video-caption.js +1 -1
- package/core/audits/agentic/ard-schema.d.ts +19 -0
- package/core/audits/agentic/ard-schema.js +135 -0
- package/core/audits/baseline.d.ts +23 -10
- package/core/audits/deprecations.js +1 -2
- package/core/audits/webmcp-form-coverage.js +3 -1
- package/core/audits/webmcp-registered-tools.d.ts +2 -0
- package/core/audits/webmcp-registered-tools.js +16 -1
- package/core/audits/webmcp-schema-validity.js +1 -1
- package/core/computed/metrics/interactive.js +1 -1
- package/core/computed/metrics/lantern-metric.js +1 -1
- package/core/computed/trace-engine-result.d.ts +3 -3
- package/core/computed/trace-engine-result.js +4 -4
- package/core/computed/unused-javascript-summary.d.ts +0 -1
- package/core/computed/unused-javascript-summary.js +0 -1
- package/core/config/agentic-browsing-config.d.ts +2 -0
- package/core/config/agentic-browsing-config.js +13 -1
- package/core/config/default-config.js +13 -1
- package/core/config/validation.js +6 -0
- package/core/gather/driver/execution-context.js +0 -2
- package/core/gather/driver/navigation.d.ts +1 -0
- package/core/gather/driver/navigation.js +35 -7
- package/core/gather/driver/wait-for-condition.d.ts +5 -7
- package/core/gather/driver/wait-for-condition.js +15 -9
- package/core/gather/fetcher.d.ts +9 -2
- package/core/gather/fetcher.js +30 -4
- package/core/gather/gatherers/accessibility.js +1 -3
- package/core/gather/gatherers/agentic/ard.d.ts +30 -0
- package/core/gather/gatherers/agentic/ard.js +125 -0
- package/core/gather/gatherers/anchor-elements.js +0 -2
- package/core/gather/gatherers/full-page-screenshot.js +0 -4
- package/core/gather/gatherers/iframe-elements.js +0 -2
- package/core/gather/gatherers/image-elements.js +1 -13
- package/core/gather/gatherers/inputs.js +0 -2
- package/core/gather/gatherers/link-elements.js +0 -2
- package/core/gather/gatherers/meta-elements.js +0 -3
- package/core/gather/gatherers/seo/robots-txt.d.ts +1 -0
- package/core/gather/gatherers/seo/robots-txt.js +3 -0
- package/core/gather/gatherers/stacks.d.ts +1 -1
- package/core/gather/gatherers/stacks.js +1 -3
- package/core/gather/gatherers/trace-elements.js +1 -3
- package/core/gather/gatherers/viewport-dimensions.js +0 -2
- package/core/gather/navigation-runner.d.ts +3 -1
- package/core/gather/navigation-runner.js +6 -3
- package/core/gather/session.js +1 -0
- package/core/index.cjs +5 -5
- package/core/index.d.cts +5 -5
- package/core/lib/arbitrary-equality-map.d.ts +2 -2
- package/core/lib/arbitrary-equality-map.js +1 -1
- package/core/lib/baseline/web-features-data.json +52 -28
- package/core/lib/baseline/web-features-metadata.json +1 -1
- package/core/lib/deprecation-description.js +1 -1
- package/core/lib/page-functions.d.ts +0 -3
- package/core/lib/page-functions.js +0 -3
- package/core/lib/rect-helpers.js +0 -8
- package/core/runner.js +21 -0
- package/core/user-flow.d.ts +3 -0
- package/core/user-flow.js +12 -0
- package/dist/report/bundle.esm.js +10 -3
- package/dist/report/flow.js +20 -13
- package/dist/report/standalone.js +10 -3
- package/package.json +19 -14
- package/report/assets/styles.css +7 -0
- package/report/renderer/components.js +1 -1
- package/report/renderer/details-renderer.js +7 -5
- package/report/renderer/drop-down-menu.d.ts +2 -2
- package/report/renderer/drop-down-menu.js +1 -1
- package/report/renderer/report-renderer.js +24 -3
- package/report/renderer/report-utils.js +1 -1
- package/report/renderer/snippet-renderer.d.ts +4 -4
- package/report/renderer/snippet-renderer.js +3 -3
- package/report/renderer/text-encoding.js +2 -2
- package/shared/localization/locales/ar-XB.json +111 -72
- package/shared/localization/locales/ar.json +113 -74
- package/shared/localization/locales/bg.json +112 -73
- package/shared/localization/locales/ca.json +112 -73
- package/shared/localization/locales/cs.json +112 -73
- package/shared/localization/locales/da.json +112 -73
- package/shared/localization/locales/de.json +112 -73
- package/shared/localization/locales/el.json +112 -73
- package/shared/localization/locales/en-GB.json +111 -72
- package/shared/localization/locales/en-US.json +102 -66
- package/shared/localization/locales/en-XA.json +111 -72
- package/shared/localization/locales/en-XL.json +102 -66
- package/shared/localization/locales/es-419.json +112 -73
- package/shared/localization/locales/es.json +112 -73
- package/shared/localization/locales/fi.json +112 -73
- package/shared/localization/locales/fil.json +112 -73
- package/shared/localization/locales/fr.json +112 -73
- package/shared/localization/locales/he.json +112 -73
- package/shared/localization/locales/hi.json +112 -73
- package/shared/localization/locales/hr.json +112 -73
- package/shared/localization/locales/hu.json +112 -73
- package/shared/localization/locales/id.json +112 -73
- package/shared/localization/locales/it.json +113 -74
- package/shared/localization/locales/ja.json +112 -73
- package/shared/localization/locales/ko.json +112 -73
- package/shared/localization/locales/lt.json +112 -73
- package/shared/localization/locales/lv.json +112 -73
- package/shared/localization/locales/nl.json +112 -73
- package/shared/localization/locales/no.json +112 -73
- package/shared/localization/locales/pl.json +112 -73
- package/shared/localization/locales/pt-PT.json +112 -73
- package/shared/localization/locales/pt.json +112 -73
- package/shared/localization/locales/ro.json +112 -73
- package/shared/localization/locales/ru.json +112 -73
- package/shared/localization/locales/sk.json +112 -73
- package/shared/localization/locales/sl.json +112 -73
- package/shared/localization/locales/sr-Latn.json +112 -73
- package/shared/localization/locales/sr.json +112 -73
- package/shared/localization/locales/sv.json +124 -85
- package/shared/localization/locales/ta.json +112 -73
- package/shared/localization/locales/te.json +112 -73
- package/shared/localization/locales/th.json +112 -73
- package/shared/localization/locales/tr.json +113 -74
- package/shared/localization/locales/uk.json +112 -73
- package/shared/localization/locales/vi.json +112 -73
- package/shared/localization/locales/zh-HK.json +112 -73
- package/shared/localization/locales/zh-TW.json +113 -74
- package/shared/localization/locales/zh.json +113 -74
- package/shared/util.d.ts +6 -0
- package/shared/util.js +9 -0
- package/third-party/ard/LICENSE +201 -0
- package/third-party/ard/README.md +27 -0
- package/third-party/ard/ard-test.d.ts +2 -0
- package/third-party/ard/ard-test.js +358 -0
- package/third-party/ard/ard.d.ts +34 -0
- package/third-party/ard/ard.js +204 -0
- package/third-party/ard/schema-validator.d.ts +20 -0
- package/third-party/ard/schema-validator.js +1700 -0
- package/third-party/ard/spec/schemas/ai-catalog.schema.json +292 -0
- package/tsconfig.json +1 -0
- package/types/artifacts.d.ts +14 -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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
22
22
|
description: 'Screen readers require list items (`<li>`) to be contained within a ' +
|
|
23
23
|
'parent `<ul>`, `<ol>` or `<menu>` to be announced properly. ' +
|
|
24
|
-
'[Learn more about proper list structure](https://dequeuniversity.com/rules/axe/4.
|
|
24
|
+
'[Learn more about proper list structure](https://dequeuniversity.com/rules/axe/4.13/listitem).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
description: 'Users do not expect a page to refresh automatically, and doing so will move ' +
|
|
22
22
|
'focus back to the top of the page. This may create a frustrating or ' +
|
|
23
23
|
'confusing experience. ' +
|
|
24
|
-
'[Learn more about the refresh meta tag](https://dequeuniversity.com/rules/axe/4.
|
|
24
|
+
'[Learn more about the refresh meta tag](https://dequeuniversity.com/rules/axe/4.13/meta-refresh).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createIcuMessageFn(import.meta.url, 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
23
23
|
description: 'Disabling zooming is problematic for users with low vision who rely on ' +
|
|
24
24
|
'screen magnification to properly see the contents of a web page. ' +
|
|
25
|
-
'[Learn more about the viewport meta tag](https://dequeuniversity.com/rules/axe/4.
|
|
25
|
+
'[Learn more about the viewport meta tag](https://dequeuniversity.com/rules/axe/4.13/meta-viewport).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
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 ' +
|
|
22
22
|
'`<object>` elements helps screen readers convey meaning to users. ' +
|
|
23
|
-
'[Learn more about alt text for `object` elements](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn more about alt text for `object` elements](https://dequeuniversity.com/rules/axe/4.13/object-alt).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -22,7 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
'or `role="presentation"` does not resolve to none or presentation. To ensure the ' +
|
|
23
23
|
'element remains removed from the accessibility tree, you should not add any global ' +
|
|
24
24
|
'ARIA attributes to the element or make it focusable. ' +
|
|
25
|
-
'[Learn more about presentation role conflict](https://dequeuniversity.com/rules/axe/4.
|
|
25
|
+
'[Learn more about presentation role conflict](https://dequeuniversity.com/rules/axe/4.13/presentation-role-conflict).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
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 ' +
|
|
22
22
|
'for screen reader users. ' +
|
|
23
|
-
'[Learn more about the `select` element](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn more about the `select` element](https://dequeuniversity.com/rules/axe/4.13/select-name).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
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. ' +
|
|
22
|
-
'[Learn more about skip links](https://dequeuniversity.com/rules/axe/4.
|
|
22
|
+
'[Learn more about skip links](https://dequeuniversity.com/rules/axe/4.13/skip-link).',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
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: 'Ensures SVG elements with an `img`, `graphics-document` or `graphics-symbol` ' +
|
|
22
22
|
'role have an accessible text alternative. ' +
|
|
23
|
-
'[Learn more about SVG alt text](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn more about SVG alt text](https://dequeuniversity.com/rules/axe/4.13/svg-img-alt).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
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. ' +
|
|
22
22
|
'Although technically valid, this often creates frustrating experiences ' +
|
|
23
|
-
'for users who rely on assistive technologies. [Learn more about the `tabindex` attribute](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'for users who rely on assistive technologies. [Learn more about the `tabindex` attribute](https://dequeuniversity.com/rules/axe/4.13/tabindex).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
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>` ' +
|
|
22
22
|
'should have the onscreen title. Accurate table mark-up helps users of screen readers. ' +
|
|
23
|
-
'[Learn more about summary and caption](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn more about summary and caption](https://dequeuniversity.com/rules/axe/4.13/table-duplicate-name).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
description: 'Screen readers have features to make navigating tables easier. Ensuring ' +
|
|
24
24
|
'that tables use the actual caption element instead of cells with the `[colspan]` ' +
|
|
25
25
|
'attribute may improve the experience for screen reader users. ' +
|
|
26
|
-
'[Learn more about captions](https://dequeuniversity.com/rules/axe/4.
|
|
26
|
+
'[Learn more about captions](https://dequeuniversity.com/rules/axe/4.13/table-fake-caption).',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
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 ' +
|
|
22
22
|
'difficulty targeting small controls to activate the targets. ' +
|
|
23
|
-
'[Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.13/target-size).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
description: 'Screen readers have features to make navigating tables easier. Ensuring ' +
|
|
22
22
|
'that `<td>` elements in a large table (3 or more cells in width and height) have an ' +
|
|
23
23
|
'associated table header may improve the experience for screen reader users. ' +
|
|
24
|
-
'[Learn more about table headers](https://dequeuniversity.com/rules/axe/4.
|
|
24
|
+
'[Learn more about table headers](https://dequeuniversity.com/rules/axe/4.13/td-has-header).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -24,7 +24,7 @@ const UIStrings = {
|
|
|
24
24
|
description: 'Screen readers have features to make navigating tables easier. Ensuring ' +
|
|
25
25
|
'`<td>` cells using the `[headers]` attribute only refer to other cells in the same ' +
|
|
26
26
|
'table may improve the experience for screen reader users. ' +
|
|
27
|
-
'[Learn more about the `headers` attribute](https://dequeuniversity.com/rules/axe/4.
|
|
27
|
+
'[Learn more about the `headers` attribute](https://dequeuniversity.com/rules/axe/4.13/td-headers-attr).',
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
description: 'Screen readers have features to make navigating tables easier. Ensuring ' +
|
|
24
24
|
'table headers always refer to some set of cells may improve the experience for screen ' +
|
|
25
25
|
'reader users. ' +
|
|
26
|
-
'[Learn more about table headers](https://dequeuniversity.com/rules/axe/4.
|
|
26
|
+
'[Learn more about table headers](https://dequeuniversity.com/rules/axe/4.13/th-has-data-cells).',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
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) ' +
|
|
22
22
|
'on elements helps ensure that text is pronounced correctly by a screen reader. ' +
|
|
23
|
-
'[Learn how to use the `lang` attribute](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn how to use the `lang` attribute](https://dequeuniversity.com/rules/axe/4.13/valid-lang).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, 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. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
22
22
|
description: 'When a video provides a caption it is easier for deaf and hearing impaired ' +
|
|
23
23
|
'users to access its information. ' +
|
|
24
|
-
'[Learn more about video captions](https://dequeuniversity.com/rules/axe/4.
|
|
24
|
+
'[Learn more about video captions](https://dequeuniversity.com/rules/axe/4.13/video-caption).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default ArdSchema;
|
|
2
|
+
declare class ArdSchema extends Audit {
|
|
3
|
+
/**
|
|
4
|
+
* @param {LH.Artifacts} artifacts
|
|
5
|
+
* @return {LH.Audit.Product}
|
|
6
|
+
*/
|
|
7
|
+
static audit(artifacts: LH.Artifacts): LH.Audit.Product;
|
|
8
|
+
}
|
|
9
|
+
export namespace UIStrings {
|
|
10
|
+
let title: string;
|
|
11
|
+
let failureTitle: string;
|
|
12
|
+
let description: string;
|
|
13
|
+
let explanation: string;
|
|
14
|
+
let columnIssue: string;
|
|
15
|
+
let columnSeverity: string;
|
|
16
|
+
let itemSeverityError: string;
|
|
17
|
+
}
|
|
18
|
+
import { Audit } from '../audit.js';
|
|
19
|
+
//# sourceMappingURL=ard-schema.d.ts.map
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Audit that validates ai-catalog.json manifests against the Agentic Resource Discovery (ARD) specification.
|
|
9
|
+
*
|
|
10
|
+
* This implementation is a direct JavaScript port of `validate_manifest` from the official ARD Conformance Test suite:
|
|
11
|
+
* @see https://github.com/ards-project/ard-spec/blob/main/conformance/bin/conformance-test
|
|
12
|
+
* @see https://agenticresourcediscovery.org/spec/
|
|
13
|
+
* @version ARD Spec 1.0 / ADR-0003
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import {Audit} from '../audit.js';
|
|
17
|
+
import * as i18n from '../../lib/i18n/i18n.js';
|
|
18
|
+
import {ConformanceTester} from '../../../third-party/ard/ard.js';
|
|
19
|
+
|
|
20
|
+
const UIStrings = {
|
|
21
|
+
/** Title of a Lighthouse audit that evaluates whether ai-catalog.json conforms to the ARD specification. Shown when valid. */
|
|
22
|
+
title: '`ai-catalog.json` schema is valid',
|
|
23
|
+
/** Title of a Lighthouse audit that evaluates whether ai-catalog.json conforms to the ARD specification. Shown when invalid. */
|
|
24
|
+
failureTitle: '`ai-catalog.json` schema is invalid',
|
|
25
|
+
/** Description of a Lighthouse audit that tells the user why ai-catalog.json must match the ARD specification. */
|
|
26
|
+
description: 'Valid `ai-catalog.json` manifests are required for autonomous ' +
|
|
27
|
+
'AI agents and registries to discover and verify your resources. ' +
|
|
28
|
+
'[Learn more about the ARD specification](https://agenticresourcediscovery.org/spec/).',
|
|
29
|
+
/** Explanatory message stating that ai-catalog.json could not be loaded for schema validation. */
|
|
30
|
+
explanation: 'Catalog file could not be loaded for schema validation.',
|
|
31
|
+
/** Header of the table column which displays the issue. */
|
|
32
|
+
columnIssue: 'Issue',
|
|
33
|
+
/** Header of the table column which displays the severity. */
|
|
34
|
+
columnSeverity: 'Severity',
|
|
35
|
+
/** Table item value for an error severity. */
|
|
36
|
+
itemSeverityError: 'Error',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
40
|
+
|
|
41
|
+
class ArdSchema extends Audit {
|
|
42
|
+
/**
|
|
43
|
+
* @return {LH.Audit.Meta}
|
|
44
|
+
*/
|
|
45
|
+
static get meta() {
|
|
46
|
+
return {
|
|
47
|
+
id: 'ard-schema',
|
|
48
|
+
title: str_(UIStrings.title),
|
|
49
|
+
failureTitle: str_(UIStrings.failureTitle),
|
|
50
|
+
description: str_(UIStrings.description),
|
|
51
|
+
requiredArtifacts: ['AgentResourceDiscovery'],
|
|
52
|
+
supportedModes: ['navigation', 'snapshot'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {LH.Artifacts} artifacts
|
|
58
|
+
* @return {LH.Audit.Product}
|
|
59
|
+
*/
|
|
60
|
+
static audit(artifacts) {
|
|
61
|
+
const ard = artifacts.AgentResourceDiscovery;
|
|
62
|
+
const signals = ard.discoverySignals;
|
|
63
|
+
|
|
64
|
+
const hasExplicitSignal = Boolean(
|
|
65
|
+
signals.robotsTxtAgentmap ||
|
|
66
|
+
signals.htmlLink ||
|
|
67
|
+
signals.httpHeaderLink
|
|
68
|
+
);
|
|
69
|
+
const hasCatalog = hasExplicitSignal || ard.status === 200;
|
|
70
|
+
|
|
71
|
+
if (!hasCatalog) {
|
|
72
|
+
return {
|
|
73
|
+
score: 1,
|
|
74
|
+
notApplicable: true,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (ard.status !== 200 || !ard.content) {
|
|
79
|
+
return {
|
|
80
|
+
score: 0,
|
|
81
|
+
explanation: str_(UIStrings.explanation),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const itemSeverityError = str_(UIStrings.itemSeverityError);
|
|
86
|
+
const itemSeverityLow = str_(i18n.UIStrings.itemSeverityLow);
|
|
87
|
+
|
|
88
|
+
/** @type {Array<{element: string, issue: string | LH.IcuMessage, severity: LH.IcuMessage}>} */
|
|
89
|
+
const issues = [];
|
|
90
|
+
|
|
91
|
+
/** @type {LH.Audit.Details.Table['headings']} */
|
|
92
|
+
const headings = [
|
|
93
|
+
{key: 'element', valueType: 'text', label: str_(i18n.UIStrings.columnElement)},
|
|
94
|
+
{key: 'issue', valueType: 'text', label: str_(UIStrings.columnIssue)},
|
|
95
|
+
{key: 'severity', valueType: 'text', label: str_(UIStrings.columnSeverity)},
|
|
96
|
+
];
|
|
97
|
+
|
|
98
|
+
const tester = new ConformanceTester();
|
|
99
|
+
tester.validate_manifest(ard.content, 'ai-catalog.json');
|
|
100
|
+
|
|
101
|
+
for (const err of tester.errors) {
|
|
102
|
+
issues.push({
|
|
103
|
+
element: err.element,
|
|
104
|
+
issue: err.message,
|
|
105
|
+
severity: itemSeverityError,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
for (const warn of tester.warnings) {
|
|
110
|
+
issues.push({
|
|
111
|
+
element: warn.element,
|
|
112
|
+
issue: warn.message,
|
|
113
|
+
severity: itemSeverityLow,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const hasErrors = issues.some(i => i.severity === itemSeverityError);
|
|
118
|
+
const hasLowSeverity = issues.some(i => i.severity === itemSeverityLow);
|
|
119
|
+
|
|
120
|
+
let score = 1;
|
|
121
|
+
if (hasErrors) {
|
|
122
|
+
score = 0;
|
|
123
|
+
} else if (hasLowSeverity) {
|
|
124
|
+
score = 0.9;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
score,
|
|
129
|
+
details: issues.length ? Audit.makeTableDetails(headings, issues) : undefined,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export default ArdSchema;
|
|
135
|
+
export {UIStrings};
|
|
@@ -34,6 +34,8 @@ declare class Baseline extends Audit {
|
|
|
34
34
|
"array-findlast": string;
|
|
35
35
|
"array-flat": string;
|
|
36
36
|
"array-from": string;
|
|
37
|
+
"array-fromasync": string;
|
|
38
|
+
"array-group": string;
|
|
37
39
|
"array-includes": string;
|
|
38
40
|
"array-isarray": string;
|
|
39
41
|
"array-iteration-methods": string;
|
|
@@ -51,6 +53,7 @@ declare class Baseline extends Audit {
|
|
|
51
53
|
"audio-worklet": string;
|
|
52
54
|
autofocus: string;
|
|
53
55
|
"autonomous-custom-elements": string;
|
|
56
|
+
avif: string;
|
|
54
57
|
b: string;
|
|
55
58
|
backdrop: string;
|
|
56
59
|
background: string;
|
|
@@ -99,6 +102,7 @@ declare class Baseline extends Audit {
|
|
|
99
102
|
"change-event": string;
|
|
100
103
|
"channel-messaging": string;
|
|
101
104
|
charset: string;
|
|
105
|
+
"check-visibility": string;
|
|
102
106
|
cite: string;
|
|
103
107
|
"class-syntax": string;
|
|
104
108
|
"clip-path": string;
|
|
@@ -148,6 +152,7 @@ declare class Baseline extends Audit {
|
|
|
148
152
|
"data-urls": string;
|
|
149
153
|
dataset: string;
|
|
150
154
|
date: string;
|
|
155
|
+
"declarative-shadow-dom": string;
|
|
151
156
|
"dedicated-workers": string;
|
|
152
157
|
default: string;
|
|
153
158
|
del: string;
|
|
@@ -186,6 +191,7 @@ declare class Baseline extends Audit {
|
|
|
186
191
|
"ext-blend-minmax": string;
|
|
187
192
|
"ext-color-buffer-float": string;
|
|
188
193
|
"ext-color-buffer-half-float": string;
|
|
194
|
+
"ext-shader-texture-lod": string;
|
|
189
195
|
"ext-srgb": string;
|
|
190
196
|
"ext-texture-filter-anisotropic": string;
|
|
191
197
|
fetch: string;
|
|
@@ -398,6 +404,7 @@ declare class Baseline extends Audit {
|
|
|
398
404
|
"oes-texture-float": string;
|
|
399
405
|
"oes-texture-float-linear": string;
|
|
400
406
|
"oes-texture-half-float": string;
|
|
407
|
+
"oes-texture-half-float-linear": string;
|
|
401
408
|
"oes-vertex-array-object": string;
|
|
402
409
|
"offline-audio-context": string;
|
|
403
410
|
"offscreen-canvas": string;
|
|
@@ -445,6 +452,7 @@ declare class Baseline extends Audit {
|
|
|
445
452
|
"promise-allsettled": string;
|
|
446
453
|
"promise-any": string;
|
|
447
454
|
"promise-finally": string;
|
|
455
|
+
"promise-withresolvers": string;
|
|
448
456
|
"proxy-reflect": string;
|
|
449
457
|
push: string;
|
|
450
458
|
q: string;
|
|
@@ -452,6 +460,7 @@ declare class Baseline extends Audit {
|
|
|
452
460
|
queuemicrotask: string;
|
|
453
461
|
quotes: string;
|
|
454
462
|
"read-write-pseudos": string;
|
|
463
|
+
"rect-xywh": string;
|
|
455
464
|
"referrer-policy": string;
|
|
456
465
|
regexp: string;
|
|
457
466
|
"relative-positioning": string;
|
|
@@ -568,6 +577,7 @@ declare class Baseline extends Audit {
|
|
|
568
577
|
title: string;
|
|
569
578
|
"title-attr": string;
|
|
570
579
|
"touch-action": string;
|
|
580
|
+
"transferable-arraybuffer": string;
|
|
571
581
|
transforms2d: string;
|
|
572
582
|
transforms3d: string;
|
|
573
583
|
transitions: string;
|
|
@@ -599,6 +609,7 @@ declare class Baseline extends Audit {
|
|
|
599
609
|
"wasm-bigint": string;
|
|
600
610
|
"wasm-bulk-memory": string;
|
|
601
611
|
"wasm-exception-handling": string;
|
|
612
|
+
"wasm-extended-constant-expressions": string;
|
|
602
613
|
"wasm-multi-value": string;
|
|
603
614
|
"wasm-mutable-globals": string;
|
|
604
615
|
"wasm-non-trapping-float-to-int": string;
|
|
@@ -645,7 +656,6 @@ declare class Baseline extends Audit {
|
|
|
645
656
|
xhr: string;
|
|
646
657
|
"xml-serializer": string;
|
|
647
658
|
xpath: string;
|
|
648
|
-
xslt: string;
|
|
649
659
|
"z-index": string;
|
|
650
660
|
};
|
|
651
661
|
low: {
|
|
@@ -654,17 +664,16 @@ declare class Baseline extends Audit {
|
|
|
654
664
|
"abs-sign": string;
|
|
655
665
|
"active-view-transition": string;
|
|
656
666
|
"align-content-block": string;
|
|
667
|
+
alpha: string;
|
|
657
668
|
"alt-text-generated-content": string;
|
|
658
|
-
"array-fromasync": string;
|
|
659
|
-
"array-group": string;
|
|
660
669
|
"async-clipboard": string;
|
|
670
|
+
"async-iterable-streams": string;
|
|
661
671
|
"atomics-pause": string;
|
|
662
672
|
"atomics-wait-async": string;
|
|
663
|
-
|
|
673
|
+
autocorrect: string;
|
|
664
674
|
"backdrop-filter": string;
|
|
665
675
|
"baseline-shift": string;
|
|
666
676
|
"canvas-2d-willreadfrequently": string;
|
|
667
|
-
"check-visibility": string;
|
|
668
677
|
"clipboard-supports": string;
|
|
669
678
|
"composed-ranges": string;
|
|
670
679
|
"container-style-queries": string;
|
|
@@ -673,11 +682,11 @@ declare class Baseline extends Audit {
|
|
|
673
682
|
"contrast-color": string;
|
|
674
683
|
"cookie-enabled": string;
|
|
675
684
|
"crisp-edges": string;
|
|
676
|
-
"declarative-shadow-dom": string;
|
|
677
685
|
"details-content": string;
|
|
678
686
|
"details-name": string;
|
|
679
687
|
"document-caretpositionfrompoint": string;
|
|
680
688
|
"event-timing": string;
|
|
689
|
+
"ext-texture-compression-rgtc": string;
|
|
681
690
|
"fetch-priority": string;
|
|
682
691
|
"field-sizing": string;
|
|
683
692
|
float16array: string;
|
|
@@ -690,6 +699,7 @@ declare class Baseline extends Audit {
|
|
|
690
699
|
http3: string;
|
|
691
700
|
"input-file-webkitdirectory": string;
|
|
692
701
|
"intl-duration-format": string;
|
|
702
|
+
"intl-locale-info": string;
|
|
693
703
|
"intl-segmenter": string;
|
|
694
704
|
"invoker-commands": string;
|
|
695
705
|
"iterator-concat": string;
|
|
@@ -700,21 +710,22 @@ declare class Baseline extends Audit {
|
|
|
700
710
|
"json-raw": string;
|
|
701
711
|
"largest-contentful-paint": string;
|
|
702
712
|
"light-dark": string;
|
|
713
|
+
"light-dark-image": string;
|
|
703
714
|
"link-rel-dns-prefetch": string;
|
|
704
715
|
"math-sum-precise": string;
|
|
705
716
|
navigation: string;
|
|
706
717
|
"open-pseudo": string;
|
|
718
|
+
"overflow-anchor": string;
|
|
707
719
|
"page-setup": string;
|
|
708
720
|
"paint-order": string;
|
|
709
721
|
"parse-html-unsafe": string;
|
|
710
722
|
popover: string;
|
|
711
723
|
"print-color-adjust": string;
|
|
724
|
+
"progress-function": string;
|
|
712
725
|
"promise-try": string;
|
|
713
|
-
"promise-withresolvers": string;
|
|
714
726
|
rcap: string;
|
|
715
727
|
rch: string;
|
|
716
728
|
"readable-byte-streams": string;
|
|
717
|
-
"rect-xywh": string;
|
|
718
729
|
"regexp-escape": string;
|
|
719
730
|
"registered-custom-properties": string;
|
|
720
731
|
"relative-color": string;
|
|
@@ -738,6 +749,7 @@ declare class Baseline extends Audit {
|
|
|
738
749
|
"set-methods": string;
|
|
739
750
|
"shape-function": string;
|
|
740
751
|
"shared-workers": string;
|
|
752
|
+
"sibling-count": string;
|
|
741
753
|
"starting-style": string;
|
|
742
754
|
state: string;
|
|
743
755
|
"target-text": string;
|
|
@@ -748,7 +760,7 @@ declare class Baseline extends Audit {
|
|
|
748
760
|
"text-wrap": string;
|
|
749
761
|
"text-wrap-balance": string;
|
|
750
762
|
"toggleevent-source": string;
|
|
751
|
-
"
|
|
763
|
+
"top-level-await": string;
|
|
752
764
|
"transform-box": string;
|
|
753
765
|
"transition-behavior": string;
|
|
754
766
|
"trusted-types": string;
|
|
@@ -758,8 +770,9 @@ declare class Baseline extends Audit {
|
|
|
758
770
|
"view-transition-class": string;
|
|
759
771
|
"view-transitions": string;
|
|
760
772
|
"wasm-branch-hinting": string;
|
|
761
|
-
"wasm-
|
|
773
|
+
"wasm-exnref-exceptions": string;
|
|
762
774
|
"wasm-garbage-collection": string;
|
|
775
|
+
"wasm-jspi": string;
|
|
763
776
|
"wasm-tail-call-optimization": string;
|
|
764
777
|
"wasm-typed-fun-refs": string;
|
|
765
778
|
"webgl-color-management": string;
|
|
@@ -81,8 +81,7 @@ class Deprecations extends Audit {
|
|
|
81
81
|
/** @type {LH.Audit.Details.TableItem} */
|
|
82
82
|
const item = {
|
|
83
83
|
value: deprecationMeta.message || legacyMessage || deprecation.type,
|
|
84
|
-
|
|
85
|
-
source: Audit.makeSourceLocation(url, lineNumber, columnNumber - 1, bundle),
|
|
84
|
+
source: Audit.makeSourceLocation(url, lineNumber, columnNumber, bundle),
|
|
86
85
|
subItems,
|
|
87
86
|
};
|
|
88
87
|
return item;
|
|
@@ -64,10 +64,12 @@ class WebMcpFormCoverage extends Audit {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
// Every form is annotated, so surface this as a pass rather than hiding it as
|
|
68
|
+
// "not applicable".
|
|
67
69
|
if (withoutTools.length === 0) {
|
|
68
70
|
return {
|
|
69
|
-
notApplicable: true,
|
|
70
71
|
score: 1,
|
|
72
|
+
scoreDisplayMode: Audit.SCORING_MODES.BINARY,
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -16,6 +16,8 @@ export namespace UIStrings {
|
|
|
16
16
|
let columnInputSchema: string;
|
|
17
17
|
let titleImperativeTools: string;
|
|
18
18
|
let titleDeclarativeTools: string;
|
|
19
|
+
let warningMaxRecommendedTools: string;
|
|
19
20
|
}
|
|
21
|
+
export const MAX_RECOMMENDED_TOOLS: 40;
|
|
20
22
|
import { Audit } from './audit.js';
|
|
21
23
|
//# sourceMappingURL=webmcp-registered-tools.d.ts.map
|
|
@@ -30,10 +30,19 @@ const UIStrings = {
|
|
|
30
30
|
titleImperativeTools: 'Imperative Tools',
|
|
31
31
|
/** Title for the table listing declarative WebMCP tools. */
|
|
32
32
|
titleDeclarativeTools: 'Declarative Tools',
|
|
33
|
+
/**
|
|
34
|
+
* @description Warning message shown when the number of registered tools exceeds the recommended limit.
|
|
35
|
+
* @example {40} maxTools
|
|
36
|
+
*/
|
|
37
|
+
warningMaxRecommendedTools: 'Registering more than {maxTools} tools is not recommended. ' +
|
|
38
|
+
'Doing so consumes model context tokens, adds latency, ' +
|
|
39
|
+
'and increases the risk of tool confusion.',
|
|
33
40
|
};
|
|
34
41
|
|
|
35
42
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
36
43
|
|
|
44
|
+
const MAX_RECOMMENDED_TOOLS = 40;
|
|
45
|
+
|
|
37
46
|
class WebMCPRegisteredTools extends Audit {
|
|
38
47
|
/**
|
|
39
48
|
* @return {LH.Audit.Meta}
|
|
@@ -138,12 +147,18 @@ class WebMCPRegisteredTools extends Audit {
|
|
|
138
147
|
};
|
|
139
148
|
}
|
|
140
149
|
|
|
150
|
+
const warnings = [];
|
|
151
|
+
if (imperativeResults.length + declarativeResults.length > MAX_RECOMMENDED_TOOLS) {
|
|
152
|
+
warnings.push(str_(UIStrings.warningMaxRecommendedTools, {maxTools: MAX_RECOMMENDED_TOOLS}));
|
|
153
|
+
}
|
|
154
|
+
|
|
141
155
|
return {
|
|
142
156
|
score: 1,
|
|
143
157
|
details: Audit.makeListDetails(list),
|
|
158
|
+
warnings: warnings.length ? warnings : undefined,
|
|
144
159
|
};
|
|
145
160
|
}
|
|
146
161
|
}
|
|
147
162
|
|
|
148
163
|
export default WebMCPRegisteredTools;
|
|
149
|
-
export {UIStrings};
|
|
164
|
+
export {UIStrings, MAX_RECOMMENDED_TOOLS};
|
|
@@ -70,7 +70,7 @@ class WebMcpSchemaValidity extends Audit {
|
|
|
70
70
|
WARNING: 2,
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
/** @type {Record<string, {severity: Severity, description: LH.IcuMessage}>} */
|
|
73
|
+
/** @type {Record<string, {severity: typeof Severity[keyof typeof Severity], description: LH.IcuMessage}>} */
|
|
74
74
|
const issueConfigs = {
|
|
75
75
|
'FormModelContextMissingToolName': {
|
|
76
76
|
severity: Severity.ERROR,
|
|
@@ -88,7 +88,7 @@ class Interactive extends NavigationMetric {
|
|
|
88
88
|
static findOverlappingQuietPeriods(longTasks, networkRecords, processedNavigation) {
|
|
89
89
|
const FcpTsInMs = processedNavigation.timestamps.firstContentfulPaint / 1000;
|
|
90
90
|
|
|
91
|
-
/** @type {
|
|
91
|
+
/** @type {(period: TimePeriod) => boolean} */
|
|
92
92
|
const isLongEnoughQuietPeriod = period =>
|
|
93
93
|
period.end > FcpTsInMs + REQUIRED_QUIET_WINDOW &&
|
|
94
94
|
period.end - period.start >= REQUIRED_QUIET_WINDOW;
|
|
@@ -61,7 +61,7 @@ function lanternErrorAdapter(err) {
|
|
|
61
61
|
throw err;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
const code = /** @type {keyof LighthouseError.errors} */ (err.message);
|
|
64
|
+
const code = /** @type {keyof typeof LighthouseError.errors} */ (err.message);
|
|
65
65
|
if (LighthouseError.errors[code]) {
|
|
66
66
|
throw new LighthouseError(LighthouseError.errors[code]);
|
|
67
67
|
}
|
|
@@ -25,7 +25,7 @@ declare class TraceEngineResult {
|
|
|
25
25
|
*
|
|
26
26
|
* @template {any[]} Args
|
|
27
27
|
* @template {import('../lib/trace-engine.js').DevToolsIcuMessage} Ret
|
|
28
|
-
* @param {ReturnType<i18n.createIcuMessageFn>} str_
|
|
28
|
+
* @param {ReturnType<typeof i18n.createIcuMessageFn>} str_
|
|
29
29
|
* @param {(...args: Args) => Ret} fn
|
|
30
30
|
* @return {(...args: Args) => LH.IcuMessage}
|
|
31
31
|
*/
|
|
@@ -34,7 +34,7 @@ declare class TraceEngineResult {
|
|
|
34
34
|
* Converts the input parameters given to `i18nString` usages in DevTools to a
|
|
35
35
|
* LH.IcuMessage.
|
|
36
36
|
*
|
|
37
|
-
* @param {ReturnType<i18n.createIcuMessageFn>} str_
|
|
37
|
+
* @param {ReturnType<typeof i18n.createIcuMessageFn>} str_
|
|
38
38
|
* @param {import('../lib/trace-engine.js').DevToolsIcuMessage} traceEngineI18nObject
|
|
39
39
|
* @return {LH.IcuMessage}
|
|
40
40
|
*/
|
|
@@ -42,7 +42,7 @@ declare class TraceEngineResult {
|
|
|
42
42
|
/**
|
|
43
43
|
* Recursively finds all DevToolsIcuMessage objects and replaces them with LH.IcuMessage.
|
|
44
44
|
*
|
|
45
|
-
* @param {ReturnType<i18n.createIcuMessageFn>} str_
|
|
45
|
+
* @param {ReturnType<typeof i18n.createIcuMessageFn>} str_
|
|
46
46
|
* @param {object} object
|
|
47
47
|
*/
|
|
48
48
|
static localizeObject(str_: ReturnType<typeof i18n.createIcuMessageFn>, object: object): void;
|