axe-core 4.8.3 → 4.8.4-canary.ed737c7
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/LICENSE-3RD-PARTY.txt +66 -0
- package/README.md +6 -4
- package/axe.d.ts +21 -8
- package/axe.js +4174 -4142
- package/axe.min.js +3 -3
- package/locales/de.json +204 -30
- package/locales/el.json +1067 -0
- package/package.json +20 -21
- package/sri-history.json +377 -369
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
-----------------------------------------------------------------------------
|
|
2
|
+
MIT License
|
|
3
|
+
Applies to:
|
|
4
|
+
- colorjs.io; Copyright (c) 2021 Lea Verou, Chris Lilley
|
|
5
|
+
- core-js-pure; Copyright (c) 2014-2023 Denis Pushkarev
|
|
6
|
+
- css-selector-parser; Copyright (c) 2013 Dulin Marat
|
|
7
|
+
- doT.js; Copyright (c) 2011 Laura Doktorova
|
|
8
|
+
Software includes portions from jQote2 Copyright (c) 2010 aefxx,
|
|
9
|
+
http://aefxx.com/ licensed under the MIT license.
|
|
10
|
+
- emoji-regex; Copyright (c) Mathias Bynens <https://mathiasbynens.be/>
|
|
11
|
+
- es6-iterator; Copyright (c) 2013-2017 Mariusz Nowak (www.medikoo.com)
|
|
12
|
+
- es6-promise;
|
|
13
|
+
Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
|
14
|
+
- event-emitter; Copyright (C) 2012-2015 Mariusz Nowak (www.medikoo.com)
|
|
15
|
+
- is-promise; Copyright (c) 2014 Forbes Lindesay
|
|
16
|
+
- lru-queue; Copyright (C) 2014 Mariusz Nowak (www.medikoo.com)
|
|
17
|
+
- typedarray;
|
|
18
|
+
Copyright (c) 2010, Linden Research, Inc.
|
|
19
|
+
Copyright (c) 2012, Joshua Bell
|
|
20
|
+
- weakmap-polyfill; Copyright (c) 2015-2021 polygonplanet
|
|
21
|
+
-----------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
24
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
25
|
+
in the Software without restriction, including without limitation the rights
|
|
26
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
28
|
+
furnished to do so, subject to the following conditions:
|
|
29
|
+
|
|
30
|
+
The above copyright notice and this permission notice shall be included in
|
|
31
|
+
all copies or substantial portions of the Software.
|
|
32
|
+
|
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
36
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
37
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
38
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
39
|
+
THE SOFTWARE.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
-----------------------------------------------------------------------------
|
|
43
|
+
ISC License
|
|
44
|
+
Applies to:
|
|
45
|
+
- d; Copyright (c) 2013-2019, Mariusz Nowak, @medikoo, medikoo.com
|
|
46
|
+
- es5-ext; Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com
|
|
47
|
+
- es6-symbol; Copyright (c) 2013-2019, Mariusz Nowak, @medikoo, medikoo.com
|
|
48
|
+
- es6-weak-map; Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com
|
|
49
|
+
- ext; Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com
|
|
50
|
+
- memoizee; Copyright (c) 2012-2018, Mariusz Nowak, @medikoo, medikoo.com
|
|
51
|
+
- next-tick; Copyright (c) 2012-2020, Mariusz Nowak, @medikoo, medikoo.com
|
|
52
|
+
- timers-ext; Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com
|
|
53
|
+
- type; Copyright (c) 2019, Mariusz Nowak, @medikoo, medikoo.com
|
|
54
|
+
-----------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
57
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
58
|
+
copyright notice and this permission notice appear in all copies.
|
|
59
|
+
|
|
60
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
61
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
62
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
63
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
64
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
65
|
+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
66
|
+
PERFORMANCE OF THIS SOFTWARE.
|
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
|
|
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:
|
|
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 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`.
|
|
104
|
+
This will create a new build for axe, called `axe.<lang>.js` and `axe.<lang>.min.js`. If you want to build all 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
|
|
|
@@ -179,6 +179,8 @@ Read the [documentation on contributing](CONTRIBUTING.md)
|
|
|
179
179
|
|
|
180
180
|
## Acknowledgements
|
|
181
181
|
|
|
182
|
-
Thanks to Marat Dulin for his [css-selector-parser](https://www.npmjs.com/package/css-selector-parser) implementation which is included for shadow DOM support.
|
|
182
|
+
Thanks to Marat Dulin for his [css-selector-parser](https://www.npmjs.com/package/css-selector-parser) implementation which is included for shadow DOM support. Another thank you to the [Slick Parser](https://github.com/mootools/slick/blob/master/Source/Slick.Parser.js) implementers for their contribution, we have used some of their algorithms in our shadow DOM support code. Thanks to Lea Verou and Chris Lilley for their [colorjs.io](https://colorjs.io/) library which we have used for converting between color formats.
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
## Licenses
|
|
185
|
+
|
|
186
|
+
Axe-core is distributed under the [Mozilla Public License, version 2.0](LICENSE). It comes bundled with several dependencies which are distributed under their own terms. (See [LICENSE-3RD-PARTY.txt](LICENSE-3RD-PARTY.txt))
|
package/axe.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
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>
|
|
4
3
|
|
|
5
4
|
declare namespace axe {
|
|
6
5
|
type ImpactValue = 'minor' | 'moderate' | 'serious' | 'critical' | null;
|
|
7
6
|
|
|
8
7
|
type TagValue = string;
|
|
9
8
|
|
|
10
|
-
type ReporterVersion = 'v1' | 'v2' | 'raw' | '
|
|
9
|
+
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'rawEnv' | 'no-passes';
|
|
11
10
|
|
|
12
11
|
type RunOnlyType = 'rule' | 'rules' | 'tag' | 'tags';
|
|
13
12
|
|
|
@@ -132,7 +131,7 @@ declare namespace axe {
|
|
|
132
131
|
interface RunOptions {
|
|
133
132
|
runOnly?: RunOnly | TagValue[] | string[] | string;
|
|
134
133
|
rules?: RuleObject;
|
|
135
|
-
reporter?: ReporterVersion;
|
|
134
|
+
reporter?: ReporterVersion | string;
|
|
136
135
|
resultTypes?: resultGroups[];
|
|
137
136
|
selectors?: boolean;
|
|
138
137
|
ancestry?: boolean;
|
|
@@ -333,6 +332,14 @@ declare namespace axe {
|
|
|
333
332
|
xpath: string[];
|
|
334
333
|
ancestry: UnlabelledFrameSelector;
|
|
335
334
|
}
|
|
335
|
+
interface DqElement extends SerialDqElement {
|
|
336
|
+
element: Element;
|
|
337
|
+
toJSON(): SerialDqElement;
|
|
338
|
+
mergeSpecs(
|
|
339
|
+
childSpec: SerialDqElement,
|
|
340
|
+
parentSpec: SerialDqElement
|
|
341
|
+
): SerialDqElement;
|
|
342
|
+
}
|
|
336
343
|
interface PartialRuleResult {
|
|
337
344
|
id: string;
|
|
338
345
|
result: 'inapplicable';
|
|
@@ -351,16 +358,21 @@ declare namespace axe {
|
|
|
351
358
|
frameContext: FrameContextObject;
|
|
352
359
|
}
|
|
353
360
|
|
|
361
|
+
interface RawCheckResult extends Omit<CheckResult, 'relatedNodes'> {
|
|
362
|
+
relatedNodes?: Array<SerialDqElement | DqElement>;
|
|
363
|
+
}
|
|
364
|
+
|
|
354
365
|
interface RawNodeResult<T extends 'passed' | 'failed' | 'incomplete'> {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
366
|
+
node: SerialDqElement | DqElement;
|
|
367
|
+
any: RawCheckResult[];
|
|
368
|
+
all: RawCheckResult[];
|
|
369
|
+
none: RawCheckResult[];
|
|
358
370
|
impact: ImpactValue | null;
|
|
359
371
|
result: T;
|
|
360
372
|
}
|
|
361
373
|
|
|
362
374
|
interface RawResult extends Omit<Result, 'nodes'> {
|
|
363
|
-
inapplicable:
|
|
375
|
+
inapplicable: Array<never>;
|
|
364
376
|
passes: RawNodeResult<'passed'>[];
|
|
365
377
|
incomplete: RawNodeResult<'incomplete'>[];
|
|
366
378
|
violations: RawNodeResult<'failed'>[];
|
|
@@ -383,6 +395,7 @@ declare namespace axe {
|
|
|
383
395
|
attr(attr: string): string | null;
|
|
384
396
|
hasAttr(attr: string): boolean;
|
|
385
397
|
props: { [key: string]: unknown };
|
|
398
|
+
boundingClientRect: DOMRect;
|
|
386
399
|
}
|
|
387
400
|
|
|
388
401
|
interface Utils {
|
|
@@ -396,7 +409,7 @@ declare namespace axe {
|
|
|
396
409
|
DqElement: new (
|
|
397
410
|
elm: Element,
|
|
398
411
|
options?: { absolutePaths?: boolean }
|
|
399
|
-
) =>
|
|
412
|
+
) => DqElement;
|
|
400
413
|
uuid: (
|
|
401
414
|
options?: { random?: Uint8Array | Array<number> },
|
|
402
415
|
buf?: Uint8Array | Array<number>,
|