axe-core 4.12.1 → 4.13.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/README.md +10 -7
- package/axe.d.ts +4 -15
- package/axe.js +4011 -3559
- package/axe.min.js +2 -2
- package/gather-internals.js +1 -1
- package/locales/README.md +2 -2
- package/locales/_template.json +15 -5
- package/locales/sv.json +1147 -0
- package/package.json +65 -73
- package/sri-history.json +4 -0
package/gather-internals.js
CHANGED
|
@@ -191,7 +191,7 @@ var elementInternalsMap = (() => {
|
|
|
191
191
|
if (value === null) {
|
|
192
192
|
continue;
|
|
193
193
|
}
|
|
194
|
-
if (value instanceof globalThis.
|
|
194
|
+
if (value instanceof globalThis.Node) {
|
|
195
195
|
internals[prop] = value.isConnected ? {type: "HTMLElement", value: getAncestry(value)} : void 0;
|
|
196
196
|
} else if (Array.isArray(value) || value instanceof globalThis.NodeList) {
|
|
197
197
|
const array = Array.from(value).filter((n) => n.isConnected);
|
package/locales/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
We welcome any localization for axe-core. For details on how to contribute, see the [Contributing section](../README.md#contributing) of the main README. For details on the message syntax, see [Check Message Template](../doc/check-message-template.md).
|
|
4
4
|
|
|
5
|
-
To create a new translation for axe, start by running `
|
|
5
|
+
To create a new translation for axe, start by running `pnpm run translate -- --lang=<langcode>`. This will create a JSON file with the default English text in it for you to translate. Alternatively, you could copy `_template.json`.
|
|
6
6
|
|
|
7
|
-
To update an existing translation file, re-run `
|
|
7
|
+
To update an existing translation file, re-run `pnpm run translate -- --lang=<langcode>`. This will add new messages used in English and remove messages that are no longer used in English.
|
|
8
8
|
|
|
9
9
|
`_template.json` is a generated file which is created every time axe is built. It's compiled using each rule's `description` and `help` properties, as well as each check's `metadata.messages` property. To update the `_template.json` file you'll need to update the corresponding [rule](../lib/rules) or [check](../lib/checks) metadata file and rebuild.
|
package/locales/_template.json
CHANGED
|
@@ -354,8 +354,8 @@
|
|
|
354
354
|
"help": "All page content should be contained by landmarks"
|
|
355
355
|
},
|
|
356
356
|
"role-img-alt": {
|
|
357
|
-
"description": "Ensure [role=\"img\"] elements have alternative text",
|
|
358
|
-
"help": "[role=\"img\"] elements must have alternative text"
|
|
357
|
+
"description": "Ensure [role=\"img\"] and [role=\"image\"] elements have alternative text",
|
|
358
|
+
"help": "[role=\"img\"] and [role=\"image\"] elements must have alternative text"
|
|
359
359
|
},
|
|
360
360
|
"scope-attr-valid": {
|
|
361
361
|
"description": "Ensure the scope attribute is used correctly on tables",
|
|
@@ -382,8 +382,8 @@
|
|
|
382
382
|
"help": "Summary elements must have discernible text"
|
|
383
383
|
},
|
|
384
384
|
"svg-img-alt": {
|
|
385
|
-
"description": "Ensure <svg> elements with an img, graphics-document or graphics-symbol role have accessible text",
|
|
386
|
-
"help": "<svg> elements with an img role must have alternative text"
|
|
385
|
+
"description": "Ensure <svg> elements with an img, image, graphics-document or graphics-symbol role have accessible text",
|
|
386
|
+
"help": "<svg> elements with an img or image role must have alternative text"
|
|
387
387
|
},
|
|
388
388
|
"tabindex": {
|
|
389
389
|
"description": "Ensure tabindex attribute values are not greater than 0",
|
|
@@ -491,6 +491,13 @@
|
|
|
491
491
|
"pass": "aria-level values are valid",
|
|
492
492
|
"incomplete": "aria-level values greater than 6 are not supported in all screenreader and browser combinations"
|
|
493
493
|
},
|
|
494
|
+
"aria-no-deprecated-attr": {
|
|
495
|
+
"pass": "No deprecated ARIA attributes are used",
|
|
496
|
+
"incomplete": {
|
|
497
|
+
"singular": "The attribute is deprecated and should not be used: ${data.values}",
|
|
498
|
+
"plural": "The attributes are deprecated and should not be used: ${data.values}"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
494
501
|
"aria-prohibited-attr": {
|
|
495
502
|
"pass": "ARIA attribute is allowed",
|
|
496
503
|
"fail": {
|
|
@@ -503,7 +510,10 @@
|
|
|
503
510
|
"hasRoleSingular": "${data.prohibited} attribute is not well supported with role \"${data.role}\".",
|
|
504
511
|
"hasRolePlural": "${data.prohibited} attributes are not well supported with role \"${data.role}\".",
|
|
505
512
|
"noRoleSingular": "${data.prohibited} attribute is not well supported on a ${data.nodeName} with no valid role attribute.",
|
|
506
|
-
"noRolePlural": "${data.prohibited} attributes are not well supported on a ${data.nodeName} with no valid role attribute."
|
|
513
|
+
"noRolePlural": "${data.prohibited} attributes are not well supported on a ${data.nodeName} with no valid role attribute.",
|
|
514
|
+
"visibleLabelSingular": "${data.prohibited} attribute is not well supported, but the elements referenced by aria-labelledby are visible in the page. Verify the label is not necessary.",
|
|
515
|
+
"visibleLabelPlural": "${data.prohibited} attributes are not well supported, but the elements referenced by aria-labelledby are visible in the page. Verify the labels are not necessary.",
|
|
516
|
+
"unresolvedLabel": "${data.prohibited} attribute is not well supported, and does not reference an existing element. Verify the label is not necessary."
|
|
507
517
|
}
|
|
508
518
|
},
|
|
509
519
|
"aria-required-attr": {
|