lighthouse 12.8.2-dev.20250922 → 12.8.2-dev.20250924
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/core/audits/accessibility/aria-allowed-role.js +1 -0
- package/core/audits/accessibility/image-redundant-alt.js +1 -0
- package/core/audits/accessibility/landmark-one-main.js +0 -1
- package/core/audits/accessibility/table-duplicate-name.js +1 -0
- package/core/config/default-config.js +90 -68
- package/core/scoring.js +1 -1
- package/package.json +1 -1
|
@@ -35,6 +35,7 @@ class ARIAAllowedRole extends AxeAudit {
|
|
|
35
35
|
title: str_(UIStrings.title),
|
|
36
36
|
failureTitle: str_(UIStrings.failureTitle),
|
|
37
37
|
description: str_(UIStrings.description),
|
|
38
|
+
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
|
|
38
39
|
requiredArtifacts: ['Accessibility'],
|
|
39
40
|
};
|
|
40
41
|
}
|
|
@@ -36,6 +36,7 @@ class ImageRedundantAlt extends AxeAudit {
|
|
|
36
36
|
title: str_(UIStrings.title),
|
|
37
37
|
failureTitle: str_(UIStrings.failureTitle),
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
|
+
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
|
|
39
40
|
requiredArtifacts: ['Accessibility'],
|
|
40
41
|
};
|
|
41
42
|
}
|
|
@@ -34,7 +34,6 @@ class LandmarkOneMain extends AxeAudit {
|
|
|
34
34
|
title: str_(UIStrings.title),
|
|
35
35
|
failureTitle: str_(UIStrings.failureTitle),
|
|
36
36
|
description: str_(UIStrings.description),
|
|
37
|
-
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
|
|
38
37
|
requiredArtifacts: ['Accessibility'],
|
|
39
38
|
};
|
|
40
39
|
}
|
|
@@ -35,6 +35,7 @@ class TableDuplicateName extends AxeAudit {
|
|
|
35
35
|
title: str_(UIStrings.title),
|
|
36
36
|
failureTitle: str_(UIStrings.failureTitle),
|
|
37
37
|
description: str_(UIStrings.description),
|
|
38
|
+
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
|
|
38
39
|
requiredArtifacts: ['Accessibility'],
|
|
39
40
|
};
|
|
40
41
|
}
|
|
@@ -496,68 +496,86 @@ const defaultConfig = {
|
|
|
496
496
|
description: str_(UIStrings.a11yCategoryDescription),
|
|
497
497
|
manualDescription: str_(UIStrings.a11yCategoryManualDescription),
|
|
498
498
|
supportedModes: ['navigation', 'snapshot'],
|
|
499
|
-
// Audit weights are
|
|
500
|
-
//
|
|
501
|
-
//
|
|
502
|
-
//
|
|
499
|
+
// Audit weights weights are derived from the axe-core "Impact",
|
|
500
|
+
// with adjustments based on axe-core "Tags":
|
|
501
|
+
//
|
|
502
|
+
// ┌────────────┬───────────────────────────────────────────────┐
|
|
503
|
+
// │ Impact │ Weight Based on Tags │
|
|
504
|
+
// │ ├──────────────┬─────────────────┬──────────────┤
|
|
505
|
+
// │ │ wcag A+AA │ best-practice │ experimental │
|
|
506
|
+
// │ │ (ex: wcag2aa)│ (w/o wcag tag) │ │
|
|
507
|
+
// ├────────────┼──────────────┼─────────────────┼──────────────┤
|
|
508
|
+
// │ Minor │ 1 │ 0 │ 0 │
|
|
509
|
+
// │ Moderate │ 3 │ 3 │ 0 │
|
|
510
|
+
// │ Serious │ 7 │ 7 │ 0 │
|
|
511
|
+
// │ Critical │ 10 │ 10 │ 0 │
|
|
512
|
+
// └────────────┴──────────────┴─────────────────┴──────────────┘
|
|
513
|
+
//
|
|
514
|
+
// Notes:
|
|
515
|
+
// • Experimental rules always have weight 0
|
|
516
|
+
// • Best practice rules only affect scores when tagged with wcagA+AA
|
|
517
|
+
// and are moderate, serious, or critical.
|
|
518
|
+
//
|
|
519
|
+
// To find the latest axe-core Impact and Tag values:
|
|
520
|
+
// 1. Browse to https://dequeuniversity.com/rules/axe/html.
|
|
521
|
+
// 2. Click on the latest rule set (ex: https://dequeuniversity.com/rules/axe/html/4.10)
|
|
522
|
+
// 3. Review the tables
|
|
503
523
|
auditRefs: [
|
|
504
|
-
{id: 'accesskeys', weight: 7, group: 'a11y-navigation'},
|
|
505
|
-
{id: 'aria-allowed-attr', weight: 10, group: 'a11y-aria'},
|
|
506
|
-
{id: 'aria-
|
|
507
|
-
{id: 'aria-
|
|
508
|
-
{id: 'aria-
|
|
509
|
-
{id: 'aria-
|
|
510
|
-
{id: 'aria-
|
|
511
|
-
{id: 'aria-hidden-
|
|
512
|
-
{id: 'aria-
|
|
513
|
-
{id: 'aria-
|
|
514
|
-
{id: 'aria-
|
|
515
|
-
{id: 'aria-
|
|
516
|
-
{id: 'aria-
|
|
517
|
-
{id: 'aria-required-
|
|
518
|
-
{id: 'aria-required-
|
|
519
|
-
{id: 'aria-
|
|
520
|
-
{id: 'aria-
|
|
521
|
-
{id: 'aria-
|
|
522
|
-
{id: 'aria-
|
|
523
|
-
{id: 'aria-
|
|
524
|
-
{id: 'aria-
|
|
525
|
-
{id: 'aria-valid-attr
|
|
526
|
-
{id: '
|
|
527
|
-
{id: '
|
|
528
|
-
{id: '
|
|
529
|
-
{id: '
|
|
530
|
-
{id: '
|
|
531
|
-
{id: '
|
|
532
|
-
{id: '
|
|
533
|
-
{id: '
|
|
534
|
-
{id: '
|
|
535
|
-
{id: '
|
|
536
|
-
{id: '
|
|
537
|
-
{id: 'html-
|
|
538
|
-
{id: 'html-lang-
|
|
539
|
-
{id: '
|
|
540
|
-
{id: '
|
|
541
|
-
{id: 'image-
|
|
542
|
-
{id: '
|
|
543
|
-
{id: '
|
|
544
|
-
{id: '
|
|
545
|
-
{id: '
|
|
546
|
-
{id: '
|
|
547
|
-
{id: '
|
|
548
|
-
{id: '
|
|
549
|
-
{id: '
|
|
550
|
-
{id: '
|
|
551
|
-
{id: '
|
|
552
|
-
{id: '
|
|
553
|
-
{id: '
|
|
554
|
-
{id: '
|
|
555
|
-
{id: '
|
|
556
|
-
{id: '
|
|
557
|
-
{id: '
|
|
558
|
-
{id: '
|
|
559
|
-
{id: 'valid-lang', weight: 7, group: 'a11y-language'},
|
|
560
|
-
{id: 'video-caption', weight: 10, group: 'a11y-audio-video'},
|
|
524
|
+
{id: 'accesskeys', weight: 7, group: 'a11y-navigation'}, // Serious, best-practice
|
|
525
|
+
{id: 'aria-allowed-attr', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
526
|
+
{id: 'aria-command-name', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
527
|
+
{id: 'aria-conditional-attr', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
528
|
+
{id: 'aria-deprecated-role', weight: 1, group: 'a11y-aria'}, // Minor, wcag2a
|
|
529
|
+
{id: 'aria-dialog-name', weight: 7, group: 'a11y-aria'}, // Serious, best-practice
|
|
530
|
+
{id: 'aria-hidden-body', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
531
|
+
{id: 'aria-hidden-focus', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
532
|
+
{id: 'aria-input-field-name', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
533
|
+
{id: 'aria-meter-name', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
534
|
+
{id: 'aria-progressbar-name', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
535
|
+
{id: 'aria-prohibited-attr', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
536
|
+
{id: 'aria-required-attr', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
537
|
+
{id: 'aria-required-children', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
538
|
+
{id: 'aria-required-parent', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
539
|
+
{id: 'aria-roles', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
540
|
+
{id: 'aria-text', weight: 7, group: 'a11y-aria'}, // Serious, best-practice
|
|
541
|
+
{id: 'aria-toggle-field-name', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
542
|
+
{id: 'aria-tooltip-name', weight: 7, group: 'a11y-aria'}, // Serious, wcag2a
|
|
543
|
+
{id: 'aria-treeitem-name', weight: 7, group: 'a11y-aria'}, // Serious, best-practice
|
|
544
|
+
{id: 'aria-valid-attr-value', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
545
|
+
{id: 'aria-valid-attr', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
546
|
+
{id: 'button-name', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
|
|
547
|
+
{id: 'bypass', weight: 7, group: 'a11y-navigation'}, // Serious, wcag2a
|
|
548
|
+
{id: 'color-contrast', weight: 7, group: 'a11y-color-contrast'}, // Serious, wcag2aa
|
|
549
|
+
{id: 'definition-list', weight: 7, group: 'a11y-tables-lists'}, // Serious, wcag2a
|
|
550
|
+
{id: 'dlitem', weight: 7, group: 'a11y-tables-lists'}, // Serious, wcag2a
|
|
551
|
+
{id: 'document-title', weight: 7, group: 'a11y-names-labels'}, // Serious, wcag2a
|
|
552
|
+
{id: 'duplicate-id-aria', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
|
|
553
|
+
{id: 'form-field-multiple-labels', weight: 3, group: 'a11y-names-labels'}, // Moderate, wcag2a
|
|
554
|
+
{id: 'frame-title', weight: 7, group: 'a11y-names-labels'}, // Serious, wcag2a
|
|
555
|
+
{id: 'heading-order', weight: 3, group: 'a11y-navigation'}, // Moderate, best-practice
|
|
556
|
+
{id: 'html-has-lang', weight: 7, group: 'a11y-language'}, // Serious, wcag2a
|
|
557
|
+
{id: 'html-lang-valid', weight: 7, group: 'a11y-language'}, // Serious, wcag2a
|
|
558
|
+
{id: 'html-xml-lang-mismatch', weight: 3, group: 'a11y-language'}, // Moderate, wcag2a
|
|
559
|
+
{id: 'image-alt', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
|
|
560
|
+
{id: 'input-button-name', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
|
|
561
|
+
{id: 'input-image-alt', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
|
|
562
|
+
{id: 'label', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
|
|
563
|
+
{id: 'link-in-text-block', weight: 7, group: 'a11y-color-contrast'}, // Serious, wcag2a
|
|
564
|
+
{id: 'link-name', weight: 7, group: 'a11y-names-labels'}, // Serious, wcag2a
|
|
565
|
+
{id: 'list', weight: 7, group: 'a11y-tables-lists'}, // Serious, wcag2a
|
|
566
|
+
{id: 'listitem', weight: 7, group: 'a11y-tables-lists'}, // Serious, wcag2a
|
|
567
|
+
{id: 'meta-refresh', weight: 10, group: 'a11y-best-practices'}, // Critical, wcag2a
|
|
568
|
+
{id: 'meta-viewport', weight: 10, group: 'a11y-best-practices'}, // Critical, wcag2aa
|
|
569
|
+
{id: 'object-alt', weight: 7, group: 'a11y-names-labels'}, // Serious, wcag2a
|
|
570
|
+
{id: 'select-name', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
|
|
571
|
+
{id: 'skip-link', weight: 3, group: 'a11y-names-labels'}, // Moderate, best-practice
|
|
572
|
+
{id: 'tabindex', weight: 7, group: 'a11y-navigation'}, // Serious, best-practice
|
|
573
|
+
{id: 'target-size', weight: 7, group: 'a11y-best-practices'}, // Serious, wcag22aa
|
|
574
|
+
{id: 'td-headers-attr', weight: 7, group: 'a11y-tables-lists'}, // Serious, wcag2a
|
|
575
|
+
{id: 'th-has-data-cells', weight: 7, group: 'a11y-tables-lists'}, // Serious, wcag2a
|
|
576
|
+
{id: 'valid-lang', weight: 7, group: 'a11y-language'}, // Serious, wcag2aa
|
|
577
|
+
{id: 'video-caption', weight: 10, group: 'a11y-audio-video'}, // Critical, wcag2a
|
|
578
|
+
{id: 'landmark-one-main', weight: 3, group: 'a11y-best-practices'}, // Moderate, best-practice
|
|
561
579
|
// Manual audits
|
|
562
580
|
{id: 'focusable-controls', weight: 0},
|
|
563
581
|
{id: 'interactive-element-affordance', weight: 0},
|
|
@@ -569,13 +587,17 @@ const defaultConfig = {
|
|
|
569
587
|
{id: 'offscreen-content-hidden', weight: 0},
|
|
570
588
|
{id: 'custom-controls-labels', weight: 0},
|
|
571
589
|
{id: 'custom-controls-roles', weight: 0},
|
|
572
|
-
//
|
|
573
|
-
{id: '
|
|
574
|
-
{id: '
|
|
575
|
-
{id: '
|
|
576
|
-
{id: '
|
|
577
|
-
|
|
578
|
-
{id: '
|
|
590
|
+
// Low-impact best-practices
|
|
591
|
+
{id: 'table-duplicate-name', weight: 0, group: 'a11y-best-practices'}, // Minor, best-practice
|
|
592
|
+
{id: 'empty-heading', weight: 0, group: 'a11y-best-practices'}, // Minor, best-practice
|
|
593
|
+
{id: 'aria-allowed-role', weight: 0, group: 'a11y-best-practices'}, // Minor, best-practice
|
|
594
|
+
{id: 'image-redundant-alt', weight: 0, group: 'a11y-names-labels'}, // Minor, best-practice
|
|
595
|
+
// WCAG AAA
|
|
596
|
+
{id: 'identical-links-same-purpose', weight: 0, group: 'a11y-best-practices'}, // Minor, wcag2aaa
|
|
597
|
+
// Hidden audits (ie. experimental)
|
|
598
|
+
{id: 'label-content-name-mismatch', weight: 0, group: 'hidden'}, // Serious, experimental
|
|
599
|
+
{id: 'table-fake-caption', weight: 0, group: 'hidden'}, // Serious, experimental
|
|
600
|
+
{id: 'td-has-header', weight: 0, group: 'hidden'}, // Critical, experimental
|
|
579
601
|
],
|
|
580
602
|
},
|
|
581
603
|
'best-practices': {
|
package/core/scoring.js
CHANGED
|
@@ -57,7 +57,7 @@ class ReportScoring {
|
|
|
57
57
|
const member = {...configMember};
|
|
58
58
|
|
|
59
59
|
// If a result was not applicable, meaning its checks did not run against anything on
|
|
60
|
-
// the page, force
|
|
60
|
+
// the page, force its weight to 0. It will not count during the arithmeticMean() but
|
|
61
61
|
// will still be included in the final report json and displayed in the report as
|
|
62
62
|
// "Not Applicable".
|
|
63
63
|
const result = resultsByAuditId[member.id];
|
package/package.json
CHANGED