lighthouse 8.5.1-dev.20211010 → 8.6.0-dev.20211013

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/changelog.md +95 -0
  2. package/flow-report/src/wrappers/report.tsx +1 -3
  3. package/lighthouse-cli/bin.js +5 -0
  4. package/lighthouse-cli/cli-flags.js +7 -2
  5. package/lighthouse-cli/commands/commands.js +1 -0
  6. package/lighthouse-cli/commands/list-locales.js +16 -0
  7. package/lighthouse-core/audits/seo/crawlable-anchors.js +10 -12
  8. package/package.json +2 -2
  9. package/report/assets/styles.css +8 -40
  10. package/report/assets/templates.html +2 -2
  11. package/report/clients/standalone.js +1 -2
  12. package/report/renderer/category-renderer.js +1 -12
  13. package/report/renderer/components.js +2 -3
  14. package/report/renderer/logger.js +35 -2
  15. package/report/renderer/performance-category-renderer.js +1 -1
  16. package/report/renderer/pwa-category-renderer.js +1 -2
  17. package/report/renderer/report-renderer.js +19 -5
  18. package/report/test/clients/psi-test.js +0 -3
  19. package/shared/localization/locales/ar-XB.json +139 -4
  20. package/shared/localization/locales/ar.json +141 -6
  21. package/shared/localization/locales/bg.json +139 -4
  22. package/shared/localization/locales/ca.json +140 -5
  23. package/shared/localization/locales/cs.json +139 -4
  24. package/shared/localization/locales/da.json +139 -4
  25. package/shared/localization/locales/de.json +139 -4
  26. package/shared/localization/locales/el.json +141 -6
  27. package/shared/localization/locales/en-GB.json +139 -4
  28. package/shared/localization/locales/en-XA.json +139 -4
  29. package/shared/localization/locales/es-419.json +139 -4
  30. package/shared/localization/locales/es.json +139 -4
  31. package/shared/localization/locales/fi.json +139 -4
  32. package/shared/localization/locales/fil.json +139 -4
  33. package/shared/localization/locales/fr.json +139 -4
  34. package/shared/localization/locales/he.json +139 -4
  35. package/shared/localization/locales/hi.json +142 -7
  36. package/shared/localization/locales/hr.json +139 -4
  37. package/shared/localization/locales/hu.json +139 -4
  38. package/shared/localization/locales/id.json +139 -4
  39. package/shared/localization/locales/it.json +139 -4
  40. package/shared/localization/locales/ja.json +139 -4
  41. package/shared/localization/locales/ko.json +139 -4
  42. package/shared/localization/locales/lt.json +139 -4
  43. package/shared/localization/locales/lv.json +139 -4
  44. package/shared/localization/locales/nl.json +139 -4
  45. package/shared/localization/locales/no.json +139 -4
  46. package/shared/localization/locales/pl.json +139 -4
  47. package/shared/localization/locales/pt-PT.json +139 -4
  48. package/shared/localization/locales/pt.json +139 -4
  49. package/shared/localization/locales/ro.json +139 -4
  50. package/shared/localization/locales/ru.json +139 -4
  51. package/shared/localization/locales/sk.json +139 -4
  52. package/shared/localization/locales/sl.json +139 -4
  53. package/shared/localization/locales/sr-Latn.json +139 -4
  54. package/shared/localization/locales/sr.json +139 -4
  55. package/shared/localization/locales/sv.json +139 -4
  56. package/shared/localization/locales/ta.json +146 -11
  57. package/shared/localization/locales/te.json +179 -44
  58. package/shared/localization/locales/th.json +139 -4
  59. package/shared/localization/locales/tr.json +139 -4
  60. package/shared/localization/locales/uk.json +139 -4
  61. package/shared/localization/locales/vi.json +139 -4
  62. package/shared/localization/locales/zh-HK.json +139 -4
  63. package/shared/localization/locales/zh-TW.json +139 -4
  64. package/shared/localization/locales/zh.json +139 -4
  65. package/types/externs.d.ts +2 -0
package/changelog.md CHANGED
@@ -1,3 +1,98 @@
1
+ <a name="8.6.0"></a>
2
+ # 8.6.0 (2021-10-13)
3
+ [Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v8.5.1...v8.6.0)
4
+
5
+ We expect this release to ship in the DevTools of [Chrome 97](https://chromiumdash.appspot.com/schedule), and to PageSpeed Insights within 2 weeks.
6
+
7
+ ## New Contributors
8
+
9
+ Thanks to our new contributors 👽🐷🐰🐯🐻!
10
+
11
+ - meehawk @meehawk
12
+ - Edwin Gustafson @edwingustafson
13
+ - Yorkie Liu @yorkie
14
+
15
+ ## Core
16
+
17
+ * crawlable-anchors: ignore event listeners, validate url ([#13105](https://github.com/GoogleChrome/lighthouse/pull/13105))
18
+ * full-page-screenshot: fix emulation reset ([#13175](https://github.com/GoogleChrome/lighthouse/pull/13175))
19
+ * response-compression: add x-content-encoding-over-network ([#13176](https://github.com/GoogleChrome/lighthouse/pull/13176))
20
+ * share localization between core and report ([#13146](https://github.com/GoogleChrome/lighthouse/pull/13146))
21
+ * update cdt SourceMap to latest devtools frontend ([#13095](https://github.com/GoogleChrome/lighthouse/pull/13095))
22
+ * stack-packs: simplify i18n filename lookup ([#13133](https://github.com/GoogleChrome/lighthouse/pull/13133))
23
+
24
+ ## ⛏️👷 Fraggle Rock
25
+
26
+ Support for auditing user flows ([#11313](https://github.com/GoogleChrome/lighthouse/issues/11313))
27
+
28
+ * add UserFlow usability improvements ([#13139](https://github.com/GoogleChrome/lighthouse/pull/13139))
29
+ * add `supportedModes` filter to categories ([#13161](https://github.com/GoogleChrome/lighthouse/pull/13161))
30
+ * handle cached timespan records ([#13181](https://github.com/GoogleChrome/lighthouse/pull/13181))
31
+ * add parity logging ([#13114](https://github.com/GoogleChrome/lighthouse/pull/13114))
32
+ * animate timespan thumbnail ([#13178](https://github.com/GoogleChrome/lighthouse/pull/13178))
33
+ * refine snapshot and timespan performance ([#13184](https://github.com/GoogleChrome/lighthouse/pull/13184))
34
+ * topbar save button ([#13109](https://github.com/GoogleChrome/lighthouse/pull/13109))
35
+ * elide step name ([#13171](https://github.com/GoogleChrome/lighthouse/pull/13171))
36
+ * localized sample ([#13143](https://github.com/GoogleChrome/lighthouse/pull/13143))
37
+ * timeline header ([#13128](https://github.com/GoogleChrome/lighthouse/pull/13128))
38
+ * add help dialog to explain flows ([#13159](https://github.com/GoogleChrome/lighthouse/pull/13159))
39
+ * collect i18n strings ([#13152](https://github.com/GoogleChrome/lighthouse/pull/13152))
40
+
41
+ ## CLI
42
+
43
+ * add list-locales flag ([#12983](https://github.com/GoogleChrome/lighthouse/pull/12983))
44
+ * always return correct version ([#13130](https://github.com/GoogleChrome/lighthouse/pull/13130))
45
+
46
+ ## Report
47
+
48
+ * move logger styles into js ([#13204](https://github.com/GoogleChrome/lighthouse/pull/13204))
49
+ * remove href from category score gauge ([#13180](https://github.com/GoogleChrome/lighthouse/pull/13180))
50
+ * inject report/assets/styles.css via components.js ([#13057](https://github.com/GoogleChrome/lighthouse/pull/13057))
51
+ * remove smooth scrolling css ([#13102](https://github.com/GoogleChrome/lighthouse/pull/13102))
52
+ * add lh- prefix to remaining show class ([#13203](https://github.com/GoogleChrome/lighthouse/pull/13203))
53
+ * handle gauge fragment links in script ([#13186](https://github.com/GoogleChrome/lighthouse/pull/13186))
54
+
55
+ ## Clients
56
+
57
+ * psi: include global reports styles in legacy psi rendering ([#13151](https://github.com/GoogleChrome/lighthouse/pull/13151))
58
+ * viewer: swap locale ([#10148](https://github.com/GoogleChrome/lighthouse/pull/10148), [#13192](https://github.com/GoogleChrome/lighthouse/pull/13192))
59
+ * viewer: remove devtools disclaimer ([#13145](https://github.com/GoogleChrome/lighthouse/pull/13145))
60
+ * viewer: add body styles ([#13144](https://github.com/GoogleChrome/lighthouse/pull/13144))
61
+ * viewer: upgrade to firebase 9 ([#13115](https://github.com/GoogleChrome/lighthouse/pull/13115))
62
+ * viewer: use access token regardless of firebase auth ([#13116](https://github.com/GoogleChrome/lighthouse/pull/13116))
63
+ * viewer: use new firebase credentials ([#13110](https://github.com/GoogleChrome/lighthouse/pull/13110))
64
+
65
+ ## I18n
66
+
67
+ * import ([#13206](https://github.com/GoogleChrome/lighthouse/pull/13206))
68
+
69
+ ## Docs
70
+
71
+ * correct the Node.js version base ([#13099](https://github.com/GoogleChrome/lighthouse/pull/13099))
72
+ * add user flow docs ([#13134](https://github.com/GoogleChrome/lighthouse/pull/13134))
73
+
74
+ ## Tests
75
+
76
+ * smoke: make specific assertions about deprecations ([#13191](https://github.com/GoogleChrome/lighthouse/pull/13191))
77
+ * update deprecations smoke for M96 ([#13179](https://github.com/GoogleChrome/lighthouse/pull/13179))
78
+ * make yarn unit run all available unit tests ([#13148](https://github.com/GoogleChrome/lighthouse/pull/13148))
79
+ * centralize running of docs tests ([#13150](https://github.com/GoogleChrome/lighthouse/pull/13150))
80
+ * split out axe test ([#13142](https://github.com/GoogleChrome/lighthouse/pull/13142))
81
+
82
+ ## Misc
83
+
84
+ * convert lighthouse-core/scripts to ES modules ([#13121](https://github.com/GoogleChrome/lighthouse/pull/13121))
85
+ * remove patrick from issue assigner ([#13194](https://github.com/GoogleChrome/lighthouse/pull/13194))
86
+ * set predictable order for sample json timing entries ([#13162](https://github.com/GoogleChrome/lighthouse/pull/13162))
87
+ * scripts: fix run-devtools sniffing, add error checking ([#13163](https://github.com/GoogleChrome/lighthouse/pull/13163))
88
+ * ensure psi.espanol sample-report es en espanol ([#13160](https://github.com/GoogleChrome/lighthouse/pull/13160))
89
+ * add notes about software versions in issue template ([#13089](https://github.com/GoogleChrome/lighthouse/pull/13089))
90
+ * build: fix smokehouse bundle ([#13135](https://github.com/GoogleChrome/lighthouse/pull/13135))
91
+ * build: fix vercel deployment by adopting stricter `engines` grammar ([#13183](https://github.com/GoogleChrome/lighthouse/pull/13183))
92
+ * build: create rollup-plugins.js helper module ([#13122](https://github.com/GoogleChrome/lighthouse/pull/13122))
93
+ * build: don't build flow if only --standalone is requested ([#13124](https://github.com/GoogleChrome/lighthouse/pull/13124))
94
+
95
+
1
96
  <a name="8.5.1"></a>
2
97
  # 8.5.1 (2021-09-22)
3
98
  [Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v8.5.0...v8.5.1)
@@ -15,10 +15,8 @@ import {useReportRenderer} from './report-renderer';
15
15
  * e.g. <a href="#link"> -> <a href="#index=0&anchor=link">
16
16
  */
17
17
  export function convertChildAnchors(element: HTMLElement, index: number) {
18
- const links = element.querySelectorAll('a') as NodeListOf<HTMLAnchorElement>;
18
+ const links = element.querySelectorAll('a[href]') as NodeListOf<HTMLAnchorElement>;
19
19
  for (const link of links) {
20
- if (!link.href) continue;
21
-
22
20
  // Check if the link destination is in the report.
23
21
  const currentUrl = new URL(location.href);
24
22
  currentUrl.hash = '';
@@ -61,6 +61,11 @@ async function begin() {
61
61
  commands.listAudits();
62
62
  }
63
63
 
64
+ // Process terminating command
65
+ if (cliFlags.listLocales) {
66
+ commands.listLocales();
67
+ }
68
+
64
69
  // Process terminating command
65
70
  if (cliFlags.listTraceCategories) {
66
71
  commands.listTraceCategories();
@@ -105,6 +105,11 @@ function getFlags(manualArgv, options = {}) {
105
105
  default: false,
106
106
  describe: 'Prints a list of all available audits and exits',
107
107
  },
108
+ 'list-locales': {
109
+ type: 'boolean',
110
+ default: false,
111
+ describe: 'Prints a list of all supported locales and exits',
112
+ },
108
113
  'list-trace-categories': {
109
114
  type: 'boolean',
110
115
  default: false,
@@ -210,7 +215,7 @@ function getFlags(manualArgv, options = {}) {
210
215
  },
211
216
  })
212
217
  .group([
213
- 'save-assets', 'list-all-audits', 'list-trace-categories', 'print-config', 'additional-trace-categories',
218
+ 'save-assets', 'list-all-audits', 'list-locales', 'list-trace-categories', 'print-config', 'additional-trace-categories',
214
219
  'config-path', 'preset', 'chrome-flags', 'port', 'hostname', 'form-factor', 'screenEmulation', 'emulatedUserAgent',
215
220
  'max-wait-for-load', 'enable-error-reporting', 'gather-mode', 'audit-mode',
216
221
  'only-audits', 'only-categories', 'skip-audits', 'budget-path',
@@ -314,7 +319,7 @@ function getFlags(manualArgv, options = {}) {
314
319
  // - We're just printing the config.
315
320
  // - We're in auditMode (and we have artifacts already)
316
321
  // If one of these don't apply, if no URL, stop the program and ask for one.
317
- const isPrintSomethingMode = argv.listAllAudits || argv.listTraceCategories || argv.printConfig;
322
+ const isPrintSomethingMode = argv.listAllAudits || argv.listLocales || argv.listTraceCategories || argv.printConfig;
318
323
  const isOnlyAuditMode = !!argv.auditMode && !argv.gatherMode;
319
324
  if (isPrintSomethingMode || isOnlyAuditMode) {
320
325
  return true;
@@ -7,3 +7,4 @@
7
7
 
8
8
  export {listAudits} from './list-audits.js';
9
9
  export {listTraceCategories} from './list-trace-categories.js';
10
+ export {listLocales} from './list-locales.js';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
3
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
+ */
6
+ 'use strict';
7
+
8
+ import locales from '../../shared/localization/locales.js';
9
+
10
+ function listLocales() {
11
+ const localesList = Object.keys(locales);
12
+ process.stdout.write(JSON.stringify({locales: localesList}, null, 2));
13
+ process.exit(0);
14
+ }
15
+
16
+ export {listLocales};
@@ -31,7 +31,7 @@ class CrawlableAnchors extends Audit {
31
31
  title: str_(UIStrings.title),
32
32
  failureTitle: str_(UIStrings.failureTitle),
33
33
  description: str_(UIStrings.description),
34
- requiredArtifacts: ['AnchorElements'],
34
+ requiredArtifacts: ['AnchorElements', 'URL'],
35
35
  };
36
36
  }
37
37
 
@@ -39,15 +39,12 @@ class CrawlableAnchors extends Audit {
39
39
  * @param {LH.Artifacts} artifacts
40
40
  * @return {LH.Audit.Product}
41
41
  */
42
- static audit({AnchorElements: anchorElements}) {
42
+ static audit({AnchorElements: anchorElements, URL: url}) {
43
43
  const failingAnchors = anchorElements.filter(({
44
44
  rawHref,
45
- listeners = [],
46
- onclick = '',
47
45
  name = '',
48
46
  role = '',
49
47
  }) => {
50
- onclick = onclick.replace( /\s/g, '');
51
48
  rawHref = rawHref.replace( /\s/g, '');
52
49
  name = name.trim();
53
50
  role = role.trim();
@@ -56,19 +53,20 @@ class CrawlableAnchors extends Audit {
56
53
  // Ignore mailto links even if they use one of the failing patterns. See https://github.com/GoogleChrome/lighthouse/issues/11443#issuecomment-694898412
57
54
  if (rawHref.startsWith('mailto:')) return;
58
55
 
59
- const windowLocationRegExp = /window\.location=/;
60
- const windowOpenRegExp = /window\.open\(/;
61
56
  const javaScriptVoidRegExp = /javascript:void(\(|)0(\)|)/;
62
57
 
63
58
  if (rawHref.startsWith('file:')) return true;
64
- if (windowLocationRegExp.test(onclick)) return true;
65
- if (windowOpenRegExp.test(onclick)) return true;
66
-
67
- const hasClickHandler = listeners.some(({type}) => type === 'click');
68
- if (hasClickHandler || name.length > 0) return;
59
+ if (name.length > 0) return;
69
60
 
70
61
  if (rawHref === '') return true;
71
62
  if (javaScriptVoidRegExp.test(rawHref)) return true;
63
+
64
+ // checking if rawHref is a valid
65
+ try {
66
+ new URL(rawHref, url.finalUrl);
67
+ } catch (e) {
68
+ return true;
69
+ }
72
70
  });
73
71
 
74
72
  /** @type {LH.Audit.Details.Table['headings']} */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lighthouse",
3
- "version": "8.5.1-dev.20211010",
3
+ "version": "8.6.0-dev.20211013",
4
4
  "description": "Automated auditing, performance metrics, and best practices for the web.",
5
5
  "main": "./lighthouse-core/index.js",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "build-extension-firefox": "node ./build/build-extension.js firefox",
22
22
  "build-devtools": "yarn reset-link && node ./build/build-bundle.js clients/devtools-entry.js dist/lighthouse-dt-bundle.js && node ./build/build-dt-report-resources.js",
23
23
  "build-smokehouse-bundle": "node ./build/build-smokehouse-bundle.js",
24
- "build-lr": "yarn reset-link && node ./build/build-lightrider-bundles.js && rollup lighthouse-cli/test/fixtures/static-server.js -o dist/lightrider/static-server.js -f commonjs -p commonjs -p node-resolve -e mime-types,glob",
24
+ "build-lr": "yarn reset-link && node ./build/build-lightrider-bundles.js",
25
25
  "build-pack": "bash build/build-pack.sh",
26
26
  "build-report": "node build/build-report-components.js && yarn eslint --fix report/renderer/components.js && node build/build-report.js",
27
27
  "build-sample-reports": "yarn build-report && node build/build-sample-reports.js",
@@ -92,6 +92,7 @@
92
92
  --footer-padding-vertical: 16px;
93
93
  --gauge-circle-size-big: 112px;
94
94
  --gauge-circle-size: 80px;
95
+ --gauge-circle-size-sm: 36px;
95
96
  --gauge-label-font-size-big: 28px;
96
97
  --gauge-label-font-size: 20px;
97
98
  --gauge-label-line-height-big: 36px;
@@ -686,8 +687,8 @@
686
687
 
687
688
  .lh-metric__innerwrap {
688
689
  display: grid;
689
- /**
690
- * Icon -- Metric Name
690
+ /**
691
+ * Icon -- Metric Name
691
692
  * -- Metric Value
692
693
  */
693
694
  grid-template-columns: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right)) 1fr;
@@ -731,7 +732,7 @@
731
732
  /* Change the grid to 3 columns for narrow viewport. */
732
733
  @media screen and (max-width: 535px) {
733
734
  .lh-metric__innerwrap {
734
- /**
735
+ /**
735
736
  * Icon -- Metric Name -- Metric Value
736
737
  */
737
738
  grid-template-columns: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right)) 2fr 1fr;
@@ -1409,6 +1410,10 @@
1409
1410
  padding: var(--category-padding);
1410
1411
  max-width: var(--report-width);
1411
1412
  margin: 0 auto;
1413
+
1414
+ --sticky-header-height: calc(var(--gauge-circle-size-sm) + var(--score-container-padding) * 2);
1415
+ --topbar-plus-sticky-header: calc(var(--topbar-height) + var(--sticky-header-height));
1416
+ scroll-margin-top: var(--topbar-plus-sticky-header);
1412
1417
  }
1413
1418
 
1414
1419
  .lh-category-wrapper {
@@ -1419,18 +1424,6 @@
1419
1424
  border-top: 1px solid var(--color-gray-200);
1420
1425
  }
1421
1426
 
1422
- /* section hash link jump should preserve fixed header
1423
- https://css-tricks.com/hash-tag-links-padding/
1424
- */
1425
- .lh-category > .lh-permalink {
1426
- --sticky-header-height: calc(var(--gauge-circle-size) + var(--score-container-padding) * 2);
1427
- --topbar-plus-header: calc(var(--topbar-height) + var(--sticky-header-height));
1428
- margin-top: calc(var(--topbar-plus-header) * -1);
1429
- padding-bottom: var(--topbar-plus-header);
1430
- display: block;
1431
- visibility: hidden;
1432
- }
1433
-
1434
1427
  .lh-category-header {
1435
1428
  font-size: var(--category-header-font-size);
1436
1429
  min-height: var(--gauge-circle-size);
@@ -1448,31 +1441,6 @@
1448
1441
  line-height: var(--header-line-height);
1449
1442
  }
1450
1443
 
1451
- #lh-log {
1452
- position: fixed;
1453
- background-color: #323232;
1454
- color: #fff;
1455
- min-height: 48px;
1456
- min-width: 288px;
1457
- padding: 16px 24px;
1458
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
1459
- border-radius: 2px;
1460
- margin: 12px;
1461
- font-size: 14px;
1462
- cursor: default;
1463
- transition: transform 0.3s, opacity 0.3s;
1464
- transform: translateY(100px);
1465
- opacity: 0;
1466
- bottom: 0;
1467
- left: 0;
1468
- z-index: 3;
1469
- }
1470
-
1471
- #lh-log.lh-show {
1472
- opacity: 1;
1473
- transform: translateY(0);
1474
- }
1475
-
1476
1444
  /* 964 fits the min-width of the filmstrip */
1477
1445
  @media screen and (max-width: 964px) {
1478
1446
  .lh-report {
@@ -165,7 +165,7 @@ limitations under the License.
165
165
  }
166
166
 
167
167
  .lh-sticky-header {
168
- --gauge-circle-size: 36px;
168
+ --gauge-circle-size: var(--gauge-circle-size-sm);
169
169
  --plugin-badge-size: 18px;
170
170
  --plugin-icon-size: 75%;
171
171
  --gauge-wrapper-width: 60px;
@@ -660,7 +660,7 @@ limitations under the License.
660
660
  }
661
661
  </style>
662
662
 
663
- <a href="#" class="lh-gauge__wrapper lh-gauge--pwa__wrapper">
663
+ <a class="lh-gauge__wrapper lh-gauge--pwa__wrapper">
664
664
  <svg viewBox="0 0 60 60" class="lh-gauge lh-gauge--pwa">
665
665
  <defs>
666
666
  <linearGradient id="lh-gauge--pwa__check-circle__gradient" x1="50%" y1="0%" x2="50%" y2="100%">
@@ -40,8 +40,7 @@ function __initLighthouseReport__() {
40
40
  });
41
41
 
42
42
  document.addEventListener('lh-log', /** @param {Event} e */ e => {
43
- const el = document.querySelector('#lh-log');
44
- if (!el) return;
43
+ const el = dom.find('div#lh-log', document);
45
44
 
46
45
  const logger = new Logger(el);
47
46
  // @ts-expect-error
@@ -373,7 +373,6 @@ export class CategoryRenderer {
373
373
  renderCategoryFraction(category) {
374
374
  const tmpl = this.dom.createComponent('fraction');
375
375
  const wrapper = this.dom.find('a.lh-fraction__wrapper', tmpl);
376
- this.dom.safelySetHref(wrapper, `#${category.id}`);
377
376
 
378
377
  const {numPassed, numPassableAudits, totalWeight} = Util.calculateCategoryFraction(category);
379
378
 
@@ -484,7 +483,7 @@ export class CategoryRenderer {
484
483
  */
485
484
  render(category, groupDefinitions = {}, options) {
486
485
  const element = this.dom.createElement('div', 'lh-category');
487
- this.createPermalinkSpan(element, category.id);
486
+ element.id = category.id;
488
487
  element.appendChild(this.renderCategoryHeader(category, groupDefinitions, options));
489
488
 
490
489
  // Top level clumps for audits, in order they will appear in the report.
@@ -522,14 +521,4 @@ export class CategoryRenderer {
522
521
 
523
522
  return element;
524
523
  }
525
-
526
- /**
527
- * Create a non-semantic span used for hash navigation of categories
528
- * @param {Element} element
529
- * @param {string} id
530
- */
531
- createPermalinkSpan(element, id) {
532
- const permalinkEl = this.dom.createChildOf(element, 'span', 'lh-permalink');
533
- permalinkEl.id = id;
534
- }
535
524
  }