axe-core 4.10.0-canary.cfd2974 → 4.10.0-canary.dde04a1

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  # axe-core
2
2
 
3
- [![License](https://img.shields.io/npm/l/axe-core.svg)](LICENSE)
3
+ [![License](https://img.shields.io/npm/l/axe-core.svg?color=c41)](LICENSE)
4
4
  [![Version](https://img.shields.io/npm/v/axe-core.svg)](https://www.npmjs.com/package/axe-core)
5
- [![Total npm downloads](https://img.shields.io/npm/dt/axe-core.svg)](https://www.npmjs.com/package/axe-core)
5
+ [![NPM downloads](https://img.shields.io/npm/dw/axe-core.svg?color=080)![](https://img.shields.io/npm/dy/axe-core.svg?color=080&label=)](https://npm-stat.com/charts.html?package=axe-core&from=2017-01-01)
6
6
  [![Commits](https://img.shields.io/github/commit-activity/y/dequelabs/axe-core.svg)](https://github.com/dequelabs/axe-core/commits/develop)
7
- [![GitHub contributors](https://img.shields.io/github/contributors/dequelabs/axe-core.svg)](https://github.com/dequelabs/axe-core/graphs/contributors)
7
+ [![GitHub contributors](https://img.shields.io/github/contributors/dequelabs/axe-core.svg?color=080)](https://github.com/dequelabs/axe-core/graphs/contributors)
8
8
  [![Join our Slack chat](https://img.shields.io/badge/slack-chat-purple.svg?logo=slack)](https://accessibility.deque.com/axe-community)
9
9
  [![Package Quality](https://npm.packagequality.com/shield/axe-core.svg)](https://packagequality.com/#?package=axe-core)
10
10
 
package/axe.d.ts CHANGED
@@ -342,6 +342,9 @@ declare namespace axe {
342
342
  interface DqElement extends SerialDqElement {
343
343
  element: Element;
344
344
  toJSON(): SerialDqElement;
345
+ }
346
+ interface DqElementConstructor {
347
+ new (elm: Element, options?: { absolutePaths?: boolean }): DqElement;
345
348
  mergeSpecs(
346
349
  childSpec: SerialDqElement,
347
350
  parentSpec: SerialDqElement
@@ -405,6 +408,24 @@ declare namespace axe {
405
408
  boundingClientRect: DOMRect;
406
409
  }
407
410
 
411
+ interface CustomNodeSerializer<T = SerialDqElement> {
412
+ toSpec: (dqElm: DqElement) => T;
413
+ mergeSpecs: (nodeSpec: T, parentFrameSpec: T) => T;
414
+ }
415
+
416
+ interface NodeSerializer {
417
+ update: <T>(serializer: CustomNodeSerializer<T>) => void;
418
+ toSpec: (node: Element | VirtualNode) => SerialDqElement;
419
+ dqElmToSpec: (
420
+ dqElm: DqElement | SerialDqElement,
421
+ options?: RunOptions
422
+ ) => SerialDqElement;
423
+ mergeSpecs: (
424
+ nodeSpec: SerialDqElement,
425
+ parentFrameSpec: SerialDqElement
426
+ ) => SerialDqElement;
427
+ }
428
+
408
429
  interface Utils {
409
430
  getFrameContexts: (
410
431
  context?: ElementContext,
@@ -423,15 +444,13 @@ declare namespace axe {
423
444
  selector: unknown
424
445
  ) => selector is LabelledShadowDomSelector;
425
446
 
426
- DqElement: new (
427
- elm: Element,
428
- options?: { absolutePaths?: boolean }
429
- ) => DqElement;
447
+ DqElement: DqElementConstructor;
430
448
  uuid: (
431
449
  options?: { random?: Uint8Array | Array<number> },
432
450
  buf?: Uint8Array | Array<number>,
433
451
  offset?: number
434
452
  ) => string | Uint8Array | Array<number>;
453
+ nodeSerializer: NodeSerializer;
435
454
  }
436
455
 
437
456
  interface Aria {