axe-core 4.3.4 → 4.3.5-canary.b451f2e

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/CHANGELOG.md CHANGED
@@ -2,6 +2,52 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [4.3.5-canary.b451f2e](https://github.com/dequelabs/axe-core/compare/v4.3.5...v4.3.5-canary.b451f2e) (2021-11-05)
6
+
7
+
8
+ ### Features
9
+
10
+ * add new ARIA roles ([#3138](https://github.com/dequelabs/axe-core/issues/3138)) ([61be7e5](https://github.com/dequelabs/axe-core/commit/61be7e555152d89c6770679fd6fdac10038f7cd3))
11
+ * **aria-allowed-attr:** report violations for non-global ARIA attributes on elements without a role ([#3102](https://github.com/dequelabs/axe-core/issues/3102)) ([87cfc0b](https://github.com/dequelabs/axe-core/commit/87cfc0b4f4d998a88a2d534438e4f2ccf9427a86))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **aria-allowed-attr:** check for invalid `aria-attributes` for `role="row"` ([#3160](https://github.com/dequelabs/axe-core/issues/3160)) ([cfa900d](https://github.com/dequelabs/axe-core/commit/cfa900d57265907b638dad36ba405a5b40dbde9c))
17
+ * **aria-allowed-attr:** revert violation for non-global ARIA attrs on element without role ([#3243](https://github.com/dequelabs/axe-core/issues/3243)) ([112b960](https://github.com/dequelabs/axe-core/commit/112b960ee95b6a6abfb38a15b7092d9847512f0f))
18
+ * **aria-allowed-children,aria-allowed-parent:** allow group role in listbox ([#3195](https://github.com/dequelabs/axe-core/issues/3195)) ([cb01975](https://github.com/dequelabs/axe-core/commit/cb019755d9cb52b997aae340f406ac26d0cf90e5))
19
+ * **aria-allowed-roles:** update role allowances for section element ([#3238](https://github.com/dequelabs/axe-core/issues/3238)) ([99676ec](https://github.com/dequelabs/axe-core/commit/99676ece547be39d71e776a5b9cae2da41c31572)), closes [#3237](https://github.com/dequelabs/axe-core/issues/3237)
20
+ * **aria-allowed-role:** Update allowed roles based on ARIA spec updates ([#3124](https://github.com/dequelabs/axe-core/issues/3124)) ([00f6efc](https://github.com/dequelabs/axe-core/commit/00f6efcd55eb0a4c56cc3ca1acc7c79e3d22f58d))
21
+ * **aria-allowed-role:** updates the allowed roles for the wbr element to none and presentation ([#3192](https://github.com/dequelabs/axe-core/issues/3192)) ([2f439b3](https://github.com/dequelabs/axe-core/commit/2f439b3fdb7e7fa3228e663c5313af0f08aa4327)), closes [#3177](https://github.com/dequelabs/axe-core/issues/3177)
22
+ * **aria-prohibited-attr:** update metadata message ([#3206](https://github.com/dequelabs/axe-core/issues/3206)) ([d1a768e](https://github.com/dequelabs/axe-core/commit/d1a768eaefe6d1c95e925174bc979bc7a95ee7d9))
23
+ * **autocomplete-valid:** Allow custom autocomplete attribute values ([#3225](https://github.com/dequelabs/axe-core/issues/3225)) ([6076ee8](https://github.com/dequelabs/axe-core/commit/6076ee8a7ba7527c9886916db1eda5d90cd26259))
24
+ * **axe.configure:** do not remove newline characters from locale doT strings ([#3216](https://github.com/dequelabs/axe-core/issues/3216)) ([ea2ce17](https://github.com/dequelabs/axe-core/commit/ea2ce171fd7562e6b85471e72dddc84be23a4297))
25
+ * **axe.run:** add option to increase iframe ping timeout ([#3233](https://github.com/dequelabs/axe-core/issues/3233)) ([ec937e3](https://github.com/dequelabs/axe-core/commit/ec937e3e147274cbdbba2b046a651c90623130e4))
26
+ * check for hidden elements on `aria-errormessage` ([#3156](https://github.com/dequelabs/axe-core/issues/3156)) ([95d37dd](https://github.com/dequelabs/axe-core/commit/95d37dd794dc8552d731fabf45244b260da53d8f))
27
+ * **color-contrast:** account for 0 width scroll regions with children ([#3172](https://github.com/dequelabs/axe-core/issues/3172)) ([5908f0d](https://github.com/dequelabs/axe-core/commit/5908f0d644c20e7091329bd8bbeb191837d27feb))
28
+ * **color-contrast:** account for elements that do not fill entire bounding size ([#3186](https://github.com/dequelabs/axe-core/issues/3186)) ([699697b](https://github.com/dequelabs/axe-core/commit/699697bc237b6c69050e4572ba5cfdc5f338f450))
29
+ * **color-contrast:** correctly apply page background color ([#3207](https://github.com/dequelabs/axe-core/issues/3207)) ([fbc581d](https://github.com/dequelabs/axe-core/commit/fbc581d77e457fe092ecc2b95015e667292f1a08))
30
+ * **color-contrast:** correctly compute color-contrast of truncated children ([#3203](https://github.com/dequelabs/axe-core/issues/3203)) ([ac7b2b5](https://github.com/dequelabs/axe-core/commit/ac7b2b5ec402e9de91c50ef39aefd5843f0d62bb))
31
+ * **color-contrast:** correctly handle nested scroll regions ([#3212](https://github.com/dequelabs/axe-core/issues/3212)) ([22db29c](https://github.com/dequelabs/axe-core/commit/22db29ca7e9964a8447392fba45a09057a926ab9))
32
+ * **color-contrast:** correctly work with positioned elements without z-index ([#3209](https://github.com/dequelabs/axe-core/issues/3209)) ([725a20c](https://github.com/dequelabs/axe-core/commit/725a20c91b9006e64009059f0ab9d1a0098d29df))
33
+ * **color-contrast:** properly blend multiple alpha colors ([#3193](https://github.com/dequelabs/axe-core/issues/3193)) ([e930a70](https://github.com/dequelabs/axe-core/commit/e930a7081d4308549370f74e9d341badd9661584))
34
+ * **d.ts:** Add PartialResults type ([#3126](https://github.com/dequelabs/axe-core/issues/3126)) ([544b6d5](https://github.com/dequelabs/axe-core/commit/544b6d579f3eecf8e102a53a911bbce0bd53b74f))
35
+ * greater consistency of help / description text ([#3204](https://github.com/dequelabs/axe-core/issues/3204)) ([0677565](https://github.com/dequelabs/axe-core/commit/0677565941486cf339e7267760d4e533d4a29a05))
36
+ * **is-visible:** do not error if window.Node does not exist ([#3168](https://github.com/dequelabs/axe-core/issues/3168)) ([4046087](https://github.com/dequelabs/axe-core/commit/404608773abf7b4d069a64931adf4ac7e942b663))
37
+ * **label-title-only:** allow hidden labels ([#3183](https://github.com/dequelabs/axe-core/issues/3183)) ([cad3994](https://github.com/dequelabs/axe-core/commit/cad39949c29bc3f83863e3484feef82e89e12118))
38
+ * **nativeSelectValue:** update selected value on change ([#3154](https://github.com/dequelabs/axe-core/issues/3154)) ([1ee88cb](https://github.com/dequelabs/axe-core/commit/1ee88cb4bb557560f10eab136464c321d4dee81e))
39
+ * **nested-interactive:** add message for negative tabindex ([#3194](https://github.com/dequelabs/axe-core/issues/3194)) ([b445291](https://github.com/dequelabs/axe-core/commit/b44529130568347816fa810c959b68f980161241)), closes [#2466](https://github.com/dequelabs/axe-core/issues/2466) [#2934](https://github.com/dequelabs/axe-core/issues/2934) [/github.com/dequelabs/axe-core/issues/3163#issuecomment-949804464](https://github.com/dequelabs//github.com/dequelabs/axe-core/issues/3163/issues/issuecomment-949804464)
40
+ * **p-as-heading:** `p-as-heading` rule to account for `textContent` length ([#3145](https://github.com/dequelabs/axe-core/issues/3145)) ([400a230](https://github.com/dequelabs/axe-core/commit/400a2308510246d64d37fac3db375201610cd7e7))
41
+ * **reporter:** Run inside isolated contexts ([#3129](https://github.com/dequelabs/axe-core/issues/3129)) ([afe6675](https://github.com/dequelabs/axe-core/commit/afe6675d2452089602dcc6c9e931987936e9a55a))
42
+ * Separate Level AAA rules from A and best-practices ([#3191](https://github.com/dequelabs/axe-core/issues/3191)) ([828e526](https://github.com/dequelabs/axe-core/commit/828e526fd06ee596df73f4825e750aad459ca75e))
43
+ * **typescript:** allow passing a NodeList to ElementContext ([#3161](https://github.com/dequelabs/axe-core/issues/3161)) ([ad4b165](https://github.com/dequelabs/axe-core/commit/ad4b165a0e019cd65f70fa5d085d83cea3e7338c))
44
+
45
+ ### [4.3.5](https://github.com/dequelabs/axe-core/compare/v4.3.4...v4.3.5) (2021-10-29)
46
+
47
+ ### Bug Fixes
48
+
49
+ - **aria-allowed-attr:** revert violation for non-global ARIA attrs on element without role ([#3243](https://github.com/dequelabs/axe-core/issues/3243)) ([e138fd6](https://github.com/dequelabs/axe-core/commit/e138fd6a00a8da6c48a74a614adc5dae8f2044e1))
50
+
5
51
  ### [4.3.4](https://github.com/dequelabs/axe-core/compare/v4.3.3...v4.3.4) (2021-10-22)
6
52
 
7
53
  ### Bug Fixes
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Commits](https://img.shields.io/github/commit-activity/y/dequelabs/axe-core.svg)](https://github.com/dequelabs/axe-core/commits/develop)
7
7
  [![GitHub contributors](https://img.shields.io/github/contributors/dequelabs/axe-core.svg)](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
- [![Package Quality](http://npm.packagequality.com/shield/axe-core.svg)](http://packagequality.com/#?package=axe-core)
9
+ [![Package Quality](https://npm.packagequality.com/shield/axe-core.svg)](https://packagequality.com/#?package=axe-core)
10
10
 
11
11
  Axe is an accessibility testing engine for websites and other HTML-based user interfaces. It's fast, secure, lightweight, and was built to seamlessly integrate with any existing test environment so you can automate accessibility testing alongside your regular functional testing.
12
12
 
package/axe.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! axe v4.3.4
1
+ /*! axe v4.3.5-canary.b451f2e
2
2
  * Copyright (c) 2021 Deque Systems, Inc.
3
3
  *
4
4
  * Your use of this Source Code Form is subject to the terms of the Mozilla Public
@@ -27,7 +27,7 @@
27
27
  return _typeof(obj);
28
28
  }
29
29
  var axe = axe || {};
30
- axe.version = '4.3.4';
30
+ axe.version = '4.3.5-canary.b451f2e';
31
31
  if (typeof define === 'function' && define.amd) {
32
32
  define('axe-core', [], function() {
33
33
  return axe;
@@ -8474,6 +8474,11 @@
8474
8474
  allowedAttrs: [ 'aria-expanded' ],
8475
8475
  superclassRole: [ 'landmark' ]
8476
8476
  },
8477
+ comment: {
8478
+ type: 'structure',
8479
+ allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
8480
+ superclassRole: [ 'article' ]
8481
+ },
8477
8482
  definition: {
8478
8483
  type: 'structure',
8479
8484
  allowedAttrs: [ 'aria-expanded' ],
@@ -8664,6 +8669,11 @@
8664
8669
  accessibleNameRequired: true,
8665
8670
  childrenPresentational: true
8666
8671
  },
8672
+ mark: {
8673
+ type: 'structure',
8674
+ superclassRole: [ 'section' ],
8675
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8676
+ },
8667
8677
  navigation: {
8668
8678
  type: 'landmark',
8669
8679
  allowedAttrs: [ 'aria-expanded' ],
@@ -8843,6 +8853,12 @@
8843
8853
  nameFromContent: true,
8844
8854
  childrenPresentational: true
8845
8855
  },
8856
+ suggestion: {
8857
+ type: 'structure',
8858
+ requiredOwned: [ 'insertion', 'deletion' ],
8859
+ superclassRole: [ 'section' ],
8860
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8861
+ },
8846
8862
  tab: {
8847
8863
  type: 'widget',
8848
8864
  requiredContext: [ 'tablist' ],
@@ -9717,7 +9733,7 @@
9717
9733
  },
9718
9734
  section: {
9719
9735
  contentTypes: [ 'sectioning', 'flow' ],
9720
- allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
9736
+ allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'group', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
9721
9737
  shadowRoot: true
9722
9738
  },
9723
9739
  select: {
@@ -15828,7 +15844,7 @@
15828
15844
  ariaAttr.forEach(function(attr) {
15829
15845
  preChecks[attr] = validateRowAttrs;
15830
15846
  });
15831
- if (allowed) {
15847
+ if (role && allowed) {
15832
15848
  for (var _i14 = 0; _i14 < attrs.length; _i14++) {
15833
15849
  var _preChecks$attrName;
15834
15850
  var attrName = attrs[_i14];
@@ -17886,7 +17902,7 @@
17886
17902
  function internalLinkPresentEvaluate(node, options, virtualNode) {
17887
17903
  var links = query_selector_all_default(virtualNode, 'a[href]');
17888
17904
  return links.some(function(vLink) {
17889
- return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));
17905
+ return /^#[^/!]/.test(vLink.attr('href'));
17890
17906
  });
17891
17907
  }
17892
17908
  var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
@@ -18620,7 +18636,7 @@
18620
18636
  return focusableDescendants(child);
18621
18637
  });
18622
18638
  }
18623
- function noFocusbleContentEvaluate(node, options, virtualNode) {
18639
+ function frameFocusableContentEvaluate(node, options, virtualNode) {
18624
18640
  if (!virtualNode.children) {
18625
18641
  return void 0;
18626
18642
  }
@@ -18632,7 +18648,49 @@
18632
18648
  return void 0;
18633
18649
  }
18634
18650
  }
18635
- var no_focusable_content_evaluate_default = noFocusbleContentEvaluate;
18651
+ var frame_focusable_content_evaluate_default = frameFocusableContentEvaluate;
18652
+ function getFocusableDescendants(vNode) {
18653
+ if (!vNode.children) {
18654
+ if (vNode.props.nodeType === 1) {
18655
+ throw new Error('Cannot determine children');
18656
+ }
18657
+ return [];
18658
+ }
18659
+ var retVal = [];
18660
+ vNode.children.forEach(function(child) {
18661
+ if (is_focusable_default(child)) {
18662
+ retVal.push(child);
18663
+ } else {
18664
+ retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
18665
+ }
18666
+ });
18667
+ return retVal;
18668
+ }
18669
+ function usesUnreliableHidingStrategy(vNode) {
18670
+ var tabIndex = parseInt(vNode.attr('tabindex'), 10);
18671
+ return !isNaN(tabIndex) && tabIndex < 0;
18672
+ }
18673
+ function noFocusableContentEvaluate(node, options, virtualNode) {
18674
+ if (!virtualNode.children) {
18675
+ return void 0;
18676
+ }
18677
+ try {
18678
+ var focusableDescendants2 = getFocusableDescendants(virtualNode);
18679
+ if (focusableDescendants2.length > 0) {
18680
+ var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
18681
+ if (notHiddenElements.length > 0) {
18682
+ this.data({
18683
+ messageKey: 'notHidden'
18684
+ });
18685
+ this.relatedNodes(notHiddenElements);
18686
+ }
18687
+ }
18688
+ return focusableDescendants2.length === 0;
18689
+ } catch (e) {
18690
+ return void 0;
18691
+ }
18692
+ }
18693
+ var no_focusable_content_evaluate_default = noFocusableContentEvaluate;
18636
18694
  function tabindexEvaluate(node, options, virtualNode) {
18637
18695
  var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
18638
18696
  return isNaN(tabIndex) ? true : tabIndex <= 0;
@@ -19667,6 +19725,7 @@
19667
19725
  'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
19668
19726
  'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
19669
19727
  'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
19728
+ 'frame-focusable-content-evaluate': frame_focusable_content_evaluate_default,
19670
19729
  'no-focusable-content-evaluate': no_focusable_content_evaluate_default,
19671
19730
  'tabindex-evaluate': tabindex_evaluate_default,
19672
19731
  'alt-space-value-evaluate': alt_space_value_evaluate_default,
@@ -21850,7 +21909,7 @@
21850
21909
  help: 'Zooming and scaling should not be disabled'
21851
21910
  },
21852
21911
  'nested-interactive': {
21853
- description: 'Ensure controls are not nested as they are not announced by screen readers',
21912
+ description: 'Ensures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies',
21854
21913
  help: 'Interactive controls must not be nested'
21855
21914
  },
21856
21915
  'no-autoplay-audio': {
@@ -22272,7 +22331,10 @@
22272
22331
  impact: 'serious',
22273
22332
  messages: {
22274
22333
  pass: 'Element does not have focusable descendants',
22275
- fail: 'Element has focusable descendants',
22334
+ fail: {
22335
+ default: 'Element has focusable descendants',
22336
+ notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent a screen reader from focusing the element (even with \'aria-hidden=true\')'
22337
+ },
22276
22338
  incomplete: 'Could not determine if element has descendants'
22277
22339
  }
22278
22340
  },
@@ -23126,7 +23188,12 @@
23126
23188
  matches: 'autocomplete-matches',
23127
23189
  tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
23128
23190
  actIds: [ '73f2c2' ],
23129
- all: [ 'autocomplete-valid' ],
23191
+ all: [ {
23192
+ options: {
23193
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
23194
+ },
23195
+ id: 'autocomplete-valid'
23196
+ } ],
23130
23197
  any: [],
23131
23198
  none: []
23132
23199
  }, {
@@ -24065,7 +24132,10 @@
24065
24132
  deprecated: true
24066
24133
  }, {
24067
24134
  id: 'autocomplete-valid',
24068
- evaluate: 'autocomplete-valid-evaluate'
24135
+ evaluate: 'autocomplete-valid-evaluate',
24136
+ options: {
24137
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
24138
+ }
24069
24139
  }, {
24070
24140
  id: 'accesskeys',
24071
24141
  evaluate: 'accesskeys-evaluate',
@@ -24090,7 +24160,7 @@
24090
24160
  evaluate: 'focusable-not-tabbable-evaluate'
24091
24161
  }, {
24092
24162
  id: 'frame-focusable-content',
24093
- evaluate: 'no-focusable-content-evaluate'
24163
+ evaluate: 'frame-focusable-content-evaluate'
24094
24164
  }, {
24095
24165
  id: 'landmark-is-top-level',
24096
24166
  evaluate: 'landmark-is-top-level-evaluate'