lighthouse 10.4.0 → 11.0.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/CONTRIBUTING.md +1 -1
- package/cli/cli-flags.d.ts +1 -6
- package/cli/cli-flags.js +0 -5
- package/cli/run.js +3 -10
- package/cli/sentry-prompt.js +4 -2
- package/cli/test/smokehouse/core-tests.js +0 -2
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +24 -14
- package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +1 -2
- package/cli/test/smokehouse/lighthouse-runners/bundle.js +12 -21
- package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +1 -3
- package/cli/test/smokehouse/lighthouse-runners/cli.js +3 -7
- package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +1 -5
- package/cli/test/smokehouse/lighthouse-runners/devtools.js +1 -12
- package/cli/test/smokehouse/readme.md +0 -2
- package/cli/test/smokehouse/report-assert.d.ts +1 -3
- package/cli/test/smokehouse/report-assert.js +2 -19
- package/cli/test/smokehouse/smokehouse.js +3 -32
- package/core/audits/accessibility/aria-allowed-role.d.ts +10 -0
- package/core/audits/accessibility/aria-allowed-role.js +46 -0
- package/core/audits/accessibility/image-redundant-alt.d.ts +10 -0
- package/core/audits/accessibility/image-redundant-alt.js +45 -0
- package/core/audits/accessibility/label-content-name-mismatch.d.ts +10 -0
- package/core/audits/accessibility/label-content-name-mismatch.js +44 -0
- package/core/audits/accessibility/skip-link.d.ts +10 -0
- package/core/audits/accessibility/skip-link.js +43 -0
- package/core/audits/accessibility/table-duplicate-name.d.ts +10 -0
- package/core/audits/accessibility/table-duplicate-name.js +44 -0
- package/core/audits/accessibility/target-size.js +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.js +2 -2
- package/core/audits/byte-efficiency/render-blocking-resources.js +1 -0
- package/core/audits/dobetterweb/uses-http2.d.ts +18 -1
- package/core/audits/dobetterweb/uses-http2.js +62 -16
- package/core/audits/installable-manifest.d.ts +1 -5
- package/core/audits/installable-manifest.js +2 -7
- package/core/audits/largest-contentful-paint-element.d.ts +0 -6
- package/core/audits/largest-contentful-paint-element.js +13 -15
- package/core/audits/metrics/{experimental-interaction-to-next-paint.d.ts → interaction-to-next-paint.d.ts} +3 -3
- package/core/audits/metrics/{experimental-interaction-to-next-paint.js → interaction-to-next-paint.js} +3 -3
- package/core/audits/uses-rel-preconnect.js +23 -8
- package/core/audits/work-during-interaction.js +2 -2
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/config/config-helpers.d.ts +3 -3
- package/core/config/config-helpers.js +5 -12
- package/core/config/config.js +1 -7
- package/core/config/constants.d.ts +0 -2
- package/core/config/constants.js +2 -18
- package/core/config/default-config.js +59 -53
- package/core/config/filters.js +1 -1
- package/core/config/validation.d.ts +7 -12
- package/core/config/validation.js +16 -26
- package/core/gather/base-artifacts.d.ts +4 -4
- package/core/gather/base-artifacts.js +2 -6
- package/core/gather/base-gatherer.d.ts +12 -37
- package/core/gather/base-gatherer.js +7 -54
- package/core/gather/driver/dom.d.ts +4 -4
- package/core/gather/driver/dom.js +2 -2
- package/core/gather/driver/environment.d.ts +4 -4
- package/core/gather/driver/environment.js +2 -2
- package/core/gather/driver/execution-context.d.ts +12 -3
- package/core/gather/driver/execution-context.js +34 -3
- package/core/gather/driver/navigation.d.ts +2 -2
- package/core/gather/driver/navigation.js +2 -5
- package/core/gather/driver/network-monitor.d.ts +7 -6
- package/core/gather/driver/network-monitor.js +4 -4
- package/core/gather/driver/network.d.ts +2 -2
- package/core/gather/driver/network.js +1 -1
- package/core/gather/driver/prepare.d.ts +10 -10
- package/core/gather/driver/prepare.js +10 -10
- package/core/gather/driver/service-workers.d.ts +4 -4
- package/core/gather/driver/service-workers.js +2 -2
- package/core/gather/driver/storage.d.ts +6 -6
- package/core/gather/driver/storage.js +3 -3
- package/core/gather/driver/target-manager.d.ts +6 -5
- package/core/gather/driver/target-manager.js +3 -3
- package/core/gather/driver/wait-for-condition.d.ts +14 -14
- package/core/gather/driver/wait-for-condition.js +8 -8
- package/core/gather/driver.d.ts +9 -6
- package/core/gather/driver.js +14 -4
- package/core/gather/fetcher.d.ts +3 -3
- package/core/gather/fetcher.js +1 -1
- package/core/gather/gatherers/accessibility.d.ts +4 -4
- package/core/gather/gatherers/accessibility.js +8 -3
- package/core/gather/gatherers/anchor-elements.d.ts +4 -4
- package/core/gather/gatherers/anchor-elements.js +4 -4
- package/core/gather/gatherers/bf-cache-failures.d.ts +8 -14
- package/core/gather/gatherers/bf-cache-failures.js +5 -14
- package/core/gather/gatherers/cache-contents.d.ts +4 -4
- package/core/gather/gatherers/cache-contents.js +3 -3
- package/core/gather/gatherers/console-messages.d.ts +6 -6
- package/core/gather/gatherers/console-messages.js +4 -4
- package/core/gather/gatherers/css-usage.d.ts +14 -14
- package/core/gather/gatherers/css-usage.js +9 -9
- package/core/gather/gatherers/devtools-log-compat.d.ts +5 -5
- package/core/gather/gatherers/devtools-log-compat.js +4 -4
- package/core/gather/gatherers/devtools-log.d.ts +6 -6
- package/core/gather/gatherers/devtools-log.js +4 -4
- package/core/gather/gatherers/dobetterweb/doctype.d.ts +4 -4
- package/core/gather/gatherers/dobetterweb/doctype.js +3 -3
- package/core/gather/gatherers/dobetterweb/domstats.d.ts +4 -4
- package/core/gather/gatherers/dobetterweb/domstats.js +3 -3
- package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +10 -22
- package/core/gather/gatherers/dobetterweb/optimized-images.js +10 -27
- package/core/gather/gatherers/dobetterweb/response-compression.d.ts +6 -12
- package/core/gather/gatherers/dobetterweb/response-compression.js +14 -21
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +8 -14
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +5 -14
- package/core/gather/gatherers/full-page-screenshot.d.ts +10 -10
- package/core/gather/gatherers/full-page-screenshot.js +7 -10
- package/core/gather/gatherers/global-listeners.d.ts +4 -4
- package/core/gather/gatherers/global-listeners.js +3 -3
- package/core/gather/gatherers/iframe-elements.d.ts +4 -4
- package/core/gather/gatherers/iframe-elements.js +3 -3
- package/core/gather/gatherers/image-elements.d.ts +10 -10
- package/core/gather/gatherers/image-elements.js +6 -6
- package/core/gather/gatherers/inputs.d.ts +4 -4
- package/core/gather/gatherers/inputs.js +3 -3
- package/core/gather/gatherers/inspector-issues.d.ts +8 -19
- package/core/gather/gatherers/inspector-issues.js +9 -26
- package/core/gather/gatherers/installability-errors.d.ts +6 -6
- package/core/gather/gatherers/installability-errors.js +4 -4
- package/core/gather/gatherers/js-usage.d.ts +6 -6
- package/core/gather/gatherers/js-usage.js +4 -4
- package/core/gather/gatherers/link-elements.d.ts +8 -20
- package/core/gather/gatherers/link-elements.js +7 -24
- package/core/gather/gatherers/main-document-content.d.ts +4 -16
- package/core/gather/gatherers/main-document-content.js +5 -23
- package/core/gather/gatherers/meta-elements.d.ts +4 -4
- package/core/gather/gatherers/meta-elements.js +3 -3
- package/core/gather/gatherers/network-user-agent.d.ts +5 -5
- package/core/gather/gatherers/network-user-agent.js +4 -4
- package/core/gather/gatherers/script-elements.d.ts +6 -11
- package/core/gather/gatherers/script-elements.js +4 -13
- package/core/gather/gatherers/scripts.d.ts +7 -6
- package/core/gather/gatherers/scripts.js +7 -9
- package/core/gather/gatherers/seo/embedded-content.d.ts +4 -4
- package/core/gather/gatherers/seo/embedded-content.js +3 -3
- package/core/gather/gatherers/seo/font-size.d.ts +6 -6
- package/core/gather/gatherers/seo/font-size.js +5 -5
- package/core/gather/gatherers/seo/robots-txt.d.ts +4 -4
- package/core/gather/gatherers/seo/robots-txt.js +3 -3
- package/core/gather/gatherers/seo/tap-targets.d.ts +8 -8
- package/core/gather/gatherers/seo/tap-targets.js +5 -5
- package/core/gather/gatherers/service-worker.d.ts +4 -10
- package/core/gather/gatherers/service-worker.js +3 -15
- package/core/gather/gatherers/source-maps.d.ts +11 -23
- package/core/gather/gatherers/source-maps.js +22 -53
- package/core/gather/gatherers/stacks.d.ts +7 -7
- package/core/gather/gatherers/stacks.js +6 -6
- package/core/gather/gatherers/trace-compat.d.ts +5 -5
- package/core/gather/gatherers/trace-compat.js +4 -4
- package/core/gather/gatherers/trace-elements.d.ts +13 -25
- package/core/gather/gatherers/trace-elements.js +19 -32
- package/core/gather/gatherers/trace.d.ts +8 -8
- package/core/gather/gatherers/trace.js +5 -5
- package/core/gather/gatherers/viewport-dimensions.d.ts +4 -4
- package/core/gather/gatherers/viewport-dimensions.js +3 -3
- package/core/gather/gatherers/web-app-manifest.d.ts +8 -8
- package/core/gather/gatherers/web-app-manifest.js +5 -5
- package/core/gather/navigation-runner.d.ts +9 -9
- package/core/gather/navigation-runner.js +14 -8
- package/core/gather/runner-helpers.d.ts +3 -3
- package/core/gather/runner-helpers.js +12 -4
- package/core/gather/session.d.ts +2 -2
- package/core/gather/session.js +1 -1
- package/core/gather/snapshot-runner.d.ts +2 -2
- package/core/gather/snapshot-runner.js +1 -1
- package/core/gather/timespan-runner.d.ts +2 -2
- package/core/gather/timespan-runner.js +1 -1
- package/core/index.cjs +0 -7
- package/core/index.d.ts +0 -15
- package/core/index.js +2 -40
- package/core/lib/asset-saver.js +14 -4
- package/core/lib/axe.js +1 -1
- package/core/lib/dependency-graph/simulator/network-analyzer.d.ts +28 -12
- package/core/lib/dependency-graph/simulator/network-analyzer.js +128 -100
- package/core/lib/emulation.d.ts +14 -14
- package/core/lib/emulation.js +7 -7
- package/core/lib/navigation-error.js +5 -0
- package/core/lib/network-recorder.d.ts +2 -1
- package/core/lib/network-recorder.js +1 -0
- package/core/lib/network-request.js +12 -3
- package/core/lib/page-functions.d.ts +10 -2
- package/core/lib/page-functions.js +85 -8
- package/core/lib/sentry.js +9 -2
- package/core/lib/stack-packs.js +4 -0
- package/core/runner.d.ts +8 -30
- package/core/runner.js +8 -39
- package/core/user-flow.d.ts +4 -4
- package/core/user-flow.js +2 -2
- package/dist/report/bundle.esm.js +2221 -5832
- package/dist/report/flow.js +2631 -235
- package/dist/report/standalone.js +2586 -234
- package/flow-report/src/i18n/i18n.d.ts +2 -2
- package/package.json +17 -24
- package/readme.md +3 -1
- package/report/assets/templates.html +3 -1
- package/report/renderer/category-renderer.d.ts +3 -2
- package/report/renderer/category-renderer.js +8 -4
- package/report/renderer/components.js +11 -5
- package/report/renderer/pwa-category-renderer.js +1 -1
- package/report/renderer/report-ui-features.js +9 -6
- package/report/renderer/report-utils.d.ts +1 -1
- package/report/renderer/report-utils.js +2 -2
- package/report/renderer/topbar-features.js +3 -0
- package/shared/localization/locales/ar-XB.json +185 -44
- package/shared/localization/locales/ar.json +185 -44
- package/shared/localization/locales/bg.json +185 -44
- package/shared/localization/locales/ca.json +190 -49
- package/shared/localization/locales/cs.json +185 -44
- package/shared/localization/locales/da.json +185 -44
- package/shared/localization/locales/de.json +185 -44
- package/shared/localization/locales/el.json +185 -44
- package/shared/localization/locales/en-GB.json +185 -44
- package/shared/localization/locales/en-US.json +99 -45
- package/shared/localization/locales/en-XA.json +185 -44
- package/shared/localization/locales/en-XL.json +99 -45
- package/shared/localization/locales/es-419.json +185 -44
- package/shared/localization/locales/es.json +185 -44
- package/shared/localization/locales/fi.json +185 -44
- package/shared/localization/locales/fil.json +185 -44
- package/shared/localization/locales/fr.json +185 -44
- package/shared/localization/locales/he.json +186 -45
- package/shared/localization/locales/hi.json +185 -44
- package/shared/localization/locales/hr.json +185 -44
- package/shared/localization/locales/hu.json +185 -44
- package/shared/localization/locales/id.json +185 -44
- package/shared/localization/locales/it.json +185 -44
- package/shared/localization/locales/ja.json +185 -44
- package/shared/localization/locales/ko.json +185 -44
- package/shared/localization/locales/lt.json +185 -44
- package/shared/localization/locales/lv.json +185 -44
- package/shared/localization/locales/nl.json +185 -44
- package/shared/localization/locales/no.json +185 -44
- package/shared/localization/locales/pl.json +185 -44
- package/shared/localization/locales/pt-PT.json +185 -44
- package/shared/localization/locales/pt.json +190 -49
- package/shared/localization/locales/ro.json +185 -44
- package/shared/localization/locales/ru.json +185 -44
- package/shared/localization/locales/sk.json +185 -44
- package/shared/localization/locales/sl.json +185 -44
- package/shared/localization/locales/sr-Latn.json +185 -44
- package/shared/localization/locales/sr.json +185 -44
- package/shared/localization/locales/sv.json +185 -44
- package/shared/localization/locales/ta.json +185 -44
- package/shared/localization/locales/te.json +185 -44
- package/shared/localization/locales/th.json +185 -44
- package/shared/localization/locales/tr.json +185 -44
- package/shared/localization/locales/uk.json +185 -44
- package/shared/localization/locales/vi.json +185 -44
- package/shared/localization/locales/zh-HK.json +185 -44
- package/shared/localization/locales/zh-TW.json +185 -44
- package/shared/localization/locales/zh.json +185 -44
- package/third-party/esbuild-plugins-polyfills/LICENSE +3 -0
- package/third-party/esbuild-plugins-polyfills/README.md +7 -0
- package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.d.ts +9 -0
- package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.js +129 -0
- package/tsconfig.json +2 -1
- package/types/artifacts.d.ts +16 -45
- package/types/config.d.ts +10 -52
- package/types/externs.d.ts +0 -2
- package/types/gatherer.d.ts +24 -47
- package/types/internal/rxjs.d.ts +26 -0
- package/types/internal/smokehouse.d.ts +1 -3
- package/types/lh.d.ts +0 -2
- package/types/lhr/settings.d.ts +1 -1
- package/core/audits/metrics/first-contentful-paint-3g.d.ts +0 -15
- package/core/audits/metrics/first-contentful-paint-3g.js +0 -69
- package/core/audits/resource-summary.d.ts +0 -16
- package/core/audits/resource-summary.js +0 -104
- package/core/audits/service-worker.d.ts +0 -46
- package/core/audits/service-worker.js +0 -182
- package/core/gather/gatherers/gatherer.d.ts +0 -46
- package/core/gather/gatherers/gatherer.js +0 -58
- package/core/legacy/config/config.d.ts +0 -107
- package/core/legacy/config/config.js +0 -566
- package/core/legacy/config/legacy-default-config.d.ts +0 -4
- package/core/legacy/config/legacy-default-config.js +0 -87
- package/core/legacy/gather/connections/connection.d.ts +0 -77
- package/core/legacy/gather/connections/connection.js +0 -196
- package/core/legacy/gather/connections/cri.d.ts +0 -27
- package/core/legacy/gather/connections/cri.js +0 -162
- package/core/legacy/gather/connections/raw.d.ts +0 -20
- package/core/legacy/gather/connections/raw.js +0 -57
- package/core/legacy/gather/driver.d.ts +0 -216
- package/core/legacy/gather/driver.js +0 -480
- package/core/legacy/gather/gather-runner.d.ts +0 -166
- package/core/legacy/gather/gather-runner.js +0 -590
- package/types/internal/lighthouse-logger.d.ts +0 -34
|
@@ -17,6 +17,15 @@
|
|
|
17
17
|
"core/audits/accessibility/aria-allowed-attr.js | title": {
|
|
18
18
|
"message": "`[aria-*]` 属性与其角色匹配"
|
|
19
19
|
},
|
|
20
|
+
"core/audits/accessibility/aria-allowed-role.js | description": {
|
|
21
|
+
"message": "ARIA `role`s enable assistive technologies to know the role of each element on the web page. If the `role` values are misspelled, not existing ARIA `role` values, or abstract roles, then the purpose of the element will not be communicated to users of assistive technologies. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.7/aria-allowed-roles)."
|
|
22
|
+
},
|
|
23
|
+
"core/audits/accessibility/aria-allowed-role.js | failureTitle": {
|
|
24
|
+
"message": "Values assigned to `role=\"\"` are not valid ARIA roles."
|
|
25
|
+
},
|
|
26
|
+
"core/audits/accessibility/aria-allowed-role.js | title": {
|
|
27
|
+
"message": "Values assigned to `role=\"\"` are valid ARIA roles."
|
|
28
|
+
},
|
|
20
29
|
"core/audits/accessibility/aria-command-name.js | description": {
|
|
21
30
|
"message": "如果某个元素没有无障碍名称,屏幕阅读器会将它读为通用名称,这会导致依赖屏幕阅读器的用户无法使用它。[了解如何让命令元素更便于使用](https://dequeuniversity.com/rules/axe/4.7/aria-command-name)。"
|
|
22
31
|
},
|
|
@@ -26,6 +35,15 @@
|
|
|
26
35
|
"core/audits/accessibility/aria-command-name.js | title": {
|
|
27
36
|
"message": "`button`、`link` 和 `menuitem` 元素都有可供访问的名称"
|
|
28
37
|
},
|
|
38
|
+
"core/audits/accessibility/aria-dialog-name.js | description": {
|
|
39
|
+
"message": "如果 ARIA 对话框元素缺少无障碍名称,可能会妨碍屏幕阅读器用户理解这些元素的用途。[了解如何让 ARIA 对话框元素更符合无障碍需求](https://dequeuniversity.com/rules/axe/4.7/aria-dialog-name)。"
|
|
40
|
+
},
|
|
41
|
+
"core/audits/accessibility/aria-dialog-name.js | failureTitle": {
|
|
42
|
+
"message": "具有 `role=\"dialog\"` 或 `role=\"alertdialog\"` 的元素缺少无障碍名称。"
|
|
43
|
+
},
|
|
44
|
+
"core/audits/accessibility/aria-dialog-name.js | title": {
|
|
45
|
+
"message": "具有 `role=\"dialog\"` 或 `role=\"alertdialog\"` 的元素均有无障碍名称。"
|
|
46
|
+
},
|
|
29
47
|
"core/audits/accessibility/aria-hidden-body.js | description": {
|
|
30
48
|
"message": "在文档 `<body>` 上设置 `aria-hidden=\"true\"` 后,辅助技术(如屏幕阅读器)的工作方式不一致。[了解 `aria-hidden` 对文档正文的影响](https://dequeuniversity.com/rules/axe/4.7/aria-hidden-body)。"
|
|
31
49
|
},
|
|
@@ -107,6 +125,15 @@
|
|
|
107
125
|
"core/audits/accessibility/aria-roles.js | title": {
|
|
108
126
|
"message": "`[role]` 值有效"
|
|
109
127
|
},
|
|
128
|
+
"core/audits/accessibility/aria-text.js | description": {
|
|
129
|
+
"message": "在一个被标记分隔的文本节点周围添加 `role=text` 后,VoiceOver 会将该文本元素视为一个短语,但不会读出它的可聚焦后代元素。[详细了解 `role=text` 属性](https://dequeuniversity.com/rules/axe/4.7/aria-text)。"
|
|
130
|
+
},
|
|
131
|
+
"core/audits/accessibility/aria-text.js | failureTitle": {
|
|
132
|
+
"message": "具有 `role=text` 属性的元素包含可聚焦后代元素。"
|
|
133
|
+
},
|
|
134
|
+
"core/audits/accessibility/aria-text.js | title": {
|
|
135
|
+
"message": "具有 `role=text` 属性的元素缺少可聚焦后代元素。"
|
|
136
|
+
},
|
|
110
137
|
"core/audits/accessibility/aria-toggle-field-name.js | description": {
|
|
111
138
|
"message": "如果某个切换字段没有无障碍名称,屏幕阅读器会将它读为通用名称,这会导致依赖屏幕阅读器的用户无法使用它。[详细了解切换字段](https://dequeuniversity.com/rules/axe/4.7/aria-toggle-field-name)。"
|
|
112
139
|
},
|
|
@@ -227,6 +254,15 @@
|
|
|
227
254
|
"core/audits/accessibility/duplicate-id-aria.js | title": {
|
|
228
255
|
"message": "ARIA ID 都是独一无二的"
|
|
229
256
|
},
|
|
257
|
+
"core/audits/accessibility/empty-heading.js | description": {
|
|
258
|
+
"message": "如果标题元素未包含任何内容或包含无法读取的文本,屏幕阅读器用户将难以获取网页的结构信息。[详细了解标题](https://dequeuniversity.com/rules/axe/4.7/empty-heading)。"
|
|
259
|
+
},
|
|
260
|
+
"core/audits/accessibility/empty-heading.js | failureTitle": {
|
|
261
|
+
"message": "标题元素未包含任何内容。"
|
|
262
|
+
},
|
|
263
|
+
"core/audits/accessibility/empty-heading.js | title": {
|
|
264
|
+
"message": "所有标题元素均包含内容。"
|
|
265
|
+
},
|
|
230
266
|
"core/audits/accessibility/form-field-multiple-labels.js | description": {
|
|
231
267
|
"message": "有多个标签的表单字段可能会被辅助技术(如屏幕阅读器)以令人困惑的方式播报出来,因为这些辅助技术可能会使用第一个标签或最后一个标签,也可能会使用所有标签。[了解如何使用表单标签](https://dequeuniversity.com/rules/axe/4.7/form-field-multiple-labels)。"
|
|
232
268
|
},
|
|
@@ -281,6 +317,15 @@
|
|
|
281
317
|
"core/audits/accessibility/html-xml-lang-mismatch.js | title": {
|
|
282
318
|
"message": "`<html>` 元素的 `[xml:lang]` 属性与 `[lang]` 属性使用了相同的基本语言。"
|
|
283
319
|
},
|
|
320
|
+
"core/audits/accessibility/identical-links-same-purpose.js | description": {
|
|
321
|
+
"message": "指向相同目标位置的链接应具有相同的说明,这有助于用户了解链接的用途并决定是否要访问它。[详细了解相同链接](https://dequeuniversity.com/rules/axe/4.7/identical-links-same-purpose)。"
|
|
322
|
+
},
|
|
323
|
+
"core/audits/accessibility/identical-links-same-purpose.js | failureTitle": {
|
|
324
|
+
"message": "相同链接的用途不一致。"
|
|
325
|
+
},
|
|
326
|
+
"core/audits/accessibility/identical-links-same-purpose.js | title": {
|
|
327
|
+
"message": "相同链接的用途一致。"
|
|
328
|
+
},
|
|
284
329
|
"core/audits/accessibility/image-alt.js | description": {
|
|
285
330
|
"message": "说明性元素应力求使用简短的描述性替代文字。未指定 alt 属性的装饰性元素可被忽略。[详细了解 `alt` 属性](https://dequeuniversity.com/rules/axe/4.7/image-alt)。"
|
|
286
331
|
},
|
|
@@ -290,6 +335,15 @@
|
|
|
290
335
|
"core/audits/accessibility/image-alt.js | title": {
|
|
291
336
|
"message": "图片元素具备 `[alt]` 属性"
|
|
292
337
|
},
|
|
338
|
+
"core/audits/accessibility/image-redundant-alt.js | description": {
|
|
339
|
+
"message": "Informative elements should aim for short, descriptive alternative text. Alternative text that is exactly the same as the text adjacent to the link or image is potentially confusing for screen reader users, because the text will be read twice. [Learn more about the `alt` attribute](https://dequeuniversity.com/rules/axe/4.7/image-redundant-alt)."
|
|
340
|
+
},
|
|
341
|
+
"core/audits/accessibility/image-redundant-alt.js | failureTitle": {
|
|
342
|
+
"message": "Image elements have `[alt]` attributes that are redundant text."
|
|
343
|
+
},
|
|
344
|
+
"core/audits/accessibility/image-redundant-alt.js | title": {
|
|
345
|
+
"message": "Image elements do not have `[alt]` attributes that are redundant text."
|
|
346
|
+
},
|
|
293
347
|
"core/audits/accessibility/input-button-name.js | description": {
|
|
294
348
|
"message": "向输入按钮添加可识别的无障碍文本可帮助屏幕阅读器用户了解输入按钮的用途。[详细了解输入按钮](https://dequeuniversity.com/rules/axe/4.7/input-button-name)。"
|
|
295
349
|
},
|
|
@@ -308,6 +362,15 @@
|
|
|
308
362
|
"core/audits/accessibility/input-image-alt.js | title": {
|
|
309
363
|
"message": "`<input type=\"image\">` 元素有对应的 `[alt]` 文字"
|
|
310
364
|
},
|
|
365
|
+
"core/audits/accessibility/label-content-name-mismatch.js | description": {
|
|
366
|
+
"message": "Visible text labels that do not match the accessible name can result in a confusing experience for screen reader users. [Learn more about accessible names](https://dequeuniversity.com/rules/axe/4.7/label-content-name-mismatch)."
|
|
367
|
+
},
|
|
368
|
+
"core/audits/accessibility/label-content-name-mismatch.js | failureTitle": {
|
|
369
|
+
"message": "Elements with visible text labels do not have matching accessible names."
|
|
370
|
+
},
|
|
371
|
+
"core/audits/accessibility/label-content-name-mismatch.js | title": {
|
|
372
|
+
"message": "Elements with visible text labels have matching accessible names."
|
|
373
|
+
},
|
|
311
374
|
"core/audits/accessibility/label.js | description": {
|
|
312
375
|
"message": "标签可确保辅助技术(如屏幕阅读器)正确读出表单控件。[详细了解表单元素标签](https://dequeuniversity.com/rules/axe/4.7/label)。"
|
|
313
376
|
},
|
|
@@ -317,6 +380,24 @@
|
|
|
317
380
|
"core/audits/accessibility/label.js | title": {
|
|
318
381
|
"message": "表单元素具有关联的标签"
|
|
319
382
|
},
|
|
383
|
+
"core/audits/accessibility/landmark-one-main.js | description": {
|
|
384
|
+
"message": "主要位置标记有助于屏幕阅读器用户浏览网页。[详细了解位置标记](https://dequeuniversity.com/rules/axe/4.7/landmark-one-main)。"
|
|
385
|
+
},
|
|
386
|
+
"core/audits/accessibility/landmark-one-main.js | failureTitle": {
|
|
387
|
+
"message": "文档缺少主要位置标记。"
|
|
388
|
+
},
|
|
389
|
+
"core/audits/accessibility/landmark-one-main.js | title": {
|
|
390
|
+
"message": "文档有一个主要位置标记。"
|
|
391
|
+
},
|
|
392
|
+
"core/audits/accessibility/link-in-text-block.js | description": {
|
|
393
|
+
"message": "对许多用户而言,对比度低的文本都是难以阅读或无法阅读的。清晰可辨的链接文本可改善弱视用户的体验。[了解如何让链接容易辨识](https://dequeuniversity.com/rules/axe/4.7/link-in-text-block)。"
|
|
394
|
+
},
|
|
395
|
+
"core/audits/accessibility/link-in-text-block.js | failureTitle": {
|
|
396
|
+
"message": "必须依赖颜色才能辨识链接。"
|
|
397
|
+
},
|
|
398
|
+
"core/audits/accessibility/link-in-text-block.js | title": {
|
|
399
|
+
"message": "无需依赖颜色即可辨识链接。"
|
|
400
|
+
},
|
|
320
401
|
"core/audits/accessibility/link-name.js | description": {
|
|
321
402
|
"message": "请确保链接文字(以及用作链接的图片替代文字)可识别、独一无二且可聚焦,这样做会提升屏幕阅读器用户的导航体验。[了解如何使链接可供访问](https://dequeuniversity.com/rules/axe/4.7/link-name)。"
|
|
322
403
|
},
|
|
@@ -371,6 +452,24 @@
|
|
|
371
452
|
"core/audits/accessibility/object-alt.js | title": {
|
|
372
453
|
"message": "`<object>` 元素有对应的替代文字"
|
|
373
454
|
},
|
|
455
|
+
"core/audits/accessibility/select-name.js | description": {
|
|
456
|
+
"message": "如果表单元素缺少有效标签,可能会给屏幕阅读器用户带来糟糕的体验。[详细了解 `select` 元素](https://dequeuniversity.com/rules/axe/4.7/select-name)。"
|
|
457
|
+
},
|
|
458
|
+
"core/audits/accessibility/select-name.js | failureTitle": {
|
|
459
|
+
"message": "select 元素缺少关联的标签元素。"
|
|
460
|
+
},
|
|
461
|
+
"core/audits/accessibility/select-name.js | title": {
|
|
462
|
+
"message": "select 元素具有关联的标签元素。"
|
|
463
|
+
},
|
|
464
|
+
"core/audits/accessibility/skip-link.js | description": {
|
|
465
|
+
"message": "Including a skip link can help users skip to the main content to save time. [Learn more about skip links](https://dequeuniversity.com/rules/axe/4.7/skip-link)."
|
|
466
|
+
},
|
|
467
|
+
"core/audits/accessibility/skip-link.js | failureTitle": {
|
|
468
|
+
"message": "Skip links are not focusable."
|
|
469
|
+
},
|
|
470
|
+
"core/audits/accessibility/skip-link.js | title": {
|
|
471
|
+
"message": "Skip links are focusable."
|
|
472
|
+
},
|
|
374
473
|
"core/audits/accessibility/tabindex.js | description": {
|
|
375
474
|
"message": "值大于 0 意味着明确的导航顺序。尽管这在技术上可行,但往往会让依赖辅助技术的用户感到沮丧。[详细了解 `tabindex` 属性](https://dequeuniversity.com/rules/axe/4.7/tabindex)。"
|
|
376
475
|
},
|
|
@@ -380,6 +479,15 @@
|
|
|
380
479
|
"core/audits/accessibility/tabindex.js | title": {
|
|
381
480
|
"message": "所有元素的 `[tabindex]` 值都不大于 0"
|
|
382
481
|
},
|
|
482
|
+
"core/audits/accessibility/table-duplicate-name.js | description": {
|
|
483
|
+
"message": "The summary attribute should describe the table structure, while `<caption>` should have the onscreen title. Accurate table mark-up helps users of screen readers. [Learn more about summary and caption](https://dequeuniversity.com/rules/axe/4.7/table-duplicate-name)."
|
|
484
|
+
},
|
|
485
|
+
"core/audits/accessibility/table-duplicate-name.js | failureTitle": {
|
|
486
|
+
"message": "Tables have the same content in the summary attribute and `<caption>.`"
|
|
487
|
+
},
|
|
488
|
+
"core/audits/accessibility/table-duplicate-name.js | title": {
|
|
489
|
+
"message": "Tables have different content in the summary attribute and `<caption>`."
|
|
490
|
+
},
|
|
383
491
|
"core/audits/accessibility/table-fake-caption.js | description": {
|
|
384
492
|
"message": "屏幕阅读器提供了更便于用户浏览表格内容的功能。请务必确保表格实际使用了 <caption> 元素(而非带有 `[colspan]` 属性的单元格),这可以提升屏幕阅读器用户的体验。[详细了解表格标题](https://dequeuniversity.com/rules/axe/4.7/table-fake-caption)。"
|
|
385
493
|
},
|
|
@@ -389,6 +497,15 @@
|
|
|
389
497
|
"core/audits/accessibility/table-fake-caption.js | title": {
|
|
390
498
|
"message": "表格使用了 `<caption>`(而非带有 `[colspan]` 属性的单元格)来表示表格标题。"
|
|
391
499
|
},
|
|
500
|
+
"core/audits/accessibility/target-size.js | description": {
|
|
501
|
+
"message": "Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.7/target-size)."
|
|
502
|
+
},
|
|
503
|
+
"core/audits/accessibility/target-size.js | failureTitle": {
|
|
504
|
+
"message": "触摸目标的尺寸或间距不足。"
|
|
505
|
+
},
|
|
506
|
+
"core/audits/accessibility/target-size.js | title": {
|
|
507
|
+
"message": "触摸目标的尺寸和间距足够大。"
|
|
508
|
+
},
|
|
392
509
|
"core/audits/accessibility/td-has-header.js | description": {
|
|
393
510
|
"message": "屏幕阅读器提供了更便于用户浏览表格内容的功能。请务必确保大型表格(宽度和高度至少为 3 个单元格)中的 `<td>` 元素具有关联的表格标头,这可以提升屏幕阅读器用户的体验。[详细了解表格标头](https://dequeuniversity.com/rules/axe/4.7/td-has-header)。"
|
|
394
511
|
},
|
|
@@ -938,9 +1055,6 @@
|
|
|
938
1055
|
"core/audits/installable-manifest.js | no-manifest": {
|
|
939
1056
|
"message": "该网页没有清单 <link> 网址"
|
|
940
1057
|
},
|
|
941
|
-
"core/audits/installable-manifest.js | no-matching-service-worker": {
|
|
942
|
-
"message": "未检测到任何相符的 Service Worker。您可能需要重新加载网页,或检查当前网页的 Service Worker 范围是否包含清单中的范围和起始网址。"
|
|
943
|
-
},
|
|
944
1058
|
"core/audits/installable-manifest.js | no-url-for-service-worker": {
|
|
945
1059
|
"message": "如果清单不含“start_url”字段,则无法检查 Service Worker"
|
|
946
1060
|
},
|
|
@@ -969,7 +1083,7 @@
|
|
|
969
1083
|
"message": "prefer_related_applications 仅适用于 Android 设备上的 Chrome Beta 版和稳定版。"
|
|
970
1084
|
},
|
|
971
1085
|
"core/audits/installable-manifest.js | protocol-timeout": {
|
|
972
|
-
"message": "Lighthouse
|
|
1086
|
+
"message": "Lighthouse could not determine if the page is installable. Please try with a newer version of Chrome."
|
|
973
1087
|
},
|
|
974
1088
|
"core/audits/installable-manifest.js | scheme-not-supported-for-webapk": {
|
|
975
1089
|
"message": "清单网址的架构 ({scheme}) 在 Android 设备上不受支持。"
|
|
@@ -1112,15 +1226,15 @@
|
|
|
1112
1226
|
"core/audits/metrics/cumulative-layout-shift.js | description": {
|
|
1113
1227
|
"message": "Cumulative Layout Shift 旨在衡量可见元素在视口内的移动情况。[详细了解 Cumulative Layout Shift 指标](https://web.dev/cls/)。"
|
|
1114
1228
|
},
|
|
1115
|
-
"core/audits/metrics/experimental-interaction-to-next-paint.js | description": {
|
|
1116
|
-
"message": "Interaction to Next Paint 用于衡量网页响应速度,即网页需要多久才会明显响应用户输入。[详细了解 Interaction to Next Paint 指标](https://web.dev/inp/)。"
|
|
1117
|
-
},
|
|
1118
1229
|
"core/audits/metrics/first-contentful-paint.js | description": {
|
|
1119
1230
|
"message": "First Contentful Paint 标记了绘制出首个文本或首张图片的时间。[详细了解 First Contentful Paint 指标](https://developer.chrome.com/docs/lighthouse/performance/first-contentful-paint/)。"
|
|
1120
1231
|
},
|
|
1121
1232
|
"core/audits/metrics/first-meaningful-paint.js | description": {
|
|
1122
1233
|
"message": "“首次有效绘制时间”测量的是网页主要内容开始对用户显示的时间。[详细了解“首次有效绘制时间”指标](https://developer.chrome.com/docs/lighthouse/performance/first-meaningful-paint/)。"
|
|
1123
1234
|
},
|
|
1235
|
+
"core/audits/metrics/interaction-to-next-paint.js | description": {
|
|
1236
|
+
"message": "Interaction to Next Paint 用于衡量网页响应速度,即网页需要多久才会明显响应用户输入。[详细了解 Interaction to Next Paint 指标](https://web.dev/inp/)。"
|
|
1237
|
+
},
|
|
1124
1238
|
"core/audits/metrics/interactive.js | description": {
|
|
1125
1239
|
"message": "“Time to Interactive”是指网页需要多长时间才能提供完整的交互功能。[详细了解“Time to Interactive”指标](https://developer.chrome.com/docs/lighthouse/performance/interactive/)。"
|
|
1126
1240
|
},
|
|
@@ -1214,15 +1328,6 @@
|
|
|
1214
1328
|
"core/audits/redirects.js | title": {
|
|
1215
1329
|
"message": "避免多次网页重定向"
|
|
1216
1330
|
},
|
|
1217
|
-
"core/audits/resource-summary.js | description": {
|
|
1218
|
-
"message": "若要根据页面资源的数量和大小设置预算,请添加 budget.json 文件。[详细了解性能预算](https://web.dev/use-lighthouse-for-performance-budgets/)。"
|
|
1219
|
-
},
|
|
1220
|
-
"core/audits/resource-summary.js | displayValue": {
|
|
1221
|
-
"message": "{requestCount,plural, =1{1 项请求 • {byteCount, number, bytes} KiB}other{# 项请求 • {byteCount, number, bytes} KiB}}"
|
|
1222
|
-
},
|
|
1223
|
-
"core/audits/resource-summary.js | title": {
|
|
1224
|
-
"message": "请保持较低的请求数量和较小的传输大小"
|
|
1225
|
-
},
|
|
1226
1331
|
"core/audits/seo/canonical.js | description": {
|
|
1227
1332
|
"message": "规范链接用于建议应在搜索结果中显示哪个网址。[详细了解规范链接](https://developer.chrome.com/docs/lighthouse/seo/canonical/)。"
|
|
1228
1333
|
},
|
|
@@ -1412,27 +1517,6 @@
|
|
|
1412
1517
|
"core/audits/server-response-time.js | title": {
|
|
1413
1518
|
"message": "初始服务器响应用时较短"
|
|
1414
1519
|
},
|
|
1415
|
-
"core/audits/service-worker.js | description": {
|
|
1416
|
-
"message": "Service Worker 是一项技术,可让您的应用使用很多渐进式 Web 应用功能,例如离线、添加到主屏幕和推送通知。[详细了解 Service Worker](https://developer.chrome.com/docs/lighthouse/pwa/service-worker/)。"
|
|
1417
|
-
},
|
|
1418
|
-
"core/audits/service-worker.js | explanationBadManifest": {
|
|
1419
|
-
"message": "此网页由 Service Worker 控制,但由于清单未能解析为有效的 JSON,因此未找到 `start_url`"
|
|
1420
|
-
},
|
|
1421
|
-
"core/audits/service-worker.js | explanationBadStartUrl": {
|
|
1422
|
-
"message": "此网页由 Service Worker 控制,但 `start_url` ({startUrl}) 不在 Service Worker 的控制范围内 ({scopeUrl})"
|
|
1423
|
-
},
|
|
1424
|
-
"core/audits/service-worker.js | explanationNoManifest": {
|
|
1425
|
-
"message": "此网页由 Service Worker 控制,但由于未提取任何清单,因此未找到 `start_url`。"
|
|
1426
|
-
},
|
|
1427
|
-
"core/audits/service-worker.js | explanationOutOfScope": {
|
|
1428
|
-
"message": "此来源有一个或多个 Service Worker,但网页 ({pageUrl}) 不在控制范围内。"
|
|
1429
|
-
},
|
|
1430
|
-
"core/audits/service-worker.js | failureTitle": {
|
|
1431
|
-
"message": "无法注册用于控制网页和 `start_url` 的 Service Worker"
|
|
1432
|
-
},
|
|
1433
|
-
"core/audits/service-worker.js | title": {
|
|
1434
|
-
"message": "注册用于控制网页和 `start_url` 的 Service Worker"
|
|
1435
|
-
},
|
|
1436
1520
|
"core/audits/splash-screen.js | description": {
|
|
1437
1521
|
"message": "选定主题的启动画面可确保用户在从主屏幕中启动您的应用时获得优质体验。[详细了解启动画面](https://developer.chrome.com/docs/lighthouse/pwa/splash-screen/)。"
|
|
1438
1522
|
},
|
|
@@ -1623,7 +1707,7 @@
|
|
|
1623
1707
|
"message": "最佳做法"
|
|
1624
1708
|
},
|
|
1625
1709
|
"core/config/default-config.js | a11yCategoryDescription": {
|
|
1626
|
-
"message": "
|
|
1710
|
+
"message": "These checks highlight opportunities to [improve the accessibility of your web app](https://developer.chrome.com/docs/lighthouse/accessibility/). Automatic detection can only detect a subset of issues and does not guarantee the accessibility of your web app, so [manual testing](https://web.dev/how-to-review/) is also encouraged."
|
|
1627
1711
|
},
|
|
1628
1712
|
"core/config/default-config.js | a11yCategoryManualDescription": {
|
|
1629
1713
|
"message": "这些条目旨在检查自动化测试工具未涵盖的方面。如需了解详情,请参阅有关如何[执行无障碍功能审查](https://web.dev/how-to-review/)的指南。"
|
|
@@ -2769,7 +2853,7 @@
|
|
|
2769
2853
|
"message": "安装可延迟加载图片的 [Drupal 模块](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A67&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=%22lazy+load%22&solrsort=iss_project_release_usage+desc&op=Search)。此类模块能够推迟加载所有的屏幕外图片,进而提高性能。"
|
|
2770
2854
|
},
|
|
2771
2855
|
"node_modules/lighthouse-stack-packs/packs/drupal.js | render-blocking-resources": {
|
|
2772
|
-
"message": "
|
|
2856
|
+
"message": "Consider using a module to inline critical CSS and JavaScript, and use the defer attribute for non-critical CSS or JavaScript."
|
|
2773
2857
|
},
|
|
2774
2858
|
"node_modules/lighthouse-stack-packs/packs/drupal.js | server-response-time": {
|
|
2775
2859
|
"message": "主题背景、模块和服务器规格都会影响服务器响应用时。建议您查找更优化的主题背景、仔细选择优化模块并/或升级您的服务器。您的托管服务器应该使用 PHP 运算码缓存、内存缓存(例如 Redis 或 Memcached)来缩短数据库查询时间,并优化应用逻辑以加快网页准备速度。"
|
|
@@ -2778,10 +2862,10 @@
|
|
|
2778
2862
|
"message": "建议您使用[自适应图片样式](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8)减小在您网页上加载的图片的大小。如果您使用 Views 在网页上显示多个内容项,请考虑实现分页,以限制给定网页上显示的内容项的数量。"
|
|
2779
2863
|
},
|
|
2780
2864
|
"node_modules/lighthouse-stack-packs/packs/drupal.js | unminified-css": {
|
|
2781
|
-
"message": "
|
|
2865
|
+
"message": "Ensure you have enabled \"Aggregate CSS files\" in the \"Administration » Configuration » Development\" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support."
|
|
2782
2866
|
},
|
|
2783
2867
|
"node_modules/lighthouse-stack-packs/packs/drupal.js | unminified-javascript": {
|
|
2784
|
-
"message": "
|
|
2868
|
+
"message": "Ensure you have enabled \"Aggregate JavaScript files\" in the \"Administration » Configuration » Development\" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support."
|
|
2785
2869
|
},
|
|
2786
2870
|
"node_modules/lighthouse-stack-packs/packs/drupal.js | unused-css-rules": {
|
|
2787
2871
|
"message": "建议您移除未使用的 CSS 规则,仅将所需的 Drupal 库附加到相关网页或网页中的组件。如需了解详情,请访问 [Drupal 文档链接](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library)。若想找出会添加无关 CSS 的附加库,请尝试在 Chrome 开发者工具中运行[代码覆盖率](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage)测试。在 Drupal 网站中停用 CSS 聚合后,您可根据样式表网址找出导致问题的主题背景/模块。请留意列表中哪些主题背景/模块有大量样式表的代码覆盖率偏红。主题背景/模块应该只将网页中确实用到的样式表加入队列。"
|
|
@@ -2981,6 +3065,48 @@
|
|
|
2981
3065
|
"node_modules/lighthouse-stack-packs/packs/next.js | uses-text-compression": {
|
|
2982
3066
|
"message": "请在您的 Next.js 服务器上启用压缩功能。[了解详情](https://nextjs.org/docs/api-reference/next.config.js/compression)。"
|
|
2983
3067
|
},
|
|
3068
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | dom-size": {
|
|
3069
|
+
"message": "Contact your account manager to enable [`HTML Lazy Load`](https://support.nitropack.io/hc/en-us/articles/17144942904337). Configuring it will prioritize and optimize your page rendering performance."
|
|
3070
|
+
},
|
|
3071
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | font-display": {
|
|
3072
|
+
"message": "Use the [`Override Font Rendering Behavior`](https://support.nitropack.io/hc/en-us/articles/16547358865041) option in NitroPack to set a desired value for the CSS font-display rule."
|
|
3073
|
+
},
|
|
3074
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | modern-image-formats": {
|
|
3075
|
+
"message": "Use [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/16547237162513) to automatically convert your images to WebP."
|
|
3076
|
+
},
|
|
3077
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | offscreen-images": {
|
|
3078
|
+
"message": "Defer offscreen images by enabling [`Automatic Image Lazy Loading`](https://support.nitropack.io/hc/en-us/articles/12457493524369-NitroPack-Lazy-Loading-Feature-for-Images)."
|
|
3079
|
+
},
|
|
3080
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | render-blocking-resources": {
|
|
3081
|
+
"message": "Enable [`Remove render-blocking resources`](https://support.nitropack.io/hc/en-us/articles/13820893500049-How-to-Deal-with-Render-Blocking-Resources-in-NitroPack) in NitroPack for faster initial load times."
|
|
3082
|
+
},
|
|
3083
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | server-response-time": {
|
|
3084
|
+
"message": "Improve server response time and optimize perceived performance by activating [`Instant Load`](https://support.nitropack.io/hc/en-us/articles/16547340617361)."
|
|
3085
|
+
},
|
|
3086
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | unminified-css": {
|
|
3087
|
+
"message": "Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your CSS, HTML, and JavaScript files for faster load times."
|
|
3088
|
+
},
|
|
3089
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | unminified-javascript": {
|
|
3090
|
+
"message": "Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your JS, HTML, and CSS files for faster load times."
|
|
3091
|
+
},
|
|
3092
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | unused-css-rules": {
|
|
3093
|
+
"message": "Enable [`Reduce Unused CSS`](https://support.nitropack.io/hc/en-us/articles/360020418457-Reduce-Unused-CSS) to remove CSS rules that are not applicable to this page."
|
|
3094
|
+
},
|
|
3095
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | unused-javascript": {
|
|
3096
|
+
"message": "Configure [`Delayed Scripts`](https://support.nitropack.io/hc/en-us/articles/1500002600942-Delayed-Scripts) in NitroPack to delay loading of scripts until they are needed."
|
|
3097
|
+
},
|
|
3098
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-long-cache-ttl": {
|
|
3099
|
+
"message": "Go to the [`Improve Server Response Time`](https://support.nitropack.io/hc/en-us/articles/1500002321821-Improve-Server-Response-Time) feature in the `Caching` menu and adjust your page cache expiration time to improve loading times and user experience."
|
|
3100
|
+
},
|
|
3101
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-optimized-images": {
|
|
3102
|
+
"message": "Automatically compress, optimize, and convert your images into WebP by enabling the [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/14177271695121-How-to-serve-images-in-next-gen-formats-using-NitroPack) setting."
|
|
3103
|
+
},
|
|
3104
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-responsive-images": {
|
|
3105
|
+
"message": "Enable [`Adaptive Image Sizing`](https://support.nitropack.io/hc/en-us/articles/10123833029905-How-to-Enable-Adaptive-Image-Sizing-For-Your-Site) to preemptively optimize your images and make them match the dimensions of the containers they’re displayed in across all devices."
|
|
3106
|
+
},
|
|
3107
|
+
"node_modules/lighthouse-stack-packs/packs/nitropack.js | uses-text-compression": {
|
|
3108
|
+
"message": "Use [`Gzip compression`](https://support.nitropack.io/hc/en-us/articles/13229297479313-Enabling-GZIP-compression) in NitroPack to reduce the size of the files that are sent to the browser."
|
|
3109
|
+
},
|
|
2984
3110
|
"node_modules/lighthouse-stack-packs/packs/nuxt.js | modern-image-formats": {
|
|
2985
3111
|
"message": "请使用 `nuxt/image` 组件并采用如下设置:`format=\"webp\"`。[了解详情](https://image.nuxtjs.org/components/nuxt-img#format)。"
|
|
2986
3112
|
},
|
|
@@ -3062,6 +3188,21 @@
|
|
|
3062
3188
|
"node_modules/lighthouse-stack-packs/packs/react.js | user-timings": {
|
|
3063
3189
|
"message": "使用 React DevTools Profiler,从而利用 Profiler API 来衡量组件的呈现性能。[了解详情](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)。"
|
|
3064
3190
|
},
|
|
3191
|
+
"node_modules/lighthouse-stack-packs/packs/wix.js | efficient-animated-content": {
|
|
3192
|
+
"message": "请将视频放置在 `VideoBoxes` 内,使用`Video Masks`自定义视频,或者添加`Transparent Videos`。[了解详情](https://support.wix.com/en/article/wix-video-about-wix-video)。"
|
|
3193
|
+
},
|
|
3194
|
+
"node_modules/lighthouse-stack-packs/packs/wix.js | modern-image-formats": {
|
|
3195
|
+
"message": "请使用 `Wix Media Manager` 上传图片,以确保网站能自动以 WebP 格式加载图片。了解网站媒体资源的[更多优化方法](https://support.wix.com/en/article/site-performance-optimizing-your-media)。"
|
|
3196
|
+
},
|
|
3197
|
+
"node_modules/lighthouse-stack-packs/packs/wix.js | render-blocking-resources": {
|
|
3198
|
+
"message": "在网站信息中心的“`Custom Code`”标签页中[添加第三方代码](https://support.wix.com/en/article/site-performance-using-third-party-code-on-your-site)时,请确保推迟加载或在代码正文的末尾加载该第三方代码。请尽可能使用 Wix 的[集成](https://support.wix.com/en/article/about-marketing-integrations)功能将营销工具嵌入到您的网站中。 "
|
|
3199
|
+
},
|
|
3200
|
+
"node_modules/lighthouse-stack-packs/packs/wix.js | server-response-time": {
|
|
3201
|
+
"message": "Wix 利用 CDN 和缓存,为大多数访问者提供尽可能快速的响应。请考虑为网站[手动启用缓存](https://support.wix.com/en/article/site-performance-caching-pages-to-optimize-loading-speed),尤其是在使用 `Velo` 的情况下。"
|
|
3202
|
+
},
|
|
3203
|
+
"node_modules/lighthouse-stack-packs/packs/wix.js | unused-javascript": {
|
|
3204
|
+
"message": "请在网站信息中心的“`Custom Code`”标签页中查看您已向网站添加的所有第三方代码,并且仅保留对网站必要的服务。[了解详情](https://support.wix.com/en/article/site-performance-removing-unused-javascript)。"
|
|
3205
|
+
},
|
|
3065
3206
|
"node_modules/lighthouse-stack-packs/packs/wordpress.js | efficient-animated-content": {
|
|
3066
3207
|
"message": "建议您将 GIF 上传到可让其作为 HTML5 视频嵌入的服务。"
|
|
3067
3208
|
},
|
|
@@ -3167,6 +3308,9 @@
|
|
|
3167
3308
|
"report/renderer/report-utils.js | dropdownSaveJSON": {
|
|
3168
3309
|
"message": "另存为 JSON"
|
|
3169
3310
|
},
|
|
3311
|
+
"report/renderer/report-utils.js | dropdownViewUnthrottledTrace": {
|
|
3312
|
+
"message": "View Unthrottled Trace"
|
|
3313
|
+
},
|
|
3170
3314
|
"report/renderer/report-utils.js | dropdownViewer": {
|
|
3171
3315
|
"message": "在查看器中打开"
|
|
3172
3316
|
},
|
|
@@ -3287,9 +3431,6 @@
|
|
|
3287
3431
|
"report/renderer/report-utils.js | varianceDisclaimer": {
|
|
3288
3432
|
"message": "这些都是估算值,且可能会因时而异。系统会直接基于这些指标来[计算性能得分](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/)。"
|
|
3289
3433
|
},
|
|
3290
|
-
"report/renderer/report-utils.js | viewOriginalTraceLabel": {
|
|
3291
|
-
"message": "查看原始跟踪记录"
|
|
3292
|
-
},
|
|
3293
3434
|
"report/renderer/report-utils.js | viewTraceLabel": {
|
|
3294
3435
|
"message": "查看跟踪记录"
|
|
3295
3436
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @esbuild-plugins/node-modules-polyfill
|
|
2
|
+
|
|
3
|
+
This is `@esbuild-plugins/node-modules-polyfill`, with the following changes:
|
|
4
|
+
|
|
5
|
+
- using a better library for polyfills as proposed by this PR ... https://github.com/remorses/esbuild-plugins/pull/19
|
|
6
|
+
- ...but there are a couple correctness changes on top of the above PR, as described here: https://github.com/remorses/esbuild-plugins/pull/19#discussion_r990493080 (the PR has landed but is still broken for our use case)
|
|
7
|
+
- File converted from TS to JS
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
import path from 'path';
|
|
5
|
+
|
|
6
|
+
import escapeStringRegexp from 'escape-string-regexp';
|
|
7
|
+
import {getModules as builtinsPolyfills} from 'rollup-plugin-polyfill-node/dist/modules.js';
|
|
8
|
+
import polyfillLib from 'rollup-plugin-polyfill-node/dist/polyfills.js';
|
|
9
|
+
|
|
10
|
+
const NAME = 'node-modules-polyfills';
|
|
11
|
+
const NAMESPACE = NAME;
|
|
12
|
+
|
|
13
|
+
function removeEndingSlash(importee) {
|
|
14
|
+
if (importee && importee.slice(-1) === '/') {
|
|
15
|
+
importee = importee.slice(0, -1);
|
|
16
|
+
}
|
|
17
|
+
return importee;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function nodeModulesPolyfillPlugin(
|
|
21
|
+
options = {}
|
|
22
|
+
) {
|
|
23
|
+
const {namespace = NAMESPACE, name = NAME} = options;
|
|
24
|
+
if (namespace.endsWith('commonjs')) {
|
|
25
|
+
throw new Error(`namespace ${namespace} must not end with commonjs`);
|
|
26
|
+
}
|
|
27
|
+
// this namespace is needed to make ES modules expose their default export to require: require('assert') will give you import('assert').default
|
|
28
|
+
const commonjsNamespace = namespace + '-commonjs';
|
|
29
|
+
const polyfilledBuiltins = builtinsPolyfills();
|
|
30
|
+
const polyfilledBuiltinsNames = [...polyfilledBuiltins.keys()];
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
name,
|
|
34
|
+
setup: function setup({onLoad, onResolve, initialOptions}) {
|
|
35
|
+
// polyfills contain global keyword, it must be defined
|
|
36
|
+
if (initialOptions?.define && !initialOptions.define?.global) {
|
|
37
|
+
initialOptions.define['global'] = 'globalThis';
|
|
38
|
+
} else if (!initialOptions?.define) {
|
|
39
|
+
initialOptions.define = {global: 'globalThis'};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// TODO these polyfill module cannot import anything, is that ok?
|
|
43
|
+
async function loader(
|
|
44
|
+
args
|
|
45
|
+
) {
|
|
46
|
+
try {
|
|
47
|
+
const isCommonjs = args.namespace.endsWith('commonjs');
|
|
48
|
+
|
|
49
|
+
const key = removeEndingSlash(args.path);
|
|
50
|
+
const contents = polyfilledBuiltins.get(key) || polyfillLib[key + '.js'];
|
|
51
|
+
const resolveDir = path.dirname(key);
|
|
52
|
+
|
|
53
|
+
if (isCommonjs) {
|
|
54
|
+
return {
|
|
55
|
+
loader: 'js',
|
|
56
|
+
contents: commonJsTemplate({
|
|
57
|
+
importPath: args.path,
|
|
58
|
+
}),
|
|
59
|
+
resolveDir,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
loader: 'js',
|
|
64
|
+
contents,
|
|
65
|
+
resolveDir,
|
|
66
|
+
};
|
|
67
|
+
} catch (e) {
|
|
68
|
+
console.error('node-modules-polyfill', e);
|
|
69
|
+
return {
|
|
70
|
+
contents: `export {}`,
|
|
71
|
+
loader: 'js',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
onLoad({filter: /.*/, namespace}, loader);
|
|
76
|
+
onLoad({filter: /.*/, namespace: commonjsNamespace}, loader);
|
|
77
|
+
const filter = new RegExp(
|
|
78
|
+
polyfilledBuiltinsNames.map(escapeStringRegexp).join('|') // TODO builtins could end with slash, keep in mind in regex
|
|
79
|
+
);
|
|
80
|
+
async function resolver(args) {
|
|
81
|
+
const ignoreRequire = args.namespace === commonjsNamespace;
|
|
82
|
+
|
|
83
|
+
let key;
|
|
84
|
+
if (args.path.startsWith('\0polyfill-node.')) {
|
|
85
|
+
key = args.path.replace('\0polyfill-node.', '');
|
|
86
|
+
} else {
|
|
87
|
+
if (args.path.startsWith('.')) {
|
|
88
|
+
key = path.join(path.dirname(args.importer), args.path);
|
|
89
|
+
} else {
|
|
90
|
+
key = args.path;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (!polyfilledBuiltins.has(key) && !polyfillLib[key + '.js']) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const isCommonjs =
|
|
99
|
+
!ignoreRequire && args.kind === 'require-call';
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
namespace: isCommonjs ? commonjsNamespace : namespace,
|
|
103
|
+
path: key,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
onResolve({filter}, resolver);
|
|
107
|
+
onResolve({filter: /.*/, namespace}, resolver);
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function commonJsTemplate({importPath}) {
|
|
113
|
+
return `
|
|
114
|
+
const polyfill = require('${importPath}')
|
|
115
|
+
|
|
116
|
+
if (polyfill && polyfill.default) {
|
|
117
|
+
module.exports = polyfill.default
|
|
118
|
+
for (let k in polyfill) {
|
|
119
|
+
module.exports[k] = polyfill[k]
|
|
120
|
+
}
|
|
121
|
+
} else if (polyfill) {
|
|
122
|
+
module.exports = polyfill
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export {nodeModulesPolyfillPlugin};
|
package/tsconfig.json
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"./types/**/*.d.ts",
|
|
22
22
|
"eslint-local-rules.cjs",
|
|
23
23
|
"third-party/axe/valid-langs.js",
|
|
24
|
+
"third-party/esbuild-plugins-polyfills/esbuild-polyfills.js",
|
|
24
25
|
|
|
25
26
|
"core/test/results/sample_v2.json",
|
|
26
27
|
"core/test/fixtures/unresolved-perflog.json",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"shared/localization/locales/en-US.json",
|
|
30
31
|
],
|
|
31
32
|
"exclude": [
|
|
33
|
+
"build/test/*test-case*.js",
|
|
32
34
|
"core/test/audits/**/*.js",
|
|
33
35
|
"core/test/fixtures/**/*.js",
|
|
34
36
|
"core/test/computed/**/*.js",
|
|
@@ -39,7 +41,6 @@
|
|
|
39
41
|
"core/test/config/budget-test.js",
|
|
40
42
|
"core/test/config/config-helpers-test.js",
|
|
41
43
|
"core/test/config/config-plugin-test.js",
|
|
42
|
-
"core/test/legacy/config/config-test.js",
|
|
43
44
|
"core/test/config/default-config-test.js",
|
|
44
45
|
"core/test/gather/driver/wait-for-condition-test.js",
|
|
45
46
|
"core/test/gather/gatherers/accessibility-test.js",
|