lighthouse 11.7.0-dev.20240417 → 11.7.0-dev.20240418

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.
@@ -0,0 +1,10 @@
1
+ export default AriaConditionalAttr;
2
+ declare class AriaConditionalAttr extends AxeAudit {
3
+ }
4
+ export namespace UIStrings {
5
+ const title: string;
6
+ const failureTitle: string;
7
+ const description: string;
8
+ }
9
+ import AxeAudit from './axe-audit.js';
10
+ //# sourceMappingURL=aria-conditional-attr.d.ts.map
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2024 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /**
8
+ * @fileoverview Ensures that ARIA attributes are used as specified for element roles.
9
+ * See base class in axe-audit.js for audit() implementation.
10
+ */
11
+
12
+ import AxeAudit from './axe-audit.js';
13
+ import * as i18n from '../../lib/i18n/i18n.js';
14
+
15
+ const UIStrings = {
16
+ /** Title of an accessibility audit that checks if ARIA attributes are used as specified for element roles. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
+ title: 'ARIA attributes are used as specified for the element\'s role',
18
+ /** Title of an accessibility audit that checks if ARIA attributes are used as specified for element roles. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
+ failureTitle: 'ARIA attributes are not used as specified for the element\'s role',
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
+ description: 'Some ARIA attributes are only allowed on an element under certain conditions. ' +
22
+ '[Learn more about conditional ARIA attributes](https://dequeuniversity.com/rules/axe/4.9/aria-conditional-attr).',
23
+ };
24
+
25
+ const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
26
+
27
+ class AriaConditionalAttr extends AxeAudit {
28
+ /**
29
+ * @return {LH.Audit.Meta}
30
+ */
31
+ static get meta() {
32
+ return {
33
+ id: 'aria-conditional-attr',
34
+ title: str_(UIStrings.title),
35
+ failureTitle: str_(UIStrings.failureTitle),
36
+ description: str_(UIStrings.description),
37
+ requiredArtifacts: ['Accessibility'],
38
+ };
39
+ }
40
+ }
41
+
42
+ export default AriaConditionalAttr;
43
+ export {UIStrings};
@@ -0,0 +1,10 @@
1
+ export default AriaDeprecatedRole;
2
+ declare class AriaDeprecatedRole extends AxeAudit {
3
+ }
4
+ export namespace UIStrings {
5
+ const title: string;
6
+ const failureTitle: string;
7
+ const description: string;
8
+ }
9
+ import AxeAudit from './axe-audit.js';
10
+ //# sourceMappingURL=aria-deprecated-role.d.ts.map
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2024 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /**
8
+ * @fileoverview Ensures that deprecated ARIA roles are not used.
9
+ * See base class in axe-audit.js for audit() implementation.
10
+ */
11
+
12
+ import AxeAudit from './axe-audit.js';
13
+ import * as i18n from '../../lib/i18n/i18n.js';
14
+
15
+ const UIStrings = {
16
+ /** Title of an accessibility audit that checks if deprecated ARIA roles are used. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
+ title: 'Deprecated ARIA roles were not used',
18
+ /** Title of an accessibility audit that checks if deprecated ARIA roles are used. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
+ failureTitle: 'Deprecated ARIA roles were used',
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
+ description: 'Deprecated ARIA roles may not be processed correctly by assistive technology. ' +
22
+ '[Learn more about deprecated ARIA roles](https://dequeuniversity.com/rules/axe/4.9/aria-deprecated-role).',
23
+ };
24
+
25
+ const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
26
+
27
+ class AriaDeprecatedRole extends AxeAudit {
28
+ /**
29
+ * @return {LH.Audit.Meta}
30
+ */
31
+ static get meta() {
32
+ return {
33
+ id: 'aria-deprecated-role',
34
+ title: str_(UIStrings.title),
35
+ failureTitle: str_(UIStrings.failureTitle),
36
+ description: str_(UIStrings.description),
37
+ requiredArtifacts: ['Accessibility'],
38
+ };
39
+ }
40
+ }
41
+
42
+ export default AriaDeprecatedRole;
43
+ export {UIStrings};
@@ -0,0 +1,10 @@
1
+ export default AriaProhibitedAttr;
2
+ declare class AriaProhibitedAttr extends AxeAudit {
3
+ }
4
+ export namespace UIStrings {
5
+ const title: string;
6
+ const failureTitle: string;
7
+ const description: string;
8
+ }
9
+ import AxeAudit from './axe-audit.js';
10
+ //# sourceMappingURL=aria-prohibited-attr.d.ts.map
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2024 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /**
8
+ * @fileoverview Ensures that deprecated ARIA roles are not used.
9
+ * See base class in axe-audit.js for audit() implementation.
10
+ */
11
+
12
+ import AxeAudit from './axe-audit.js';
13
+ import * as i18n from '../../lib/i18n/i18n.js';
14
+
15
+ const UIStrings = {
16
+ /** Title of an accessibility audit that checks if elements use prohibited ARIA attributes. This title is descriptive of the successful state and is shown to users when no user action is required. */
17
+ title: 'Elements use only permitted ARIA attributes',
18
+ /** Title of an accessibility audit that checks if elements use prohibited ARIA attributes. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
19
+ failureTitle: 'Elements use prohibited ARIA attributes',
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
+ description: 'Using ARIA attributes in roles where they are prohibited can mean that important ' +
22
+ 'information is not communicated to users of assistive technologies. ' +
23
+ '[Learn more about prohibited ARIA roles](https://dequeuniversity.com/rules/axe/4.9/aria-prohibited-attr).',
24
+ };
25
+
26
+ const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
27
+
28
+ class AriaProhibitedAttr extends AxeAudit {
29
+ /**
30
+ * @return {LH.Audit.Meta}
31
+ */
32
+ static get meta() {
33
+ return {
34
+ id: 'aria-prohibited-attr',
35
+ title: str_(UIStrings.title),
36
+ failureTitle: str_(UIStrings.failureTitle),
37
+ description: str_(UIStrings.description),
38
+ requiredArtifacts: ['Accessibility'],
39
+ };
40
+ }
41
+ }
42
+
43
+ export default AriaProhibitedAttr;
44
+ export {UIStrings};
@@ -197,12 +197,15 @@ const defaultConfig = {
197
197
  'accessibility/aria-allowed-attr',
198
198
  'accessibility/aria-allowed-role',
199
199
  'accessibility/aria-command-name',
200
+ 'accessibility/aria-conditional-attr',
201
+ 'accessibility/aria-deprecated-role',
200
202
  'accessibility/aria-dialog-name',
201
203
  'accessibility/aria-hidden-body',
202
204
  'accessibility/aria-hidden-focus',
203
205
  'accessibility/aria-input-field-name',
204
206
  'accessibility/aria-meter-name',
205
207
  'accessibility/aria-progressbar-name',
208
+ 'accessibility/aria-prohibited-attr',
206
209
  'accessibility/aria-required-attr',
207
210
  'accessibility/aria-required-children',
208
211
  'accessibility/aria-required-parent',
@@ -455,12 +458,15 @@ const defaultConfig = {
455
458
  {id: 'aria-allowed-attr', weight: 10, group: 'a11y-aria'},
456
459
  {id: 'aria-allowed-role', weight: 1, group: 'a11y-aria'},
457
460
  {id: 'aria-command-name', weight: 7, group: 'a11y-aria'},
461
+ {id: 'aria-conditional-attr', weight: 7, group: 'a11y-aria'},
462
+ {id: 'aria-deprecated-role', weight: 1, group: 'a11y-aria'},
458
463
  {id: 'aria-dialog-name', weight: 7, group: 'a11y-aria'},
459
464
  {id: 'aria-hidden-body', weight: 10, group: 'a11y-aria'},
460
465
  {id: 'aria-hidden-focus', weight: 7, group: 'a11y-aria'},
461
466
  {id: 'aria-input-field-name', weight: 7, group: 'a11y-aria'},
462
467
  {id: 'aria-meter-name', weight: 7, group: 'a11y-aria'},
463
468
  {id: 'aria-progressbar-name', weight: 7, group: 'a11y-aria'},
469
+ {id: 'aria-prohibited-attr', weight: 7, group: 'a11y-aria'},
464
470
  {id: 'aria-required-attr', weight: 10, group: 'a11y-aria'},
465
471
  {id: 'aria-required-children', weight: 10, group: 'a11y-aria'},
466
472
  {id: 'aria-required-parent', weight: 10, group: 'a11y-aria'},
@@ -43,10 +43,10 @@ async function runA11yChecks() {
43
43
  'area-alt': {enabled: false},
44
44
  'aria-allowed-role': {enabled: true},
45
45
  'aria-braille-equivalent': {enabled: false},
46
- 'aria-conditional-attr': {enabled: false},
47
- 'aria-deprecated-role': {enabled: false},
46
+ 'aria-conditional-attr': {enabled: true},
47
+ 'aria-deprecated-role': {enabled: true},
48
48
  'aria-dialog-name': {enabled: true},
49
- 'aria-prohibited-attr': {enabled: false},
49
+ 'aria-prohibited-attr': {enabled: true},
50
50
  'aria-roledescription': {enabled: false},
51
51
  'aria-treeitem-name': {enabled: true},
52
52
  'aria-text': {enabled: true},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "11.7.0-dev.20240417",
4
+ "version": "11.7.0-dev.20240418",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -203,8 +203,8 @@
203
203
  "robots-parser": "^3.0.1",
204
204
  "semver": "^5.3.0",
205
205
  "speedline-core": "^1.4.3",
206
- "third-party-web": "^0.24.1",
207
- "tldts-icann": "^6.1.0",
206
+ "third-party-web": "^0.24.2",
207
+ "tldts-icann": "^6.1.16",
208
208
  "ws": "^7.0.0",
209
209
  "yargs": "^17.3.1",
210
210
  "yargs-parser": "^21.0.0"
@@ -35,6 +35,24 @@
35
35
  "core/audits/accessibility/aria-command-name.js | title": {
36
36
  "message": "`button`, `link`, and `menuitem` elements have accessible names"
37
37
  },
38
+ "core/audits/accessibility/aria-conditional-attr.js | description": {
39
+ "message": "Some ARIA attributes are only allowed on an element under certain conditions. [Learn more about conditional ARIA attributes](https://dequeuniversity.com/rules/axe/4.9/aria-conditional-attr)."
40
+ },
41
+ "core/audits/accessibility/aria-conditional-attr.js | failureTitle": {
42
+ "message": "ARIA attributes are not used as specified for the element's role"
43
+ },
44
+ "core/audits/accessibility/aria-conditional-attr.js | title": {
45
+ "message": "ARIA attributes are used as specified for the element's role"
46
+ },
47
+ "core/audits/accessibility/aria-deprecated-role.js | description": {
48
+ "message": "Deprecated ARIA roles may not be processed correctly by assistive technology. [Learn more about deprecated ARIA roles](https://dequeuniversity.com/rules/axe/4.9/aria-deprecated-role)."
49
+ },
50
+ "core/audits/accessibility/aria-deprecated-role.js | failureTitle": {
51
+ "message": "Deprecated ARIA roles were used"
52
+ },
53
+ "core/audits/accessibility/aria-deprecated-role.js | title": {
54
+ "message": "Deprecated ARIA roles were not used"
55
+ },
38
56
  "core/audits/accessibility/aria-dialog-name.js | description": {
39
57
  "message": "ARIA dialog elements without accessible names may prevent screen readers users from discerning the purpose of these elements. [Learn how to make ARIA dialog elements more accessible](https://dequeuniversity.com/rules/axe/4.9/aria-dialog-name)."
40
58
  },
@@ -89,6 +107,15 @@
89
107
  "core/audits/accessibility/aria-progressbar-name.js | title": {
90
108
  "message": "ARIA `progressbar` elements have accessible names"
91
109
  },
110
+ "core/audits/accessibility/aria-prohibited-attr.js | description": {
111
+ "message": "Using ARIA attributes in roles where they are prohibited can mean that important information is not communicated to users of assistive technologies. [Learn more about prohibited ARIA roles](https://dequeuniversity.com/rules/axe/4.9/aria-prohibited-attr)."
112
+ },
113
+ "core/audits/accessibility/aria-prohibited-attr.js | failureTitle": {
114
+ "message": "Elements use prohibited ARIA attributes"
115
+ },
116
+ "core/audits/accessibility/aria-prohibited-attr.js | title": {
117
+ "message": "Elements use only permitted ARIA attributes"
118
+ },
92
119
  "core/audits/accessibility/aria-required-attr.js | description": {
93
120
  "message": "Some ARIA roles have required attributes that describe the state of the element to screen readers. [Learn more about roles and required attributes](https://dequeuniversity.com/rules/axe/4.9/aria-required-attr)."
94
121
  },
@@ -35,6 +35,24 @@
35
35
  "core/audits/accessibility/aria-command-name.js | title": {
36
36
  "message": "`button`, `link`, âńd̂ `menuitem` él̂ém̂én̂t́ŝ h́âv́ê áĉćêśŝíb̂ĺê ńâḿêś"
37
37
  },
38
+ "core/audits/accessibility/aria-conditional-attr.js | description": {
39
+ "message": "Ŝóm̂é ÂŔÎÁ ât́t̂ŕîb́ût́êś âŕê ón̂ĺŷ ál̂ĺôẃêd́ ôń âń êĺêḿêńt̂ ún̂d́êŕ ĉér̂t́âín̂ ćôńd̂ít̂íôńŝ. [Ĺêár̂ń m̂ór̂é âb́ôút̂ ćôńd̂ít̂íôńâĺ ÂŔÎÁ ât́t̂ŕîb́ût́êś](https://dequeuniversity.com/rules/axe/4.9/aria-conditional-attr)."
40
+ },
41
+ "core/audits/accessibility/aria-conditional-attr.js | failureTitle": {
42
+ "message": "ÂŔÎÁ ât́t̂ŕîb́ût́êś âŕê ńôt́ ûśêd́ âś ŝṕêćîf́îéd̂ f́ôŕ t̂h́ê él̂ém̂én̂t́'ŝ ŕôĺê"
43
+ },
44
+ "core/audits/accessibility/aria-conditional-attr.js | title": {
45
+ "message": "ÂŔÎÁ ât́t̂ŕîb́ût́êś âŕê úŝéd̂ áŝ śp̂éĉíf̂íêd́ f̂ór̂ t́ĥé êĺêḿêńt̂'ś r̂ól̂é"
46
+ },
47
+ "core/audits/accessibility/aria-deprecated-role.js | description": {
48
+ "message": "D̂ép̂ŕêćât́êd́ ÂŔÎÁ r̂ól̂éŝ ḿâý n̂ót̂ b́ê ṕr̂óĉéŝśêd́ ĉór̂ŕêćt̂ĺŷ b́ŷ áŝśîśt̂ív̂é t̂éĉh́n̂ól̂óĝý. [L̂éâŕn̂ ḿôŕê áb̂óût́ d̂ép̂ŕêćât́êd́ ÂŔÎÁ r̂ól̂éŝ](https://dequeuniversity.com/rules/axe/4.9/aria-deprecated-role)."
49
+ },
50
+ "core/audits/accessibility/aria-deprecated-role.js | failureTitle": {
51
+ "message": "D̂ép̂ŕêćât́êd́ ÂŔÎÁ r̂ól̂éŝ ẃêŕê úŝéd̂"
52
+ },
53
+ "core/audits/accessibility/aria-deprecated-role.js | title": {
54
+ "message": "D̂ép̂ŕêćât́êd́ ÂŔÎÁ r̂ól̂éŝ ẃêŕê ńôt́ ûśêd́"
55
+ },
38
56
  "core/audits/accessibility/aria-dialog-name.js | description": {
39
57
  "message": "ÂŔÎÁ d̂íâĺôǵ êĺêḿêńt̂ś ŵít̂h́ôút̂ áĉćêśŝíb̂ĺê ńâḿêś m̂áŷ ṕr̂év̂én̂t́ ŝćr̂éêń r̂éâd́êŕŝ úŝér̂ś f̂ŕôḿ d̂íŝćêŕn̂ín̂ǵ t̂h́ê ṕûŕp̂óŝé ôf́ t̂h́êśê él̂ém̂én̂t́ŝ. [Ĺêár̂ń ĥóŵ t́ô ḿâḱê ÁR̂ÍÂ d́îál̂óĝ él̂ém̂én̂t́ŝ ḿôŕê áĉćêśŝíb̂ĺê](https://dequeuniversity.com/rules/axe/4.9/aria-dialog-name)."
40
58
  },
@@ -89,6 +107,15 @@
89
107
  "core/audits/accessibility/aria-progressbar-name.js | title": {
90
108
  "message": "ÂŔÎÁ `progressbar` êĺêḿêńt̂ś ĥáv̂é âćĉéŝśîb́l̂é n̂ám̂éŝ"
91
109
  },
110
+ "core/audits/accessibility/aria-prohibited-attr.js | description": {
111
+ "message": "Ûśîńĝ ÁR̂ÍÂ át̂t́r̂íb̂út̂éŝ ín̂ ŕôĺêś ŵh́êŕê t́ĥéŷ ár̂é p̂ŕôh́îb́ît́êd́ ĉán̂ ḿêán̂ t́ĥát̂ ím̂ṕôŕt̂án̂t́ îńf̂ór̂ḿât́îón̂ íŝ ńôt́ ĉóm̂ḿûńîćât́êd́ t̂ó ûśêŕŝ óf̂ áŝśîśt̂ív̂é t̂éĉh́n̂ól̂óĝíêś. [L̂éâŕn̂ ḿôŕê áb̂óût́ p̂ŕôh́îb́ît́êd́ ÂŔÎÁ r̂ól̂éŝ](https://dequeuniversity.com/rules/axe/4.9/aria-prohibited-attr)."
112
+ },
113
+ "core/audits/accessibility/aria-prohibited-attr.js | failureTitle": {
114
+ "message": "Êĺêḿêńt̂ś ûśê ṕr̂óĥíb̂ít̂éd̂ ÁR̂ÍÂ át̂t́r̂íb̂út̂éŝ"
115
+ },
116
+ "core/audits/accessibility/aria-prohibited-attr.js | title": {
117
+ "message": "Êĺêḿêńt̂ś ûśê ón̂ĺŷ ṕêŕm̂ít̂t́êd́ ÂŔÎÁ ât́t̂ŕîb́ût́êś"
118
+ },
92
119
  "core/audits/accessibility/aria-required-attr.js | description": {
93
120
  "message": "Ŝóm̂é ÂŔÎÁ r̂ól̂éŝ h́âv́ê ŕêq́ûír̂éd̂ át̂t́r̂íb̂út̂éŝ t́ĥát̂ d́êśĉŕîb́ê t́ĥé ŝt́ât́ê óf̂ t́ĥé êĺêḿêńt̂ t́ô śĉŕêén̂ ŕêád̂ér̂ś. [L̂éâŕn̂ ḿôŕê áb̂óût́ r̂ól̂éŝ án̂d́ r̂éq̂úîŕêd́ ât́t̂ŕîb́ût́êś](https://dequeuniversity.com/rules/axe/4.9/aria-required-attr)."
94
121
  },