axe-core 4.10.0-canary.b422c79 → 4.10.0-canary.c42f0a9

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/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 {
package/axe.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! axe v4.10.0-canary.b422c79
1
+ /*! axe v4.10.0-canary.c42f0a9
2
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
@@ -22,7 +22,7 @@
22
22
  }, _typeof(o);
23
23
  }
24
24
  var axe = axe || {};
25
- axe.version = '4.10.0-canary.b422c79';
25
+ axe.version = '4.10.0-canary.c42f0a9';
26
26
  if (typeof define === 'function' && define.amd) {
27
27
  define('axe-core', [], function() {
28
28
  return axe;
@@ -11738,7 +11738,7 @@
11738
11738
  },
11739
11739
  form: {
11740
11740
  contentTypes: [ 'flow' ],
11741
- allowedRoles: [ 'search', 'none', 'presentation' ]
11741
+ allowedRoles: [ 'form', 'search', 'none', 'presentation' ]
11742
11742
  },
11743
11743
  h1: {
11744
11744
  contentTypes: [ 'heading', 'flow' ],
@@ -29200,8 +29200,8 @@
29200
29200
  help: 'accesskey attribute value should be unique'
29201
29201
  },
29202
29202
  'area-alt': {
29203
- description: 'Ensure <area> elements of image maps have alternate text',
29204
- help: 'Active <area> elements must have alternate text'
29203
+ description: 'Ensure <area> elements of image maps have alternative text',
29204
+ help: 'Active <area> elements must have alternative text'
29205
29205
  },
29206
29206
  'aria-allowed-attr': {
29207
29207
  description: 'Ensure an element\'s role supports its ARIA attributes',
@@ -29416,8 +29416,8 @@
29416
29416
  help: 'Links with the same name must have a similar purpose'
29417
29417
  },
29418
29418
  'image-alt': {
29419
- description: 'Ensure <img> elements have alternate text or a role of none or presentation',
29420
- help: 'Images must have alternate text'
29419
+ description: 'Ensure <img> elements have alternative text or a role of none or presentation',
29420
+ help: 'Images must have alternative text'
29421
29421
  },
29422
29422
  'image-redundant-alt': {
29423
29423
  description: 'Ensure image alternative is not repeated as text',
@@ -29428,8 +29428,8 @@
29428
29428
  help: 'Input buttons must have discernible text'
29429
29429
  },
29430
29430
  'input-image-alt': {
29431
- description: 'Ensure <input type="image"> elements have alternate text',
29432
- help: 'Image buttons must have alternate text'
29431
+ description: 'Ensure <input type="image"> elements have alternative text',
29432
+ help: 'Image buttons must have alternative text'
29433
29433
  },
29434
29434
  'label-content-name-mismatch': {
29435
29435
  description: 'Ensure that elements labelled through their content must have their visible text as part of their accessible name',
@@ -29524,8 +29524,8 @@
29524
29524
  help: '<video> or <audio> elements must not play automatically'
29525
29525
  },
29526
29526
  'object-alt': {
29527
- description: 'Ensure <object> elements have alternate text',
29528
- help: '<object> elements must have alternate text'
29527
+ description: 'Ensure <object> elements have alternative text',
29528
+ help: '<object> elements must have alternative text'
29529
29529
  },
29530
29530
  'p-as-heading': {
29531
29531
  description: 'Ensure bold, italic text and font-size is not used to style <p> elements as a heading',
@@ -29544,7 +29544,7 @@
29544
29544
  help: 'All page content should be contained by landmarks'
29545
29545
  },
29546
29546
  'role-img-alt': {
29547
- description: 'Ensure [role="img"] elements have alternate text',
29547
+ description: 'Ensure [role="img"] elements have alternative text',
29548
29548
  help: '[role="img"] elements must have an alternative text'
29549
29549
  },
29550
29550
  'scope-attr-valid': {
@@ -30145,7 +30145,7 @@
30145
30145
  messages: {
30146
30146
  pass: 'Form element has an implicit (wrapped) <label>',
30147
30147
  fail: 'Form element does not have an implicit (wrapped) <label>',
30148
- incomplete: 'Unable to determine if form element has an implicit (wrapped} <label>'
30148
+ incomplete: 'Unable to determine if form element has an implicit (wrapped) <label>'
30149
30149
  }
30150
30150
  },
30151
30151
  'label-content-name-mismatch': {