lighthouse 13.5.0 → 13.6.0-dev.20261027
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/.agents/skills/update-ard-port/SKILL.md +171 -0
- package/.agents/skills/update-trace-engine/SKILL.md +154 -0
- package/cli/bin.d.ts +2 -2
- package/cli/bin.js +5 -4
- package/cli/cli-flags.d.ts +16 -1
- package/cli/cli-flags.js +53 -2
- package/cli/printer.js +5 -8
- package/cli/run.d.ts +5 -5
- package/cli/run.js +97 -47
- package/cli/sentry-prompt.js +3 -4
- package/cli/test/smokehouse/__snapshots__/report-assert-test.js.snap +1 -1
- package/cli/test/smokehouse/config/exclusions.js +3 -1
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +5 -3
- package/cli/test/smokehouse/report-assert-test.js +65 -0
- package/cli/test/smokehouse/report-assert.js +24 -39
- package/cli/test/smokehouse/smokehouse-test.d.ts +2 -0
- package/cli/test/smokehouse/smokehouse-test.js +120 -0
- package/cli/test/smokehouse/smokehouse.js +37 -15
- package/cli/test/smokehouse/version-check-test.js +5 -0
- package/cli/test/smokehouse/version-check.d.ts +1 -1
- package/cli/test/smokehouse/version-check.js +1 -1
- package/commitlint.config.js +1 -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 +13 -0
- package/core/audits/agentic/ard-schema.js +81 -33
- package/core/audits/agentic/llms-txt.js +5 -2
- package/core/audits/baseline.d.ts +29 -7
- package/core/audits/baseline.js +19 -6
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +2 -2
- package/core/audits/insights/insight-audit.d.ts +9 -0
- package/core/audits/insights/insight-audit.js +35 -28
- package/core/audits/long-tasks.js +2 -1
- package/core/audits/predictive-perf.js +2 -2
- package/core/audits/screenshot-thumbnails.d.ts +0 -13
- package/core/audits/screenshot-thumbnails.js +0 -45
- package/core/audits/script-treemap-data.js +26 -6
- package/core/audits/seo/robots-txt.js +3 -8
- package/core/audits/unsized-images.d.ts +0 -7
- package/core/audits/unsized-images.js +7 -26
- package/core/computed/lcp-image-record.d.ts +2 -23
- package/core/computed/lcp-image-record.js +3 -67
- package/core/computed/lcp-network-record.d.ts +24 -0
- package/core/computed/lcp-network-record.js +74 -0
- package/core/computed/metrics/lantern-metric.js +1 -1
- package/core/computed/metrics/lcp-breakdown.js +6 -6
- package/core/computed/metrics/time-to-first-byte.js +5 -3
- package/core/computed/navigation-insights.js +3 -2
- package/core/computed/page-dependency-graph.js +55 -5
- package/core/computed/speedline.js +20 -5
- package/core/computed/trace-engine-result.js +25 -5
- package/core/computed/unused-css.js +15 -2
- package/core/config/config-helpers.d.ts +5 -0
- package/core/config/config-helpers.js +8 -28
- package/core/config/config.js +1 -2
- package/core/config/constants.d.ts +2 -28
- package/core/config/lr-desktop-config.js +13 -0
- package/core/config/lr-mobile-config.js +13 -0
- package/core/gather/base-artifacts.js +7 -1
- package/core/gather/driver/storage.js +3 -2
- package/core/gather/gatherers/agentic/ard.d.ts +59 -4
- package/core/gather/gatherers/agentic/ard.js +218 -56
- package/core/gather/gatherers/full-page-screenshot.js +2 -2
- package/core/gather/gatherers/image-elements.d.ts +7 -0
- package/core/gather/gatherers/image-elements.js +75 -24
- package/core/gather/gatherers/inspector-issues.js +2 -0
- package/core/gather/gatherers/js-usage.js +2 -0
- package/core/gather/gatherers/scripts.d.ts +16 -3
- package/core/gather/gatherers/scripts.js +157 -14
- package/core/gather/gatherers/stylesheets.js +2 -0
- package/core/gather/gatherers/trace-elements.js +2 -1
- package/core/gather/gatherers/trace.d.ts +6 -0
- package/core/gather/gatherers/trace.js +56 -16
- package/core/lib/arbitrary-equality-map.d.ts +14 -3
- package/core/lib/arbitrary-equality-map.js +113 -6
- package/core/lib/baseline/web-features-data.json +32 -11
- package/core/lib/baseline/web-features-metadata.json +1 -1
- package/core/lib/bf-cache-strings.js +237 -254
- package/core/lib/cdt/Common.d.ts +1 -1
- package/core/lib/cdt/Common.js +2 -2
- package/core/lib/cdt/Platform.d.ts +7 -7
- package/core/lib/cdt/Platform.js +11 -8
- package/core/lib/cdt/SDK.d.ts +5 -1
- package/core/lib/cdt/SDK.js +4 -2
- package/core/lib/cdt/generated/ParsedURL.d.ts +0 -1
- package/core/lib/cdt/generated/ParsedURL.js +3 -9
- package/core/lib/cdt/generated/SourceMap.d.ts +24 -25
- package/core/lib/cdt/generated/SourceMap.js +7 -15
- package/core/lib/deprecations-strings.d.ts +93 -88
- package/core/lib/deprecations-strings.js +20 -14
- package/core/lib/i18n/i18n.d.ts +0 -1
- package/core/lib/i18n/i18n.js +17 -11
- package/core/lib/legacy-javascript/legacy-javascript.d.ts +3 -2
- package/core/lib/legacy-javascript/legacy-javascript.js +235 -111
- package/core/lib/legacy-javascript/polyfill-graph-data.json +94 -89
- package/core/lib/legacy-javascript/polyfill-module-data.json +48 -7
- package/core/lib/minification-estimator.js +10 -10
- package/core/lib/network-request.d.ts +2 -0
- package/core/lib/network-request.js +21 -0
- package/core/lib/page-functions.js +2 -5
- package/core/lib/sentry.d.ts +1 -0
- package/core/lib/sentry.js +3 -0
- package/core/lib/trace-engine.d.ts +1 -0
- package/core/lib/trace-engine.js +2 -0
- package/core/runner.js +9 -3
- package/dist/report/bundle.esm.js +10 -10
- package/dist/report/flow.js +13 -13
- package/dist/report/standalone.js +5 -5
- package/flow-report/src/common.tsx +5 -2
- package/flow-report/src/i18n/i18n.d.ts +2 -0
- package/flow-report/src/summary/summary.tsx +9 -1
- package/flow-report/src/util.d.ts +1 -1
- package/package.json +62 -98
- package/readme.md +13 -18
- package/report/generator/file-namer.d.ts +1 -1
- package/report/generator/file-namer.js +5 -4
- package/report/generator/flow-report-assets.js +1 -3
- package/report/generator/report-assets.js +1 -2
- package/report/renderer/category-renderer.js +2 -2
- package/report/renderer/details-renderer.js +3 -2
- package/report/renderer/dom.d.ts +8 -2
- package/report/renderer/dom.js +29 -1
- package/report/renderer/element-screenshot-renderer.js +3 -0
- package/report/renderer/performance-category-renderer.js +3 -1
- package/report/renderer/report-renderer.js +4 -0
- package/report/renderer/report-utils.d.ts +1 -0
- package/report/renderer/report-utils.js +2 -0
- package/report/renderer/text-encoding.js +2 -2
- package/report/types/augment-dom.d.ts +4 -0
- package/shared/esm-utils.d.ts +0 -8
- package/shared/esm-utils.js +0 -18
- package/shared/localization/format.js +1 -2
- package/shared/localization/locales/ar-XB.json +157 -142
- package/shared/localization/locales/ar.json +157 -142
- package/shared/localization/locales/bg.json +154 -139
- package/shared/localization/locales/ca.json +157 -142
- package/shared/localization/locales/cs.json +148 -133
- package/shared/localization/locales/da.json +153 -138
- package/shared/localization/locales/de.json +152 -137
- package/shared/localization/locales/el.json +153 -138
- package/shared/localization/locales/en-GB.json +160 -145
- package/shared/localization/locales/en-US.json +239 -218
- package/shared/localization/locales/en-XL.json +239 -218
- package/shared/localization/locales/es-419.json +150 -135
- package/shared/localization/locales/es.json +149 -134
- package/shared/localization/locales/fi.json +151 -136
- package/shared/localization/locales/fil.json +154 -139
- package/shared/localization/locales/fr.json +150 -135
- package/shared/localization/locales/he.json +160 -145
- package/shared/localization/locales/hi.json +156 -141
- package/shared/localization/locales/hr.json +154 -139
- package/shared/localization/locales/hu.json +111 -96
- package/shared/localization/locales/id.json +153 -138
- package/shared/localization/locales/it.json +153 -138
- package/shared/localization/locales/ja.json +150 -135
- package/shared/localization/locales/ko.json +42 -27
- package/shared/localization/locales/lt.json +152 -137
- package/shared/localization/locales/lv.json +93 -78
- package/shared/localization/locales/nl.json +149 -134
- package/shared/localization/locales/no.json +152 -137
- package/shared/localization/locales/pl.json +153 -138
- package/shared/localization/locales/pt-PT.json +152 -137
- package/shared/localization/locales/pt.json +157 -142
- package/shared/localization/locales/ro.json +149 -134
- package/shared/localization/locales/ru.json +76 -61
- package/shared/localization/locales/sk.json +153 -138
- package/shared/localization/locales/sl.json +149 -134
- package/shared/localization/locales/sr-Latn.json +151 -136
- package/shared/localization/locales/sr.json +151 -136
- package/shared/localization/locales/sv.json +152 -137
- package/shared/localization/locales/ta.json +156 -141
- package/shared/localization/locales/te.json +157 -142
- package/shared/localization/locales/th.json +111 -96
- package/shared/localization/locales/tr.json +153 -138
- package/shared/localization/locales/uk.json +149 -134
- package/shared/localization/locales/vi.json +162 -147
- package/shared/localization/locales/zh-HK.json +150 -135
- package/shared/localization/locales/zh-TW.json +154 -139
- package/shared/localization/locales/zh.json +152 -137
- package/shared/localization/swap-locale.js +10 -5
- package/shared/root.js +1 -3
- package/third-party/ard/README.md +19 -10
- package/third-party/ard/ard-test.js +189 -266
- package/third-party/ard/ard.d.ts +18 -1
- package/third-party/ard/ard.js +282 -45
- package/third-party/ard/schema-validator.d.ts +14 -5
- package/third-party/ard/schema-validator.js +921 -1177
- package/third-party/ard/spec/schemas/ard-entry.schema.json +176 -0
- package/tsconfig.json +0 -2
- package/types/artifacts.d.ts +43 -7
- package/types/externs.d.ts +4 -0
- package/types/internal/test.d.ts +1 -0
- package/build-tracker.config.js +0 -16
- package/core/lib/cdt/package.json +0 -4
- package/eslint-local-rules.d.cts +0 -9
- package/eslint.config.mjs +0 -242
- package/third-party/ard/spec/schemas/ai-catalog.schema.json +0 -292
- package/third-party/esbuild-plugins-polyfills/LICENSE +0 -3
- package/third-party/esbuild-plugins-polyfills/README.md +0 -7
- package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.d.ts +0 -9
- package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.js +0 -129
- package/types/internal/lookup-closest-locale.d.ts +0 -13
|
@@ -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: 'When an image is being used as an `<input>` button, providing alternative ' +
|
|
22
22
|
'text can help screen reader users understand the purpose of the button. ' +
|
|
23
|
-
'[Learn about input image alt text](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn about input image alt text](https://dequeuniversity.com/rules/axe/4.14/input-image-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: 'Visible text labels that do not match the accessible name can result in a ' +
|
|
22
22
|
'confusing experience for screen reader users. ' +
|
|
23
|
-
'[Learn more about accessible names](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn more about accessible names](https://dequeuniversity.com/rules/axe/4.14/label-content-name-mismatch).',
|
|
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: 'Labels ensure that form controls are announced properly by assistive ' +
|
|
22
22
|
'technologies, like screen readers. [Learn ' +
|
|
23
|
-
'more about form element labels](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'more about form element labels](https://dequeuniversity.com/rules/axe/4.14/label).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -19,7 +19,7 @@ const UIStrings = {
|
|
|
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. ' +
|
|
22
|
-
'[Learn more about landmarks](https://dequeuniversity.com/rules/axe/4.
|
|
22
|
+
'[Learn more about landmarks](https://dequeuniversity.com/rules/axe/4.14/landmark-one-main).',
|
|
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: 'Low-contrast text is difficult or impossible for many users to read. Link text ' +
|
|
22
22
|
'that is discernible improves the experience for users with low vision. ' +
|
|
23
|
-
'[Learn how to make links distinguishable](https://dequeuniversity.com/rules/axe/4.
|
|
23
|
+
'[Learn how to make links distinguishable](https://dequeuniversity.com/rules/axe/4.14/link-in-text-block).',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
description: 'Link text (and alternate text for images, when used as links) that is ' +
|
|
22
22
|
'discernible, unique, and focusable improves the navigation experience for ' +
|
|
23
23
|
'screen reader users. ' +
|
|
24
|
-
'[Learn how to make links accessible](https://dequeuniversity.com/rules/axe/4.
|
|
24
|
+
'[Learn how to make links accessible](https://dequeuniversity.com/rules/axe/4.14/link-name).',
|
|
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: 'Screen readers have a specific way of announcing lists. Ensuring proper list ' +
|
|
24
24
|
'structure aids screen reader output. ' +
|
|
25
|
-
'[Learn more about proper list structure](https://dequeuniversity.com/rules/axe/4.
|
|
25
|
+
'[Learn more about proper list structure](https://dequeuniversity.com/rules/axe/4.14/list).',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
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: '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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/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.14/video-caption).',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export default ArdSchema;
|
|
2
2
|
declare class ArdSchema extends Audit {
|
|
3
|
+
/**
|
|
4
|
+
* @param {LH.Artifacts['AgentResourceDiscovery']['failedSources'][number]} failedSource
|
|
5
|
+
* @param {LH.IcuMessage} severity
|
|
6
|
+
* @return {{element: string, issue: LH.IcuMessage, severity: LH.IcuMessage}}
|
|
7
|
+
*/
|
|
8
|
+
static makeFailedSourceItem({ url, status }: LH.Artifacts["AgentResourceDiscovery"]["failedSources"][number], severity: LH.IcuMessage): {
|
|
9
|
+
element: string;
|
|
10
|
+
issue: LH.IcuMessage;
|
|
11
|
+
severity: LH.IcuMessage;
|
|
12
|
+
};
|
|
3
13
|
/**
|
|
4
14
|
* @param {LH.Artifacts} artifacts
|
|
5
15
|
* @return {LH.Audit.Product}
|
|
@@ -11,6 +21,9 @@ export namespace UIStrings {
|
|
|
11
21
|
let failureTitle: string;
|
|
12
22
|
let description: string;
|
|
13
23
|
let explanation: string;
|
|
24
|
+
let legacyDiscovery: string;
|
|
25
|
+
let sourceUnavailable: string;
|
|
26
|
+
let sourceFetchFailed: string;
|
|
14
27
|
let columnIssue: string;
|
|
15
28
|
let columnSeverity: string;
|
|
16
29
|
let itemSeverityError: string;
|
|
@@ -5,29 +5,48 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @fileoverview Audit that validates
|
|
8
|
+
* @fileoverview Audit that validates a site's Agentic Resource Discovery (ARD) manifest.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Validation itself is done by `third-party/ard/ard.js`, a port of `validate_manifest` from the
|
|
11
|
+
* official ARD conformance test (see that directory's README for the pinned upstream commit).
|
|
12
|
+
* This audit maps its errors and warnings onto a score, and adds discovery-related items the
|
|
13
|
+
* conformance test reports in its publisher-resolution mode.
|
|
11
14
|
* @see https://github.com/ards-project/ard-spec/blob/main/conformance/bin/conformance-test
|
|
12
15
|
* @see https://agenticresourcediscovery.org/spec/
|
|
13
|
-
* @version ARD Spec 1.0 / ADR-0003
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
import {Audit} from '../audit.js';
|
|
17
19
|
import * as i18n from '../../lib/i18n/i18n.js';
|
|
18
20
|
import {ConformanceTester} from '../../../third-party/ard/ard.js';
|
|
19
21
|
|
|
22
|
+
const HTTP_CLIENT_ERROR_CODE_LOW = 400;
|
|
23
|
+
const HTTP_SERVER_ERROR_CODE_LOW = 500;
|
|
24
|
+
|
|
20
25
|
const UIStrings = {
|
|
21
|
-
/** Title of a Lighthouse audit that evaluates whether
|
|
22
|
-
title: '
|
|
23
|
-
/** Title of a Lighthouse audit that evaluates whether
|
|
24
|
-
failureTitle: '
|
|
25
|
-
/** Description of a Lighthouse audit that tells the user why
|
|
26
|
-
description: '
|
|
27
|
-
'
|
|
26
|
+
/** Title of a Lighthouse audit that evaluates whether the site's Agentic Resource Discovery (ARD) manifest conforms to the ARD specification. Shown when valid. "ARD" should not be translated. */
|
|
27
|
+
title: 'ARD manifest is valid',
|
|
28
|
+
/** Title of a Lighthouse audit that evaluates whether the site's Agentic Resource Discovery (ARD) manifest conforms to the ARD specification. Shown when invalid. "ARD" should not be translated. */
|
|
29
|
+
failureTitle: 'ARD manifest is invalid',
|
|
30
|
+
/** Description of a Lighthouse audit that tells the user why their Agentic Resource Discovery (ARD) manifest must match the ARD specification. "ARD", "/.well-known/ard.json" and "rel="ard"" should not be translated. 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. */
|
|
31
|
+
description: 'A valid Agentic Resource Discovery (ARD) manifest, served at ' +
|
|
32
|
+
'`/.well-known/ard.json` or linked with `rel="ard"`, lets AI agents and registries ' +
|
|
33
|
+
'discover and verify your resources. ' +
|
|
28
34
|
'[Learn more about the ARD specification](https://agenticresourcediscovery.org/spec/).',
|
|
29
|
-
/** Explanatory message stating that
|
|
30
|
-
explanation: '
|
|
35
|
+
/** Explanatory message stating that the Agentic Resource Discovery (ARD) manifest could not be loaded for schema validation. "ARD" should not be translated. */
|
|
36
|
+
explanation: 'ARD manifest could not be loaded for schema validation.',
|
|
37
|
+
/** Table item describing that the Agentic Resource Discovery (ARD) manifest was only found at a legacy location that ARD consumers are not required to check. "ARD", "/.well-known/ai-catalog.json", "rel="ai-catalog"", "/.well-known/ard.json" and "rel="ard"" should not be translated. */
|
|
38
|
+
legacyDiscovery: 'Manifest was only found through a legacy location ' +
|
|
39
|
+
'(`/.well-known/ai-catalog.json` or `rel="ai-catalog"`). ARD consumers are not ' +
|
|
40
|
+
'required to check these, so ARD consumers may not discover your resources. Serve the ' +
|
|
41
|
+
'manifest at `/.well-known/ard.json` or link it with `rel="ard"`.',
|
|
42
|
+
/**
|
|
43
|
+
* @description Table item describing that a location the site advertises for its Agentic Resource Discovery (ARD) manifest (for example, a link on the page) returned an unsuccessful HTTP status code. "ARD" should not be translated.
|
|
44
|
+
* @example {404} statusCode
|
|
45
|
+
*/
|
|
46
|
+
sourceUnavailable: 'Advertised ARD manifest location could not be loaded ' +
|
|
47
|
+
'(HTTP status {statusCode}).',
|
|
48
|
+
/** Table item describing that a location the site advertises for its Agentic Resource Discovery (ARD) manifest (for example, a link on the page) could not be fetched at all. "ARD" should not be translated. */
|
|
49
|
+
sourceFetchFailed: 'Advertised ARD manifest location could not be loaded.',
|
|
31
50
|
/** Header of the table column which displays the issue. */
|
|
32
51
|
columnIssue: 'Issue',
|
|
33
52
|
/** Header of the table column which displays the severity. */
|
|
@@ -36,6 +55,9 @@ const UIStrings = {
|
|
|
36
55
|
itemSeverityError: 'Error',
|
|
37
56
|
};
|
|
38
57
|
|
|
58
|
+
/** @type {Set<LH.Artifacts.ArdDiscoverySource>} */
|
|
59
|
+
const LEGACY_SOURCES = new Set(['legacyHtmlLink', 'legacyHttpHeaderLink', 'legacyWellKnown']);
|
|
60
|
+
|
|
39
61
|
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
40
62
|
|
|
41
63
|
class ArdSchema extends Audit {
|
|
@@ -53,6 +75,18 @@ class ArdSchema extends Audit {
|
|
|
53
75
|
};
|
|
54
76
|
}
|
|
55
77
|
|
|
78
|
+
/**
|
|
79
|
+
* @param {LH.Artifacts['AgentResourceDiscovery']['failedSources'][number]} failedSource
|
|
80
|
+
* @param {LH.IcuMessage} severity
|
|
81
|
+
* @return {{element: string, issue: LH.IcuMessage, severity: LH.IcuMessage}}
|
|
82
|
+
*/
|
|
83
|
+
static makeFailedSourceItem({url, status}, severity) {
|
|
84
|
+
const issue = status === null ?
|
|
85
|
+
str_(UIStrings.sourceFetchFailed) :
|
|
86
|
+
str_(UIStrings.sourceUnavailable, {statusCode: status});
|
|
87
|
+
return {element: url, issue, severity};
|
|
88
|
+
}
|
|
89
|
+
|
|
56
90
|
/**
|
|
57
91
|
* @param {LH.Artifacts} artifacts
|
|
58
92
|
* @return {LH.Audit.Product}
|
|
@@ -64,30 +98,26 @@ class ArdSchema extends Audit {
|
|
|
64
98
|
const hasExplicitSignal = Boolean(
|
|
65
99
|
signals.robotsTxtAgentmap ||
|
|
66
100
|
signals.htmlLink ||
|
|
67
|
-
signals.httpHeaderLink
|
|
101
|
+
signals.httpHeaderLink ||
|
|
102
|
+
signals.legacyHtmlLink ||
|
|
103
|
+
signals.legacyHttpHeaderLink
|
|
104
|
+
);
|
|
105
|
+
const isClientError = Boolean(
|
|
106
|
+
ard.status &&
|
|
107
|
+
ard.status >= HTTP_CLIENT_ERROR_CODE_LOW &&
|
|
108
|
+
ard.status < HTTP_SERVER_ERROR_CODE_LOW
|
|
68
109
|
);
|
|
69
|
-
const hasCatalog = hasExplicitSignal || ard.status === 200;
|
|
70
110
|
|
|
71
|
-
if (!
|
|
111
|
+
if (!hasExplicitSignal && isClientError) {
|
|
72
112
|
return {
|
|
73
113
|
score: 1,
|
|
74
114
|
notApplicable: true,
|
|
75
115
|
};
|
|
76
116
|
}
|
|
77
117
|
|
|
78
|
-
if (ard.status !== 200 || !ard.content) {
|
|
79
|
-
return {
|
|
80
|
-
score: 0,
|
|
81
|
-
explanation: str_(UIStrings.explanation),
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
118
|
const itemSeverityError = str_(UIStrings.itemSeverityError);
|
|
86
119
|
const itemSeverityLow = str_(i18n.UIStrings.itemSeverityLow);
|
|
87
120
|
|
|
88
|
-
/** @type {Array<{element: string, issue: string | LH.IcuMessage, severity: LH.IcuMessage}>} */
|
|
89
|
-
const issues = [];
|
|
90
|
-
|
|
91
121
|
/** @type {LH.Audit.Details.Table['headings']} */
|
|
92
122
|
const headings = [
|
|
93
123
|
{key: 'element', valueType: 'text', label: str_(i18n.UIStrings.columnElement)},
|
|
@@ -95,8 +125,21 @@ class ArdSchema extends Audit {
|
|
|
95
125
|
{key: 'severity', valueType: 'text', label: str_(UIStrings.columnSeverity)},
|
|
96
126
|
];
|
|
97
127
|
|
|
128
|
+
if (!ard.status || ard.status >= HTTP_CLIENT_ERROR_CODE_LOW || !ard.content) {
|
|
129
|
+
const failedItems = ard.failedSources.map(source =>
|
|
130
|
+
ArdSchema.makeFailedSourceItem(source, itemSeverityError));
|
|
131
|
+
return {
|
|
132
|
+
score: 0,
|
|
133
|
+
explanation: str_(UIStrings.explanation),
|
|
134
|
+
details: failedItems.length ? Audit.makeTableDetails(headings, failedItems) : undefined,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** @type {Array<{element: string, issue: string | LH.IcuMessage, severity: LH.IcuMessage}>} */
|
|
139
|
+
const issues = [];
|
|
140
|
+
|
|
98
141
|
const tester = new ConformanceTester();
|
|
99
|
-
tester.validate_manifest(ard.content,
|
|
142
|
+
tester.validate_manifest(ard.content, ard.catalogUrl);
|
|
100
143
|
|
|
101
144
|
for (const err of tester.errors) {
|
|
102
145
|
issues.push({
|
|
@@ -114,16 +157,21 @@ class ArdSchema extends Audit {
|
|
|
114
157
|
});
|
|
115
158
|
}
|
|
116
159
|
|
|
117
|
-
const
|
|
118
|
-
|
|
160
|
+
for (const failedSource of ard.failedSources) {
|
|
161
|
+
issues.push(ArdSchema.makeFailedSourceItem(failedSource, itemSeverityLow));
|
|
162
|
+
}
|
|
119
163
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
164
|
+
if (LEGACY_SOURCES.has(ard.discoverySource)) {
|
|
165
|
+
issues.push({
|
|
166
|
+
element: ard.catalogUrl,
|
|
167
|
+
issue: str_(UIStrings.legacyDiscovery),
|
|
168
|
+
severity: itemSeverityLow,
|
|
169
|
+
});
|
|
125
170
|
}
|
|
126
171
|
|
|
172
|
+
const hasErrors = tester.errors.length > 0;
|
|
173
|
+
const score = hasErrors ? 0 : (issues.length ? 0.9 : 1);
|
|
174
|
+
|
|
127
175
|
return {
|
|
128
176
|
score,
|
|
129
177
|
details: issues.length ? Audit.makeTableDetails(headings, issues) : undefined,
|
|
@@ -82,7 +82,7 @@ class LlmsTxt extends Audit {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
if (status >= HTTP_SERVER_ERROR_CODE_LOW) {
|
|
85
|
+
if (status >= HTTP_SERVER_ERROR_CODE_LOW || status === 429) {
|
|
86
86
|
return {
|
|
87
87
|
score: 0,
|
|
88
88
|
displayValue: str_(UIStrings.displayValueHttpBadCode, {statusCode: status}),
|
|
@@ -95,7 +95,10 @@ class LlmsTxt extends Audit {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
if (content === null) {
|
|
98
|
-
|
|
98
|
+
return {
|
|
99
|
+
score: 0,
|
|
100
|
+
explanation: str_(UIStrings.explanation),
|
|
101
|
+
};
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
const hasH1 = /^\s*#\s+.+/m.test(content);
|
|
@@ -15,10 +15,13 @@ declare class Baseline extends Audit {
|
|
|
15
15
|
abbr: string;
|
|
16
16
|
"abortable-fetch": string;
|
|
17
17
|
aborting: string;
|
|
18
|
+
"abortsignal-any": string;
|
|
19
|
+
"abortsignal-timeout": string;
|
|
18
20
|
"absolute-positioning": string;
|
|
19
21
|
accesskey: string;
|
|
20
22
|
address: string;
|
|
21
23
|
alerts: string;
|
|
24
|
+
"align-content-block": string;
|
|
22
25
|
all: string;
|
|
23
26
|
"angle-instanced-arrays": string;
|
|
24
27
|
"animation-composition": string;
|
|
@@ -162,6 +165,7 @@ declare class Baseline extends Audit {
|
|
|
162
165
|
"device-orientation-events": string;
|
|
163
166
|
dfn: string;
|
|
164
167
|
dialog: string;
|
|
168
|
+
dir: string;
|
|
165
169
|
"dir-pseudo": string;
|
|
166
170
|
dirname: string;
|
|
167
171
|
display: string;
|
|
@@ -315,6 +319,7 @@ declare class Baseline extends Audit {
|
|
|
315
319
|
"intl-locale": string;
|
|
316
320
|
"intl-plural-rules": string;
|
|
317
321
|
"intl-relative-time-format": string;
|
|
322
|
+
"intl-segmenter": string;
|
|
318
323
|
is: string;
|
|
319
324
|
"is-secure-context": string;
|
|
320
325
|
isolation: string;
|
|
@@ -426,6 +431,7 @@ declare class Baseline extends Audit {
|
|
|
426
431
|
"page-breaks": string;
|
|
427
432
|
"page-transition-events": string;
|
|
428
433
|
"page-visibility": string;
|
|
434
|
+
"paint-order": string;
|
|
429
435
|
"paint-timing": string;
|
|
430
436
|
"pdf-viewer": string;
|
|
431
437
|
performance: string;
|
|
@@ -578,6 +584,7 @@ declare class Baseline extends Audit {
|
|
|
578
584
|
"title-attr": string;
|
|
579
585
|
"touch-action": string;
|
|
580
586
|
"transferable-arraybuffer": string;
|
|
587
|
+
"transform-box": string;
|
|
581
588
|
transforms2d: string;
|
|
582
589
|
transforms3d: string;
|
|
583
590
|
transitions: string;
|
|
@@ -647,25 +654,26 @@ declare class Baseline extends Audit {
|
|
|
647
654
|
"webvtt-cue-settings": string;
|
|
648
655
|
where: string;
|
|
649
656
|
"white-space": string;
|
|
657
|
+
"white-space-collapse": string;
|
|
650
658
|
"width-height": string;
|
|
651
659
|
"will-change": string;
|
|
652
660
|
window: string;
|
|
653
661
|
"word-break": string;
|
|
654
662
|
"word-spacing": string;
|
|
655
663
|
"writing-mode": string;
|
|
664
|
+
"x-frame-options": string;
|
|
656
665
|
xhr: string;
|
|
657
666
|
"xml-serializer": string;
|
|
658
667
|
xpath: string;
|
|
659
668
|
"z-index": string;
|
|
660
669
|
};
|
|
661
670
|
low: {
|
|
662
|
-
"abortsignal-any": string;
|
|
663
|
-
"abortsignal-timeout": string;
|
|
664
671
|
"abs-sign": string;
|
|
665
672
|
"active-view-transition": string;
|
|
666
|
-
"align-content-block": string;
|
|
667
673
|
alpha: string;
|
|
668
674
|
"alt-text-generated-content": string;
|
|
675
|
+
"animations-css-animation-accessors": string;
|
|
676
|
+
arianotify: string;
|
|
669
677
|
"async-clipboard": string;
|
|
670
678
|
"async-iterable-streams": string;
|
|
671
679
|
"atomics-pause": string;
|
|
@@ -676,6 +684,7 @@ declare class Baseline extends Audit {
|
|
|
676
684
|
"canvas-2d-willreadfrequently": string;
|
|
677
685
|
"clipboard-supports": string;
|
|
678
686
|
"composed-ranges": string;
|
|
687
|
+
"container-name-queries": string;
|
|
679
688
|
"container-style-queries": string;
|
|
680
689
|
"content-visibility": string;
|
|
681
690
|
"contenteditable-plaintextonly": string;
|
|
@@ -700,7 +709,6 @@ declare class Baseline extends Audit {
|
|
|
700
709
|
"input-file-webkitdirectory": string;
|
|
701
710
|
"intl-duration-format": string;
|
|
702
711
|
"intl-locale-info": string;
|
|
703
|
-
"intl-segmenter": string;
|
|
704
712
|
"invoker-commands": string;
|
|
705
713
|
"iterator-concat": string;
|
|
706
714
|
"iterator-methods": string;
|
|
@@ -717,7 +725,6 @@ declare class Baseline extends Audit {
|
|
|
717
725
|
"open-pseudo": string;
|
|
718
726
|
"overflow-anchor": string;
|
|
719
727
|
"page-setup": string;
|
|
720
|
-
"paint-order": string;
|
|
721
728
|
"parse-html-unsafe": string;
|
|
722
729
|
popover: string;
|
|
723
730
|
"print-color-adjust": string;
|
|
@@ -734,6 +741,7 @@ declare class Baseline extends Audit {
|
|
|
734
741
|
"request-video-frame-callback": string;
|
|
735
742
|
requestclose: string;
|
|
736
743
|
"resizable-buffers": string;
|
|
744
|
+
"revert-rule": string;
|
|
737
745
|
rex: string;
|
|
738
746
|
ric: string;
|
|
739
747
|
"round-mod-rem": string;
|
|
@@ -761,7 +769,6 @@ declare class Baseline extends Audit {
|
|
|
761
769
|
"text-wrap-balance": string;
|
|
762
770
|
"toggleevent-source": string;
|
|
763
771
|
"top-level-await": string;
|
|
764
|
-
"transform-box": string;
|
|
765
772
|
"transition-behavior": string;
|
|
766
773
|
"trusted-types": string;
|
|
767
774
|
"uint8array-base64-hex": string;
|
|
@@ -779,7 +786,6 @@ declare class Baseline extends Audit {
|
|
|
779
786
|
"webgl2-color-management": string;
|
|
780
787
|
"webrtc-encoded-transform": string;
|
|
781
788
|
webtransport: string;
|
|
782
|
-
"white-space-collapse": string;
|
|
783
789
|
zoom: string;
|
|
784
790
|
zstd: string;
|
|
785
791
|
};
|
|
@@ -787,6 +793,18 @@ declare class Baseline extends Audit {
|
|
|
787
793
|
};
|
|
788
794
|
/**
|
|
789
795
|
* Determines the baseline status and display string for a given feature ID.
|
|
796
|
+
*
|
|
797
|
+
* Baseline tiers & dates (built by `build/build-baseline-data.js`):
|
|
798
|
+
* - `limited`: `baseline === false` (Limited Availability — not yet in all core browsers, no date).
|
|
799
|
+
* - `low`: `baseline === 'low'` (Newly Available — in all core browsers; value is `baseline_low_date`).
|
|
800
|
+
* - `high`: `baseline === 'high'` (Widely Available — 30 months past `baseline_low_date`; note that
|
|
801
|
+
* `featureData.high[id]` still stores the feature's `baseline_low_date`).
|
|
802
|
+
*
|
|
803
|
+
* Widely Available rows always show `baseline_low_date`, including rows promoted at runtime.
|
|
804
|
+
* If a feature in `featureData.low` has reached `baseline_low_date + 30 months <= currentDate` at runtime,
|
|
805
|
+
* we dynamically promote it from `low` (Newly Available) to `high` (Widely Available); promotion
|
|
806
|
+
* only changes the tier.
|
|
807
|
+
*
|
|
790
808
|
* @param {string} featureId
|
|
791
809
|
* @param {{high: Record<string, string>, low: Record<string, string>, limited: string[]}} featureData
|
|
792
810
|
* @param {Date} currentDate
|
|
@@ -801,6 +819,10 @@ declare class Baseline extends Audit {
|
|
|
801
819
|
baselineTier: "high" | "low" | "limited";
|
|
802
820
|
} | null;
|
|
803
821
|
/**
|
|
822
|
+
* Returns the `baseline_low_date` (YYYY-MM-DD, when the feature became Newly Available)
|
|
823
|
+
* for both `low` and `high` features, since `build/build-baseline-data.js` stores
|
|
824
|
+
* `baseline_low_date` in both `featureData.low` and `featureData.high`.
|
|
825
|
+
*
|
|
804
826
|
* @param {string} featureId
|
|
805
827
|
* @param {{high: Record<string, string>, low: Record<string, string>, limited: string[]}} featureData
|
|
806
828
|
* @return {string|null}
|