axe-core 4.4.1-canary.bb8b5ca → 4.4.1-canary.c2f4ebd

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.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! axe v4.4.1-canary.bb8b5ca
1
+ /*! axe v4.4.1-canary.c2f4ebd
2
2
  * Copyright (c) 2022 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(obj);
23
23
  }
24
24
  var axe = axe || {};
25
- axe.version = '4.4.1-canary.bb8b5ca';
25
+ axe.version = '4.4.1-canary.c2f4ebd';
26
26
  if (typeof define === 'function' && define.amd) {
27
27
  define('axe-core', [], function() {
28
28
  return axe;
@@ -16464,7 +16464,15 @@
16464
16464
  }
16465
16465
  var no_implicit_explicit_label_evaluate_default = noImplicitExplicitLabelEvaluate;
16466
16466
  function unsupportedroleEvaluate(node, options, virtualNode) {
16467
- return is_unsupported_role_default(get_role_default(virtualNode));
16467
+ var role = get_role_default(virtualNode, {
16468
+ dpub: true,
16469
+ fallback: true
16470
+ });
16471
+ var isUnsupported = is_unsupported_role_default(role);
16472
+ if (isUnsupported) {
16473
+ this.data(role);
16474
+ }
16475
+ return isUnsupported;
16468
16476
  }
16469
16477
  var unsupportedrole_evaluate_default = unsupportedroleEvaluate;
16470
16478
  var VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS = {
@@ -16993,6 +17001,9 @@
16993
17001
  function colorContrastEvaluate(node, options, virtualNode) {
16994
17002
  var ignoreUnicode = options.ignoreUnicode, ignoreLength = options.ignoreLength, ignorePseudo = options.ignorePseudo, boldValue = options.boldValue, boldTextPt = options.boldTextPt, largeTextPt = options.largeTextPt, contrastRatio = options.contrastRatio, shadowOutlineEmMax = options.shadowOutlineEmMax, pseudoSizeThreshold = options.pseudoSizeThreshold;
16995
17003
  if (!is_visible_default(node, false)) {
17004
+ this.data({
17005
+ messageKey: 'hidden'
17006
+ });
16996
17007
  return true;
16997
17008
  }
16998
17009
  var visibleText = visible_virtual_default(virtualNode, false, true);
@@ -17044,6 +17055,9 @@
17044
17055
  var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
17045
17056
  var isValid = contrast > expected;
17046
17057
  if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
17058
+ this.data({
17059
+ contrastRatio: contrast
17060
+ });
17047
17061
  return true;
17048
17062
  }
17049
17063
  var truncatedResult = Math.floor(contrast * 100) / 100;
@@ -22371,7 +22385,7 @@
22371
22385
  impact: 'minor',
22372
22386
  messages: {
22373
22387
  pass: 'ARIA role is not deprecated',
22374
- fail: 'The role used is deprecated: ${data.values}'
22388
+ fail: 'The role used is deprecated: ${data}'
22375
22389
  }
22376
22390
  },
22377
22391
  fallbackrole: {
@@ -22427,7 +22441,7 @@
22427
22441
  impact: 'critical',
22428
22442
  messages: {
22429
22443
  pass: 'ARIA role is supported',
22430
- fail: 'The role used is not widely supported in screen readers and assistive technologies: ${data.values}'
22444
+ fail: 'The role used is not widely supported in screen readers and assistive technologies: ${data}'
22431
22445
  }
22432
22446
  },
22433
22447
  'valid-scrollable-semantics': {
@@ -22466,7 +22480,10 @@
22466
22480
  'color-contrast': {
22467
22481
  impact: 'serious',
22468
22482
  messages: {
22469
- pass: 'Element has sufficient color contrast of ${data.contrastRatio}',
22483
+ pass: {
22484
+ default: 'Element has sufficient color contrast of ${data.contrastRatio}',
22485
+ hidden: 'Element is hidden'
22486
+ },
22470
22487
  fail: {
22471
22488
  default: 'Element has insufficient color contrast of ${data.contrastRatio} (foreground color: ${data.fgColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
22472
22489
  fgOnShadowColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the foreground and shadow color (foreground color: ${data.fgColor}, text-shadow color: ${data.shadowColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',