axe-core 4.8.3-canary.b63cd83 → 4.8.3
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 +2 -2
- package/axe.d.ts +8 -21
- package/axe.js +4747 -4807
- package/axe.min.js +2 -2
- package/locales/de.json +30 -204
- package/package.json +16 -14
- package/sri-history.json +369 -373
- package/locales/el.json +0 -1067
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ The [axe-core API](doc/API.md) package consists of:
|
|
|
93
93
|
|
|
94
94
|
## Localization
|
|
95
95
|
|
|
96
|
-
Axe can be built using your local language. To do so, a localization file must be added to the `./locales` directory. This file must be named in the following manner: `<langcode>.json`. To build axe using this locale, instead of the default, run axe with the `--lang` flag, like so:
|
|
96
|
+
Axe can be built using your local language. To do so, a localization file must be added to the `./locales` directory. This file must have be named in the following manner: `<langcode>.json`. To build axe using this locale, instead of the default, run axe with the `--lang` flag, like so:
|
|
97
97
|
|
|
98
98
|
`grunt build --lang=nl`
|
|
99
99
|
|
|
@@ -101,7 +101,7 @@ or equivalently:
|
|
|
101
101
|
|
|
102
102
|
`npm run build -- --lang=nl`
|
|
103
103
|
|
|
104
|
-
This will create a new build for axe, called `axe.<lang>.js` and `axe.<lang>.min.js`. If you want to build
|
|
104
|
+
This will create a new build for axe, called `axe.<lang>.js` and `axe.<lang>.min.js`. If you want to build localized versions, simply pass in `--all-lang` instead. If you want to build multiple localized versions (but not all of them), you can pass in a comma-separated list of languages to the `--lang` flag, like `--lang=nl,ja`.
|
|
105
105
|
|
|
106
106
|
To create a new translation for axe, start by running `grunt translate --lang=<langcode>`. This will create a json file fin the `./locales` directory, with the default English text in it for you to translate. Alternatively, you could copy `./locales/_template.json`. We welcome any localization for axe-core. For details on how to contribute, see the Contributing section below. For details on the message syntax, see [Check Message Template](/docs/check-message-template.md).
|
|
107
107
|
|
package/axe.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// Type definitions for axe-core
|
|
2
2
|
// Project: https://github.com/dequelabs/axe-core
|
|
3
|
+
// Definitions by: Marcy Sutton <https://github.com/marcysutton>
|
|
3
4
|
|
|
4
5
|
declare namespace axe {
|
|
5
6
|
type ImpactValue = 'minor' | 'moderate' | 'serious' | 'critical' | null;
|
|
6
7
|
|
|
7
8
|
type TagValue = string;
|
|
8
9
|
|
|
9
|
-
type ReporterVersion = 'v1' | 'v2' | 'raw' | '
|
|
10
|
+
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'raw-env' | 'no-passes';
|
|
10
11
|
|
|
11
12
|
type RunOnlyType = 'rule' | 'rules' | 'tag' | 'tags';
|
|
12
13
|
|
|
@@ -131,7 +132,7 @@ declare namespace axe {
|
|
|
131
132
|
interface RunOptions {
|
|
132
133
|
runOnly?: RunOnly | TagValue[] | string[] | string;
|
|
133
134
|
rules?: RuleObject;
|
|
134
|
-
reporter?: ReporterVersion
|
|
135
|
+
reporter?: ReporterVersion;
|
|
135
136
|
resultTypes?: resultGroups[];
|
|
136
137
|
selectors?: boolean;
|
|
137
138
|
ancestry?: boolean;
|
|
@@ -332,14 +333,6 @@ declare namespace axe {
|
|
|
332
333
|
xpath: string[];
|
|
333
334
|
ancestry: UnlabelledFrameSelector;
|
|
334
335
|
}
|
|
335
|
-
interface DqElement extends SerialDqElement {
|
|
336
|
-
element: Element;
|
|
337
|
-
toJSON(): SerialDqElement;
|
|
338
|
-
mergeSpecs(
|
|
339
|
-
childSpec: SerialDqElement,
|
|
340
|
-
parentSpec: SerialDqElement
|
|
341
|
-
): SerialDqElement;
|
|
342
|
-
}
|
|
343
336
|
interface PartialRuleResult {
|
|
344
337
|
id: string;
|
|
345
338
|
result: 'inapplicable';
|
|
@@ -358,21 +351,16 @@ declare namespace axe {
|
|
|
358
351
|
frameContext: FrameContextObject;
|
|
359
352
|
}
|
|
360
353
|
|
|
361
|
-
interface RawCheckResult extends Omit<CheckResult, 'relatedNodes'> {
|
|
362
|
-
relatedNodes?: Array<SerialDqElement | DqElement>;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
354
|
interface RawNodeResult<T extends 'passed' | 'failed' | 'incomplete'> {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
none: RawCheckResult[];
|
|
355
|
+
any: CheckResult[];
|
|
356
|
+
all: CheckResult[];
|
|
357
|
+
none: CheckResult[];
|
|
370
358
|
impact: ImpactValue | null;
|
|
371
359
|
result: T;
|
|
372
360
|
}
|
|
373
361
|
|
|
374
362
|
interface RawResult extends Omit<Result, 'nodes'> {
|
|
375
|
-
inapplicable:
|
|
363
|
+
inapplicable: [];
|
|
376
364
|
passes: RawNodeResult<'passed'>[];
|
|
377
365
|
incomplete: RawNodeResult<'incomplete'>[];
|
|
378
366
|
violations: RawNodeResult<'failed'>[];
|
|
@@ -395,7 +383,6 @@ declare namespace axe {
|
|
|
395
383
|
attr(attr: string): string | null;
|
|
396
384
|
hasAttr(attr: string): boolean;
|
|
397
385
|
props: { [key: string]: unknown };
|
|
398
|
-
boundingClientRect: DOMRect;
|
|
399
386
|
}
|
|
400
387
|
|
|
401
388
|
interface Utils {
|
|
@@ -409,7 +396,7 @@ declare namespace axe {
|
|
|
409
396
|
DqElement: new (
|
|
410
397
|
elm: Element,
|
|
411
398
|
options?: { absolutePaths?: boolean }
|
|
412
|
-
) =>
|
|
399
|
+
) => SerialDqElement;
|
|
413
400
|
uuid: (
|
|
414
401
|
options?: { random?: Uint8Array | Array<number> },
|
|
415
402
|
buf?: Uint8Array | Array<number>,
|