axe-core 4.8.3 → 4.8.4

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,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
@@ -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
- Thanks 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.
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' | 'raw-env' | 'no-passes';
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
- any: CheckResult[];
356
- all: CheckResult[];
357
- none: CheckResult[];
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
- ) => SerialDqElement;
412
+ ) => DqElement;
400
413
  uuid: (
401
414
  options?: { random?: Uint8Array | Array<number> },
402
415
  buf?: Uint8Array | Array<number>,
package/axe.js CHANGED
@@ -1,5 +1,5 @@
1
- /*! axe v4.8.3
2
- * Copyright (c) 2015 - 2023 Deque Systems, Inc.
1
+ /*! axe v4.8.4
2
+ * Copyright (c) 2015 - 2024 Deque Systems, Inc.
3
3
  *
4
4
  * Your use of this Source Code Form is subject to the terms of the Mozilla Public
5
5
  * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,7 +22,7 @@
22
22
  }, _typeof(obj);
23
23
  }
24
24
  var axe = axe || {};
25
- axe.version = '4.8.3';
25
+ axe.version = '4.8.4';
26
26
  if (typeof define === 'function' && define.amd) {
27
27
  define('axe-core', [], function() {
28
28
  return axe;
@@ -6520,7 +6520,7 @@
6520
6520
  return generateSelector2(item.elm, options, item.doc);
6521
6521
  });
6522
6522
  }
6523
- var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
6523
+ var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow', 'xmlns' ];
6524
6524
  var MAXATTRIBUTELENGTH = 31;
6525
6525
  var attrCharsRegex = /([\\"])/g;
6526
6526
  var newlineChars = /(\r\n|\r|\n)/g;
@@ -17061,19 +17061,21 @@
17061
17061
  key: 'props',
17062
17062
  get: function get() {
17063
17063
  if (!this._cache.hasOwnProperty('props')) {
17064
- var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, _id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value, selected = _this$actualNode.selected, checked = _this$actualNode.checked, indeterminate = _this$actualNode.indeterminate;
17064
+ var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, _id = _this$actualNode.id, nodeValue = _this$actualNode.nodeValue;
17065
17065
  this._cache.props = {
17066
17066
  nodeType: nodeType,
17067
17067
  nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
17068
17068
  id: _id,
17069
17069
  type: this._type,
17070
- multiple: multiple,
17071
- nodeValue: nodeValue,
17072
- value: value,
17073
- selected: selected,
17074
- checked: checked,
17075
- indeterminate: indeterminate
17070
+ nodeValue: nodeValue
17076
17071
  };
17072
+ if (nodeType === 1) {
17073
+ this._cache.props.multiple = this.actualNode.multiple;
17074
+ this._cache.props.value = this.actualNode.value;
17075
+ this._cache.props.selected = this.actualNode.selected;
17076
+ this._cache.props.checked = this.actualNode.checked;
17077
+ this._cache.props.indeterminate = this.actualNode.indeterminate;
17078
+ }
17077
17079
  }
17078
17080
  return this._cache.props;
17079
17081
  }