govuk_publishing_components 21.37.0 → 21.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +44 -11
  3. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +5 -0
  4. data/lib/govuk_publishing_components/version.rb +1 -1
  5. data/node_modules/axe-core/CHANGELOG.md +16 -0
  6. data/node_modules/axe-core/README.md +10 -9
  7. data/node_modules/axe-core/axe.js +181 -123
  8. data/node_modules/axe-core/axe.min.js +2 -2
  9. data/node_modules/axe-core/bower.json +1 -1
  10. data/node_modules/axe-core/doc/API.md +1 -1
  11. data/node_modules/axe-core/doc/rule-descriptions.md +2 -2
  12. data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate.js +5 -3
  13. data/node_modules/axe-core/lib/checks/language/has-lang.js +12 -2
  14. data/node_modules/axe-core/lib/checks/language/has-lang.json +4 -1
  15. data/node_modules/axe-core/lib/checks/mobile/meta-viewport-scale.js +32 -18
  16. data/node_modules/axe-core/lib/checks/navigation/header-present.json +2 -2
  17. data/node_modules/axe-core/lib/checks/tables/td-headers-attr.js +31 -32
  18. data/node_modules/axe-core/lib/checks/tables/td-headers-attr.json +1 -0
  19. data/node_modules/axe-core/lib/checks/tables/th-has-data-cells.js +14 -4
  20. data/node_modules/axe-core/lib/commons/table/get-headers.js +8 -2
  21. data/node_modules/axe-core/lib/commons/text/unicode.js +19 -7
  22. data/node_modules/axe-core/lib/core/utils/respondable.js +6 -5
  23. data/node_modules/axe-core/lib/core/utils/uuid.js +3 -0
  24. data/node_modules/axe-core/lib/rules/definition-list.json +1 -1
  25. data/node_modules/axe-core/lib/rules/label.json +1 -1
  26. data/node_modules/axe-core/locales/pt_BR.json +136 -27
  27. data/node_modules/axe-core/package.json +19 -19
  28. data/node_modules/axe-core/sri-history.json +4 -0
  29. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7343e4fe7a73cac6e8c139f06e54a8691a15cc4f6964595c4dac999d3186106
4
- data.tar.gz: 1fee051d18738e77725e74464527b67eb9e7a99e2eceae382aee64e0acdcfb46
3
+ metadata.gz: 18137270f2852ffc825106a02021d82aec4bf5a484a3151cd9731044a1d74c2f
4
+ data.tar.gz: 3e69bbe1712825eebeaebd0a4856ba441f6ea3ee8f5378b8edaa3d2571e12432
5
5
  SHA512:
6
- metadata.gz: 34e961e66d8957202a7e8c89755f7959b53793ae2181ecb4de104080a7f5e6f92f06002ed296c2c774f47f9a2555be68dfc50362dac4022181467aae4b844f3b
7
- data.tar.gz: d04a0d287874c62a7b3a9b4399155944715a21c6c695412a6b42384b29667067f7479d7fba2e538c9f3f84ef493606b3a691fb084d9403e552cfb6935af192a3
6
+ metadata.gz: 3202d48ccec1cc270fed74433eeddf6b1137a3370f81ae61c39c0cd293ae29abca31006d89a298c304d433a3b1e472a0089a08a1ae511d3491b9ce74b21a7969
7
+ data.tar.gz: d1e5a814a0d052c755b00192cb6d2d987a87f988852f66aa9b0a0fc5f1ce898ea9055089e60b3800d021b92a7a0c9e6ddea7bfb64daf5e6c83b4741065e938ee
@@ -20,11 +20,19 @@
20
20
 
21
21
  for (var i = 0; i < $youtubeLinks.length; ++i) {
22
22
  var $link = $youtubeLinks[i]
23
+ var href = $link.getAttribute('href')
23
24
 
24
- var videoId = YoutubeLinkEnhancement.parseVideoId($link.getAttribute('href'))
25
+ if (href.includes("/live_stream")) {
26
+ var channelId = YoutubeLinkEnhancement.parseLivestream(href)
25
27
 
26
- if (!this.hasDisabledEmbed($link) && videoId) {
27
- this.setupVideo($link, videoId)
28
+ if (!this.hasDisabledEmbed($link) && channelId) {
29
+ this.setupVideo({link: $link, channel: channelId})
30
+ }
31
+ } else {
32
+ var videoId = YoutubeLinkEnhancement.parseVideoId(href)
33
+ if (!this.hasDisabledEmbed($link) && videoId) {
34
+ this.setupVideo({link: $link, videoId: videoId})
35
+ }
28
36
  }
29
37
  }
30
38
  }
@@ -33,21 +41,36 @@
33
41
  return $link.getAttribute('data-youtube-player') === 'off'
34
42
  }
35
43
 
36
- YoutubeLinkEnhancement.prototype.setupVideo = function ($link, videoId) {
44
+ YoutubeLinkEnhancement.prototype.setupVideo = function (options) {
37
45
  var elementId = YoutubeLinkEnhancement.nextId()
46
+ var $link = options.link
47
+
48
+ var id = options.videoId ? options.videoId : options.channel
38
49
 
39
50
  var parentPara = $link.parentNode
40
51
  var parentContainer = parentPara.parentNode
41
52
 
42
53
  var youtubeVideoContainer = document.createElement('div')
43
54
  youtubeVideoContainer.className += 'gem-c-govspeak__youtube-video'
44
- youtubeVideoContainer.innerHTML = '<span id="' + elementId + '" data-video-id="' + videoId + '"></span>'
55
+ youtubeVideoContainer.innerHTML = '<span id="' + elementId + '" data-video-id="' + id + '"></span>'
56
+
57
+ options['title'] = $link.textContent
45
58
 
46
59
  parentContainer.replaceChild(youtubeVideoContainer, parentPara)
47
- this.insertVideo(elementId, videoId, $link.textContent)
60
+ this.insertVideo(elementId, options)
48
61
  }
49
62
 
50
- YoutubeLinkEnhancement.prototype.insertVideo = function (elementId, videoId, title) {
63
+ YoutubeLinkEnhancement.prototype.insertVideo = function (elementId, options) {
64
+ var channelId = ""
65
+ var videoId = ""
66
+
67
+ if (options.channel) {
68
+ channelId = options.channel
69
+ videoId = "live_stream"
70
+ } else {
71
+ videoId = options.videoId
72
+ }
73
+
51
74
  var videoInsert = function () {
52
75
  new window.YT.Player(elementId, { // eslint-disable-line no-new
53
76
  videoId: videoId,
@@ -62,12 +85,15 @@
62
85
  // https://www.w3.org/WAI/WCAG21/quickref/#character-key-shortcuts
63
86
  disablekb: 1,
64
87
  // prevent the YouTube logo from displaying in the control bar
65
- modestbranding: 1
88
+ modestbranding: 1,
89
+ // To support live_stream videos
90
+ channel: channelId
66
91
  },
67
92
  events: {
68
93
  onReady: function (event) {
69
94
  // update iframe title attribute once video is ready
70
- event.target.a.setAttribute('title', title + ' (video)')
95
+ var videoTitle = options.title
96
+ event.target.f.title = videoTitle + ' (video)'
71
97
  }
72
98
  }
73
99
  })
@@ -105,6 +131,14 @@
105
131
  this.apiScriptInserted = true
106
132
  }
107
133
 
134
+ YoutubeLinkEnhancement.parseLivestream = function (url) {
135
+ var matches = url.match(/channel=([^&]*)/)
136
+
137
+ if (matches) {
138
+ return matches[1]
139
+ }
140
+ }
141
+
108
142
  // This is a public class method so it can be used outside of this embed to
109
143
  // check that user input for videos will be supported in govspeak
110
144
  YoutubeLinkEnhancement.parseVideoId = function (url) {
@@ -123,8 +157,7 @@
123
157
  }
124
158
  return params.v
125
159
  }
126
-
127
- if (url.indexOf('youtu.be') > -1) {
160
+ else if (url.indexOf('youtu.be') > -1) {
128
161
  parts = url.split('/')
129
162
  return parts.pop()
130
163
  }
@@ -285,6 +285,11 @@ examples:
285
285
  block: |
286
286
  <p>This content has a YouTube video link, converted to an accessible embedded player by component JavaScript.</p>
287
287
  <p><a href="https://www.youtube.com/watch?v=y6hbrS3DheU">Operations: a developer's guide, by Anna Shipman</a></p>
288
+ with_youtube_livestream:
289
+ data:
290
+ block: |
291
+ <p>This content has a YouTube livestream link, converted to an accessible embedded player by component JavaScript.</p>
292
+ <p><a href="https://www.youtube.com/embed/live_stream?channel=UCoMdktPbSTixAyNGwb-UYkQ">Livestream video</a></p>
288
293
  with_youtube_embed_disabled:
289
294
  data:
290
295
  disable_youtube_expansions: true
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.37.0".freeze
2
+ VERSION = "21.38.0".freeze
3
3
  end
@@ -2,6 +2,22 @@
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
+ ### [3.5.3](https://github.com/dequelabs/axe-core/compare/v3.5.2...v3.5.3) (2020-03-31)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **meta-viewport:** parse negative and string values for `maximum-scale` ([#2137](https://github.com/dequelabs/axe-core/issues/2137)) ([8c92472](https://github.com/dequelabs/axe-core/commit/8c92472397676d44b333cf50ad1a9413b9783c2c))
10
+ - **respondable:** ignore reflected messages from iframes ([#2134](https://github.com/dequelabs/axe-core/issues/2134)) ([3ab9f21](https://github.com/dequelabs/axe-core/commit/3ab9f21414d8f4195ac95ffca8f0ce52258539b0))
11
+ - **header-present:** update verbiage to use heading instead of header ([#2132](https://github.com/dequelabs/axe-core/issues/2132)) ([8890063](https://github.com/dequelabs/axe-core/commit/889006397329a35a170f4a3d24c55c3c4fd758fc))
12
+ - **color-contrast:** mark more punctuations for review ([#2126](https://github.com/dequelabs/axe-core/issues/2126)) ([dc98afc](https://github.com/dequelabs/axe-core/commit/dc98afc841c86e4b7b771bbb1171152a151c3e5b))
13
+ - **unicode:** detect supplementary private use area A ([#2102](https://github.com/dequelabs/axe-core/issues/2102)) ([f1739c2](https://github.com/dequelabs/axe-core/commit/f1739c21efdf5cf6fddf425d1c72b056757f3ba1))
14
+ - **definition-list:** Mention <div> is allowed to group content in <dl> ([#2098](https://github.com/dequelabs/axe-core/issues/2098)) ([76b1a9f](https://github.com/dequelabs/axe-core/commit/76b1a9f7f244e43f63351c46d91fc8b27040ba98))
15
+ - **td-headers-attr:** mark as needs review if headers attr is empty ([#2096](https://github.com/dequelabs/axe-core/issues/2096)) ([699b566](https://github.com/dequelabs/axe-core/commit/699b566111cfed2a4ebeade35346a49bcb3546c7))
16
+ - **td-has-headers:** don't fail for empty headers attribute ([#2095](https://github.com/dequelabs/axe-core/issues/2095)) ([7952a37](https://github.com/dequelabs/axe-core/commit/7952a377b960c2403c8d4758a9f35ebe525549fe))
17
+ - **th-has-data-cells:** fail when data cell points to a different header ([#2094](https://github.com/dequelabs/axe-core/issues/2094)) ([d3bd416](https://github.com/dequelabs/axe-core/commit/d3bd416a3df7324231f17ff9e1e20dc6342c7aa5))
18
+ - **has-lang:** update message to indicate that xml:lang is not valid on HTML pages ([#2093](https://github.com/dequelabs/axe-core/issues/2093)) ([c3a7de2](https://github.com/dequelabs/axe-core/commit/c3a7de206baf77c0b25c8c095119393b1dc85f0f))
19
+ - **page-no-duplicate-contentinfo:** do not fail when first element is inside landmark ([#2092](https://github.com/dequelabs/axe-core/issues/2092)) ([eca7e05](https://github.com/dequelabs/axe-core/commit/eca7e05cc6ff750855bcb219833967a9d7087679))
20
+
5
21
  ### [3.5.2](https://github.com/dequelabs/axe-core/compare/v3.5.1...v3.5.2) (2020-03-06)
6
22
 
7
23
  ### Bug Fixes
@@ -50,15 +50,16 @@ Now include the javascript file in each of your iframes in your fixtures or test
50
50
  Now insert calls at each point in your tests where a new piece of UI becomes visible or exposed:
51
51
 
52
52
  ```js
53
- axe.run()
54
- .then(results => {
55
- if (results.violations.length) {
56
- throw new Error('Accessibility issues found')
57
- }
58
- })
59
- .catch(err => {
60
- console.error('Something bad happened:', err.message)
61
- })
53
+ axe
54
+ .run()
55
+ .then(results => {
56
+ if (results.violations.length) {
57
+ throw new Error('Accessibility issues found');
58
+ }
59
+ })
60
+ .catch(err => {
61
+ console.error('Something bad happened:', err.message);
62
+ });
62
63
  ```
63
64
 
64
65
  ## Supported Browsers
@@ -1,4 +1,4 @@
1
- /*! axe v3.5.2
1
+ /*! axe v3.5.3
2
2
  * Copyright (c) 2020 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 = '3.5.2';
30
+ axe.version = '3.5.3';
31
31
  if (typeof define === 'function' && define.amd) {
32
32
  define('axe-core', [], function() {
33
33
  'use strict';
@@ -13173,6 +13173,7 @@
13173
13173
  error: error,
13174
13174
  _respondable: true,
13175
13175
  _source: _getSource(),
13176
+ _axeuuid: axe._uuid,
13176
13177
  _keepalive: keepalive
13177
13178
  };
13178
13179
  var axeRespondables = axe._cache.get('axeRespondables');
@@ -13240,12 +13241,12 @@
13240
13241
  if (typeof window.addEventListener === 'function') {
13241
13242
  window.addEventListener('message', function(e) {
13242
13243
  var data = parseMessage(e.data);
13243
- if (!data) {
13244
+ if (!data || !data._axeuuid) {
13244
13245
  return;
13245
13246
  }
13246
13247
  var uuid = data.uuid;
13247
13248
  var axeRespondables = axe._cache.get('axeRespondables') || {};
13248
- if (axeRespondables[uuid] && data.topic && e.source !== window) {
13249
+ if (axeRespondables[uuid] && data._axeuuid === axe._uuid) {
13249
13250
  return;
13250
13251
  }
13251
13252
  var keepalive = data._keepalive;
@@ -13561,6 +13562,7 @@
13561
13562
  uuid.parse = parse;
13562
13563
  uuid.unparse = unparse;
13563
13564
  uuid.BufferClass = BufferClass;
13565
+ axe._uuid = v1();
13564
13566
  })(window);
13565
13567
  'use strict';
13566
13568
  axe.utils.validInputTypes = function validInputTypes() {
@@ -13768,7 +13770,7 @@
13768
13770
  },
13769
13771
  'definition-list': {
13770
13772
  description: 'Ensures <dl> elements are structured correctly',
13771
- help: '<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script> or <template> elements'
13773
+ help: '<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements'
13772
13774
  },
13773
13775
  dlitem: {
13774
13776
  description: 'Ensures <dt> and <dd> elements are contained by a <dl>',
@@ -14318,8 +14320,8 @@
14318
14320
  'header-present': {
14319
14321
  impact: 'serious',
14320
14322
  messages: {
14321
- pass: 'Page has a header',
14322
- fail: 'Page does not have a header'
14323
+ pass: 'Page has a heading',
14324
+ fail: 'Page does not have a heading'
14323
14325
  }
14324
14326
  },
14325
14327
  landmark: {
@@ -14487,7 +14489,10 @@
14487
14489
  impact: 'serious',
14488
14490
  messages: {
14489
14491
  pass: 'The <html> element has a lang attribute',
14490
- fail: 'The <html> element does not have a lang attribute'
14492
+ fail: {
14493
+ noXHTML: 'The xml:lang attribute is not valid on HTML pages, use the lang attribute.',
14494
+ noLang: 'The <html> element does not have a lang attribute'
14495
+ }
14491
14496
  }
14492
14497
  },
14493
14498
  'valid-lang': {
@@ -14828,6 +14833,7 @@
14828
14833
  impact: 'serious',
14829
14834
  messages: {
14830
14835
  pass: 'The headers attribute is exclusively used to refer to other cells in the table',
14836
+ incomplete: 'The headers attribute is empty',
14831
14837
  fail: 'The headers attribute is not exclusively used to refer to other cells in the table'
14832
14838
  }
14833
14839
  },
@@ -15657,7 +15663,7 @@
15657
15663
  var type = node.getAttribute('type').toLowerCase();
15658
15664
  return [ 'hidden', 'image', 'button', 'submit', 'reset' ].includes(type) === false;
15659
15665
  },
15660
- tags: [ 'cat.forms', 'wcag2a', 'wcag332', 'wcag131', 'section508', 'section508.22.n' ],
15666
+ tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n' ],
15661
15667
  all: [],
15662
15668
  any: [ 'aria-label', 'aria-labelledby', 'implicit-label', 'explicit-label', 'non-empty-title' ],
15663
15669
  none: [ 'help-same-as-label', 'hidden-explicit-label' ]
@@ -17213,17 +17219,19 @@
17213
17219
  }
17214
17220
  axe._cache.set(key, true);
17215
17221
  var elms = axe.utils.querySelectorAllFilter(axe._tree[0], options.selector, function(elm) {
17216
- return elm !== virtualNode && axe.commons.dom.isVisible(elm.actualNode);
17222
+ return axe.commons.dom.isVisible(elm.actualNode);
17217
17223
  });
17218
17224
  if (typeof options.nativeScopeFilter === 'string') {
17219
17225
  elms = elms.filter(function(elm) {
17220
17226
  return elm.actualNode.hasAttribute('role') || !axe.commons.dom.findUpVirtual(elm, options.nativeScopeFilter);
17221
17227
  });
17222
17228
  }
17223
- this.relatedNodes(elms.map(function(elm) {
17229
+ this.relatedNodes(elms.filter(function(elm) {
17230
+ return elm !== virtualNode;
17231
+ }).map(function(elm) {
17224
17232
  return elm.actualNode;
17225
17233
  }));
17226
- return elms.length === 0;
17234
+ return elms.length <= 1;
17227
17235
  },
17228
17236
  after: function after(results, options) {
17229
17237
  return results.filter(function(checkResult) {
@@ -17247,17 +17255,19 @@
17247
17255
  }
17248
17256
  axe._cache.set(key, true);
17249
17257
  var elms = axe.utils.querySelectorAllFilter(axe._tree[0], options.selector, function(elm) {
17250
- return elm !== virtualNode && axe.commons.dom.isVisible(elm.actualNode);
17258
+ return axe.commons.dom.isVisible(elm.actualNode);
17251
17259
  });
17252
17260
  if (typeof options.nativeScopeFilter === 'string') {
17253
17261
  elms = elms.filter(function(elm) {
17254
17262
  return elm.actualNode.hasAttribute('role') || !axe.commons.dom.findUpVirtual(elm, options.nativeScopeFilter);
17255
17263
  });
17256
17264
  }
17257
- this.relatedNodes(elms.map(function(elm) {
17265
+ this.relatedNodes(elms.filter(function(elm) {
17266
+ return elm !== virtualNode;
17267
+ }).map(function(elm) {
17258
17268
  return elm.actualNode;
17259
17269
  }));
17260
- return elms.length === 0;
17270
+ return elms.length <= 1;
17261
17271
  },
17262
17272
  after: function after(results, options) {
17263
17273
  return results.filter(function(checkResult) {
@@ -17281,17 +17291,19 @@
17281
17291
  }
17282
17292
  axe._cache.set(key, true);
17283
17293
  var elms = axe.utils.querySelectorAllFilter(axe._tree[0], options.selector, function(elm) {
17284
- return elm !== virtualNode && axe.commons.dom.isVisible(elm.actualNode);
17294
+ return axe.commons.dom.isVisible(elm.actualNode);
17285
17295
  });
17286
17296
  if (typeof options.nativeScopeFilter === 'string') {
17287
17297
  elms = elms.filter(function(elm) {
17288
17298
  return elm.actualNode.hasAttribute('role') || !axe.commons.dom.findUpVirtual(elm, options.nativeScopeFilter);
17289
17299
  });
17290
17300
  }
17291
- this.relatedNodes(elms.map(function(elm) {
17301
+ this.relatedNodes(elms.filter(function(elm) {
17302
+ return elm !== virtualNode;
17303
+ }).map(function(elm) {
17292
17304
  return elm.actualNode;
17293
17305
  }));
17294
- return elms.length === 0;
17306
+ return elms.length <= 1;
17295
17307
  },
17296
17308
  after: function after(results, options) {
17297
17309
  return results.filter(function(checkResult) {
@@ -17516,10 +17528,19 @@
17516
17528
  var isXHTML = axe.utils.isXHTML;
17517
17529
  var langValue = (node.getAttribute('lang') || '').trim();
17518
17530
  var xmlLangValue = (node.getAttribute('xml:lang') || '').trim();
17519
- if (!langValue && !isXHTML(document)) {
17531
+ if (!langValue && xmlLangValue && !isXHTML(document)) {
17532
+ this.data({
17533
+ messageKey: 'noXHTML'
17534
+ });
17535
+ return false;
17536
+ }
17537
+ if (!(langValue || xmlLangValue)) {
17538
+ this.data({
17539
+ messageKey: 'noLang'
17540
+ });
17520
17541
  return false;
17521
17542
  }
17522
- return !!(langValue || xmlLangValue);
17543
+ return true;
17523
17544
  }
17524
17545
  }, {
17525
17546
  id: 'valid-lang',
@@ -17974,15 +17995,28 @@
17974
17995
  }, {
17975
17996
  id: 'meta-viewport-large',
17976
17997
  evaluate: function evaluate(node, options, virtualNode, context) {
17977
- options = options || {};
17978
- var params, content = node.getAttribute('content') || '', parsedParams = content.split(/[;,]/), result = {}, minimum = options.scaleMinimum || 2, lowerBound = options.lowerBound || false;
17979
- for (var i = 0, l = parsedParams.length; i < l; i++) {
17980
- params = parsedParams[i].split('=');
17981
- var key = params.shift().toLowerCase();
17982
- if (key && params.length) {
17983
- result[key.trim()] = params.shift().trim().toLowerCase();
17984
- }
17998
+ var _ref17 = options || {}, _ref17$scaleMinimum = _ref17.scaleMinimum, scaleMinimum = _ref17$scaleMinimum === void 0 ? 2 : _ref17$scaleMinimum, _ref17$lowerBound = _ref17.lowerBound, lowerBound = _ref17$lowerBound === void 0 ? false : _ref17$lowerBound;
17999
+ var content = node.getAttribute('content') || '';
18000
+ if (!content) {
18001
+ return true;
17985
18002
  }
18003
+ var result = content.split(/[;,]/).reduce(function(out, item) {
18004
+ var contentValue = item.trim();
18005
+ if (!contentValue) {
18006
+ return out;
18007
+ }
18008
+ var _contentValue$split = contentValue.split('='), _contentValue$split2 = _slicedToArray(_contentValue$split, 2), key = _contentValue$split2[0], value = _contentValue$split2[1];
18009
+ var curatedKey = key.toLowerCase().trim();
18010
+ var curatedValue = value.toLowerCase().trim();
18011
+ if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {
18012
+ curatedValue = 1;
18013
+ }
18014
+ if (curatedKey === 'maximum-scale' && parseFloat(curatedValue) < 0) {
18015
+ return out;
18016
+ }
18017
+ out[curatedKey] = curatedValue;
18018
+ return out;
18019
+ }, {});
17986
18020
  if (lowerBound && result['maximum-scale'] && parseFloat(result['maximum-scale']) < lowerBound) {
17987
18021
  return true;
17988
18022
  }
@@ -17990,7 +18024,7 @@
17990
18024
  this.data('user-scalable=no');
17991
18025
  return false;
17992
18026
  }
17993
- if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < minimum) {
18027
+ if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < scaleMinimum) {
17994
18028
  this.data('maximum-scale');
17995
18029
  return false;
17996
18030
  }
@@ -18003,15 +18037,28 @@
18003
18037
  }, {
18004
18038
  id: 'meta-viewport',
18005
18039
  evaluate: function evaluate(node, options, virtualNode, context) {
18006
- options = options || {};
18007
- var params, content = node.getAttribute('content') || '', parsedParams = content.split(/[;,]/), result = {}, minimum = options.scaleMinimum || 2, lowerBound = options.lowerBound || false;
18008
- for (var i = 0, l = parsedParams.length; i < l; i++) {
18009
- params = parsedParams[i].split('=');
18010
- var key = params.shift().toLowerCase();
18011
- if (key && params.length) {
18012
- result[key.trim()] = params.shift().trim().toLowerCase();
18013
- }
18040
+ var _ref18 = options || {}, _ref18$scaleMinimum = _ref18.scaleMinimum, scaleMinimum = _ref18$scaleMinimum === void 0 ? 2 : _ref18$scaleMinimum, _ref18$lowerBound = _ref18.lowerBound, lowerBound = _ref18$lowerBound === void 0 ? false : _ref18$lowerBound;
18041
+ var content = node.getAttribute('content') || '';
18042
+ if (!content) {
18043
+ return true;
18014
18044
  }
18045
+ var result = content.split(/[;,]/).reduce(function(out, item) {
18046
+ var contentValue = item.trim();
18047
+ if (!contentValue) {
18048
+ return out;
18049
+ }
18050
+ var _contentValue$split3 = contentValue.split('='), _contentValue$split4 = _slicedToArray(_contentValue$split3, 2), key = _contentValue$split4[0], value = _contentValue$split4[1];
18051
+ var curatedKey = key.toLowerCase().trim();
18052
+ var curatedValue = value.toLowerCase().trim();
18053
+ if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {
18054
+ curatedValue = 1;
18055
+ }
18056
+ if (curatedKey === 'maximum-scale' && parseFloat(curatedValue) < 0) {
18057
+ return out;
18058
+ }
18059
+ out[curatedKey] = curatedValue;
18060
+ return out;
18061
+ }, {});
18015
18062
  if (lowerBound && result['maximum-scale'] && parseFloat(result['maximum-scale']) < lowerBound) {
18016
18063
  return true;
18017
18064
  }
@@ -18019,7 +18066,7 @@
18019
18066
  this.data('user-scalable=no');
18020
18067
  return false;
18021
18068
  }
18022
- if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < minimum) {
18069
+ if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < scaleMinimum) {
18023
18070
  this.data('maximum-scale');
18024
18071
  return false;
18025
18072
  }
@@ -18086,8 +18133,8 @@
18086
18133
  if (results.length < 2) {
18087
18134
  return results;
18088
18135
  }
18089
- var incompleteResults = results.filter(function(_ref17) {
18090
- var result = _ref17.result;
18136
+ var incompleteResults = results.filter(function(_ref19) {
18137
+ var result = _ref19.result;
18091
18138
  return result !== undefined;
18092
18139
  });
18093
18140
  var uniqueResults = [];
@@ -18099,12 +18146,12 @@
18099
18146
  if (nameMap[name]) {
18100
18147
  return 'continue';
18101
18148
  }
18102
- var sameNameResults = incompleteResults.filter(function(_ref18, resultNum) {
18103
- var data = _ref18.data;
18149
+ var sameNameResults = incompleteResults.filter(function(_ref20, resultNum) {
18150
+ var data = _ref20.data;
18104
18151
  return data.name === name && resultNum !== index;
18105
18152
  });
18106
- var isSameUrl = sameNameResults.every(function(_ref19) {
18107
- var data = _ref19.data;
18153
+ var isSameUrl = sameNameResults.every(function(_ref21) {
18154
+ var data = _ref21.data;
18108
18155
  return isIdenticalObject(data.urlProps, urlProps);
18109
18156
  });
18110
18157
  if (sameNameResults.length && !isSameUrl) {
@@ -18305,8 +18352,8 @@
18305
18352
  } else if (node !== document.body && dom.hasContent(node, true)) {
18306
18353
  return [ virtualNode ];
18307
18354
  } else {
18308
- return virtualNode.children.filter(function(_ref20) {
18309
- var actualNode = _ref20.actualNode;
18355
+ return virtualNode.children.filter(function(_ref22) {
18356
+ var actualNode = _ref22.actualNode;
18310
18357
  return actualNode.nodeType === 1;
18311
18358
  }).map(findRegionlessElms).reduce(function(a, b) {
18312
18359
  return a.concat(b);
@@ -18549,8 +18596,8 @@
18549
18596
  }, {
18550
18597
  id: 'svg-non-empty-title',
18551
18598
  evaluate: function evaluate(node, options, virtualNode, context) {
18552
- var titleNode = virtualNode.children.find(function(_ref21) {
18553
- var props = _ref21.props;
18599
+ var titleNode = virtualNode.children.find(function(_ref23) {
18600
+ var props = _ref23.props;
18554
18601
  return props.nodeName === 'title';
18555
18602
  });
18556
18603
  return !!titleNode && titleNode.actualNode.textContent.trim() !== '';
@@ -18647,9 +18694,11 @@
18647
18694
  id: 'td-headers-attr',
18648
18695
  evaluate: function evaluate(node, options, virtualNode, context) {
18649
18696
  var cells = [];
18650
- for (var rowIndex = 0, rowLength = node.rows.length; rowIndex < rowLength; rowIndex++) {
18697
+ var reviewCells = [];
18698
+ var badCells = [];
18699
+ for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {
18651
18700
  var row = node.rows[rowIndex];
18652
- for (var cellIndex = 0, cellLength = row.cells.length; cellIndex < cellLength; cellIndex++) {
18701
+ for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {
18653
18702
  cells.push(row.cells[cellIndex]);
18654
18703
  }
18655
18704
  }
@@ -18659,34 +18708,38 @@
18659
18708
  }
18660
18709
  return ids;
18661
18710
  }, []);
18662
- var badCells = cells.reduce(function(badCells, cell) {
18663
- var isSelf, notOfTable;
18664
- var headers = (cell.getAttribute('headers') || '').split(/\s/).reduce(function(headers, header) {
18665
- header = header.trim();
18666
- if (header) {
18667
- headers.push(header);
18668
- }
18669
- return headers;
18670
- }, []);
18711
+ cells.forEach(function(cell) {
18712
+ var isSelf = false;
18713
+ var notOfTable = false;
18714
+ if (!cell.hasAttribute('headers')) {
18715
+ return;
18716
+ }
18717
+ var headersAttr = cell.getAttribute('headers').trim();
18718
+ if (!headersAttr) {
18719
+ return reviewCells.push(cell);
18720
+ }
18721
+ var headers = axe.utils.tokenList(headersAttr);
18671
18722
  if (headers.length !== 0) {
18672
18723
  if (cell.getAttribute('id')) {
18673
18724
  isSelf = headers.indexOf(cell.getAttribute('id').trim()) !== -1;
18674
18725
  }
18675
- notOfTable = headers.reduce(function(fail, header) {
18676
- return fail || ids.indexOf(header) === -1;
18677
- }, false);
18726
+ notOfTable = headers.some(function(header) {
18727
+ return !ids.includes(header);
18728
+ });
18678
18729
  if (isSelf || notOfTable) {
18679
18730
  badCells.push(cell);
18680
18731
  }
18681
18732
  }
18682
- return badCells;
18683
- }, []);
18733
+ });
18684
18734
  if (badCells.length > 0) {
18685
18735
  this.relatedNodes(badCells);
18686
18736
  return false;
18687
- } else {
18688
- return true;
18689
18737
  }
18738
+ if (reviewCells.length) {
18739
+ this.relatedNodes(reviewCells);
18740
+ return undefined;
18741
+ }
18742
+ return true;
18690
18743
  }
18691
18744
  }, {
18692
18745
  id: 'th-has-data-cells',
@@ -18721,12 +18774,12 @@
18721
18774
  var hasCell = false;
18722
18775
  if (tableUtils.isColumnHeader(header)) {
18723
18776
  hasCell = tableUtils.traverse('down', pos, tableGrid).find(function(cell) {
18724
- return !tableUtils.isColumnHeader(cell);
18777
+ return !tableUtils.isColumnHeader(cell) && tableUtils.getHeaders(cell, tableGrid).includes(header);
18725
18778
  });
18726
18779
  }
18727
18780
  if (!hasCell && tableUtils.isRowHeader(header)) {
18728
18781
  hasCell = tableUtils.traverse('right', pos, tableGrid).find(function(cell) {
18729
- return !tableUtils.isRowHeader(cell);
18782
+ return !tableUtils.isRowHeader(cell) && tableUtils.getHeaders(cell, tableGrid).includes(header);
18730
18783
  });
18731
18784
  }
18732
18785
  if (!hasCell) {
@@ -20497,8 +20550,8 @@
20497
20550
  nodeName: [ 'abbr', 'address', 'canvas', 'div', 'p', 'pre', 'blockquote', 'ins', 'del', 'output', 'span', 'table', 'tbody', 'thead', 'tfoot', 'td', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'br', 'wbr', 'th', 'tr' ]
20498
20551
  } ];
20499
20552
  lookupTable.evaluateRoleForElement = {
20500
- A: function A(_ref22) {
20501
- var node = _ref22.node, out = _ref22.out;
20553
+ A: function A(_ref24) {
20554
+ var node = _ref24.node, out = _ref24.out;
20502
20555
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
20503
20556
  return true;
20504
20557
  }
@@ -20507,19 +20560,19 @@
20507
20560
  }
20508
20561
  return true;
20509
20562
  },
20510
- AREA: function AREA(_ref23) {
20511
- var node = _ref23.node;
20563
+ AREA: function AREA(_ref25) {
20564
+ var node = _ref25.node;
20512
20565
  return !node.href;
20513
20566
  },
20514
- BUTTON: function BUTTON(_ref24) {
20515
- var node = _ref24.node, role = _ref24.role, out = _ref24.out;
20567
+ BUTTON: function BUTTON(_ref26) {
20568
+ var node = _ref26.node, role = _ref26.role, out = _ref26.out;
20516
20569
  if (node.getAttribute('type') === 'menu') {
20517
20570
  return role === 'menuitem';
20518
20571
  }
20519
20572
  return out;
20520
20573
  },
20521
- IMG: function IMG(_ref25) {
20522
- var node = _ref25.node, role = _ref25.role, out = _ref25.out;
20574
+ IMG: function IMG(_ref27) {
20575
+ var node = _ref27.node, role = _ref27.role, out = _ref27.out;
20523
20576
  switch (node.alt) {
20524
20577
  case null:
20525
20578
  return out;
@@ -20531,8 +20584,8 @@
20531
20584
  return role !== 'presentation' && role !== 'none';
20532
20585
  }
20533
20586
  },
20534
- INPUT: function INPUT(_ref26) {
20535
- var node = _ref26.node, role = _ref26.role, out = _ref26.out;
20587
+ INPUT: function INPUT(_ref28) {
20588
+ var node = _ref28.node, role = _ref28.role, out = _ref28.out;
20536
20589
  switch (node.type) {
20537
20590
  case 'button':
20538
20591
  case 'image':
@@ -20562,32 +20615,32 @@
20562
20615
  return false;
20563
20616
  }
20564
20617
  },
20565
- LI: function LI(_ref27) {
20566
- var node = _ref27.node, out = _ref27.out;
20618
+ LI: function LI(_ref29) {
20619
+ var node = _ref29.node, out = _ref29.out;
20567
20620
  var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
20568
20621
  if (hasImplicitListitemRole) {
20569
20622
  return out;
20570
20623
  }
20571
20624
  return true;
20572
20625
  },
20573
- MENU: function MENU(_ref28) {
20574
- var node = _ref28.node;
20626
+ MENU: function MENU(_ref30) {
20627
+ var node = _ref30.node;
20575
20628
  if (node.getAttribute('type') === 'context') {
20576
20629
  return false;
20577
20630
  }
20578
20631
  return true;
20579
20632
  },
20580
- OPTION: function OPTION(_ref29) {
20581
- var node = _ref29.node;
20633
+ OPTION: function OPTION(_ref31) {
20634
+ var node = _ref31.node;
20582
20635
  var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
20583
20636
  return !withinOptionList;
20584
20637
  },
20585
- SELECT: function SELECT(_ref30) {
20586
- var node = _ref30.node, role = _ref30.role;
20638
+ SELECT: function SELECT(_ref32) {
20639
+ var node = _ref32.node, role = _ref32.role;
20587
20640
  return !node.multiple && node.size <= 1 && role === 'menu';
20588
20641
  },
20589
- SVG: function SVG(_ref31) {
20590
- var node = _ref31.node, out = _ref31.out;
20642
+ SVG: function SVG(_ref33) {
20643
+ var node = _ref33.node, out = _ref33.out;
20591
20644
  if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
20592
20645
  return true;
20593
20646
  }
@@ -20699,8 +20752,8 @@
20699
20752
  });
20700
20753
  return unallowedRoles;
20701
20754
  };
20702
- aria.getOwnedVirtual = function getOwned(_ref32) {
20703
- var actualNode = _ref32.actualNode, children = _ref32.children;
20755
+ aria.getOwnedVirtual = function getOwned(_ref34) {
20756
+ var actualNode = _ref34.actualNode, children = _ref34.children;
20704
20757
  if (!actualNode || !children) {
20705
20758
  throw new Error('getOwnedVirtual requires a virtual node');
20706
20759
  }
@@ -20713,7 +20766,7 @@
20713
20766
  }, children);
20714
20767
  };
20715
20768
  aria.getRole = function getRole(node) {
20716
- var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, noImplicit = _ref33.noImplicit, fallback = _ref33.fallback, abstracts = _ref33.abstracts, dpub = _ref33.dpub;
20769
+ var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, noImplicit = _ref35.noImplicit, fallback = _ref35.fallback, abstracts = _ref35.abstracts, dpub = _ref35.dpub;
20717
20770
  node = node.actualNode || node;
20718
20771
  if (node.nodeType !== 1) {
20719
20772
  return null;
@@ -20799,8 +20852,8 @@
20799
20852
  var roleDefinition = aria.lookupTable.role[role];
20800
20853
  return roleDefinition ? roleDefinition.unsupported : false;
20801
20854
  };
20802
- aria.labelVirtual = function(_ref34) {
20803
- var actualNode = _ref34.actualNode;
20855
+ aria.labelVirtual = function(_ref36) {
20856
+ var actualNode = _ref36.actualNode;
20804
20857
  var ref, candidate;
20805
20858
  if (actualNode.getAttribute('aria-labelledby')) {
20806
20859
  ref = dom.idrefs(actualNode, 'aria-labelledby');
@@ -20826,7 +20879,7 @@
20826
20879
  return aria.labelVirtual(node);
20827
20880
  };
20828
20881
  aria.namedFromContents = function namedFromContents(node) {
20829
- var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref35.strict;
20882
+ var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref37.strict;
20830
20883
  node = node.actualNode || node;
20831
20884
  if (node.nodeType !== 1) {
20832
20885
  return false;
@@ -20842,7 +20895,7 @@
20842
20895
  return !roleDef || [ 'presentation', 'none' ].includes(role);
20843
20896
  };
20844
20897
  aria.isValidRole = function(role) {
20845
- var _ref36 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref36.allowAbstract, _ref36$flagUnsupporte = _ref36.flagUnsupported, flagUnsupported = _ref36$flagUnsupporte === void 0 ? false : _ref36$flagUnsupporte;
20898
+ var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref38.allowAbstract, _ref38$flagUnsupporte = _ref38.flagUnsupported, flagUnsupported = _ref38$flagUnsupporte === void 0 ? false : _ref38$flagUnsupporte;
20846
20899
  var roleDefinition = aria.lookupTable.role[role];
20847
20900
  var isRoleUnsupported = roleDefinition ? roleDefinition.unsupported : false;
20848
20901
  if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
@@ -21330,8 +21383,8 @@
21330
21383
  }
21331
21384
  return finalElements;
21332
21385
  };
21333
- dom.findElmsInContext = function(_ref37) {
21334
- var context = _ref37.context, value = _ref37.value, attr = _ref37.attr, _ref37$elm = _ref37.elm, elm = _ref37$elm === void 0 ? '' : _ref37$elm;
21386
+ dom.findElmsInContext = function(_ref39) {
21387
+ var context = _ref39.context, value = _ref39.value, attr = _ref39.attr, _ref39$elm = _ref39.elm, elm = _ref39$elm === void 0 ? '' : _ref39$elm;
21335
21388
  var root;
21336
21389
  var escapedValue = axe.utils.escapeSelector(value);
21337
21390
  if (context.nodeType === 9 || context.nodeType === 11) {
@@ -21761,8 +21814,8 @@
21761
21814
  var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ];
21762
21815
  function hasChildTextNodes(elm) {
21763
21816
  if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {
21764
- return elm.children.some(function(_ref38) {
21765
- var actualNode = _ref38.actualNode;
21817
+ return elm.children.some(function(_ref40) {
21818
+ var actualNode = _ref40.actualNode;
21766
21819
  return actualNode.nodeType === 3 && actualNode.nodeValue.trim();
21767
21820
  });
21768
21821
  }
@@ -22101,8 +22154,8 @@
22101
22154
  if (!refs || !refs.length) {
22102
22155
  return false;
22103
22156
  }
22104
- return refs.some(function(_ref39) {
22105
- var actualNode = _ref39.actualNode;
22157
+ return refs.some(function(_ref41) {
22158
+ var actualNode = _ref41.actualNode;
22106
22159
  return dom.isVisible(actualNode, screenReader, recursed);
22107
22160
  });
22108
22161
  }
@@ -22491,8 +22544,13 @@
22491
22544
  return headers;
22492
22545
  }
22493
22546
  table.getHeaders = function(cell, tableGrid) {
22494
- if (cell.hasAttribute('headers')) {
22495
- return commons.dom.idrefs(cell, 'headers');
22547
+ if (cell.getAttribute('headers')) {
22548
+ var headers = commons.dom.idrefs(cell, 'headers');
22549
+ if (headers.filter(function(header) {
22550
+ return header;
22551
+ }).length) {
22552
+ return headers;
22553
+ }
22496
22554
  }
22497
22555
  if (!tableGrid) {
22498
22556
  tableGrid = commons.table.toGrid(commons.dom.findUp(cell, 'table'));
@@ -22775,15 +22833,15 @@
22775
22833
  }
22776
22834
  return accName;
22777
22835
  };
22778
- function textNodeContent(_ref40) {
22779
- var actualNode = _ref40.actualNode;
22836
+ function textNodeContent(_ref42) {
22837
+ var actualNode = _ref42.actualNode;
22780
22838
  if (actualNode.nodeType !== 3) {
22781
22839
  return '';
22782
22840
  }
22783
22841
  return actualNode.textContent;
22784
22842
  }
22785
- function shouldIgnoreHidden(_ref41, context) {
22786
- var actualNode = _ref41.actualNode;
22843
+ function shouldIgnoreHidden(_ref43, context) {
22844
+ var actualNode = _ref43.actualNode;
22787
22845
  if (actualNode.nodeType !== 1 || context.includeHidden) {
22788
22846
  return false;
22789
22847
  }
@@ -23011,7 +23069,7 @@
23011
23069
  };
23012
23070
  text.autocomplete = autocomplete;
23013
23071
  text.isValidAutocomplete = function isValidAutocomplete(autocomplete) {
23014
- var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref42$looseTyped = _ref42.looseTyped, looseTyped = _ref42$looseTyped === void 0 ? false : _ref42$looseTyped, _ref42$stateTerms = _ref42.stateTerms, stateTerms = _ref42$stateTerms === void 0 ? [] : _ref42$stateTerms, _ref42$locations = _ref42.locations, locations = _ref42$locations === void 0 ? [] : _ref42$locations, _ref42$qualifiers = _ref42.qualifiers, qualifiers = _ref42$qualifiers === void 0 ? [] : _ref42$qualifiers, _ref42$standaloneTerm = _ref42.standaloneTerms, standaloneTerms = _ref42$standaloneTerm === void 0 ? [] : _ref42$standaloneTerm, _ref42$qualifiedTerms = _ref42.qualifiedTerms, qualifiedTerms = _ref42$qualifiedTerms === void 0 ? [] : _ref42$qualifiedTerms;
23072
+ var _ref44 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref44$looseTyped = _ref44.looseTyped, looseTyped = _ref44$looseTyped === void 0 ? false : _ref44$looseTyped, _ref44$stateTerms = _ref44.stateTerms, stateTerms = _ref44$stateTerms === void 0 ? [] : _ref44$stateTerms, _ref44$locations = _ref44.locations, locations = _ref44$locations === void 0 ? [] : _ref44$locations, _ref44$qualifiers = _ref44.qualifiers, qualifiers = _ref44$qualifiers === void 0 ? [] : _ref44$qualifiers, _ref44$standaloneTerm = _ref44.standaloneTerms, standaloneTerms = _ref44$standaloneTerm === void 0 ? [] : _ref44$standaloneTerm, _ref44$qualifiedTerms = _ref44.qualifiedTerms, qualifiedTerms = _ref44$qualifiedTerms === void 0 ? [] : _ref44$qualifiedTerms;
23015
23073
  autocomplete = autocomplete.toLowerCase().trim();
23016
23074
  stateTerms = stateTerms.concat(text.autocomplete.stateTerms);
23017
23075
  if (stateTerms.includes(autocomplete) || autocomplete === '') {
@@ -23067,8 +23125,8 @@
23067
23125
  return text !== '';
23068
23126
  }).join(' ');
23069
23127
  };
23070
- function getExplicitLabels(_ref43) {
23071
- var actualNode = _ref43.actualNode;
23128
+ function getExplicitLabels(_ref45) {
23129
+ var actualNode = _ref45.actualNode;
23072
23130
  if (!actualNode.id) {
23073
23131
  return [];
23074
23132
  }
@@ -23183,8 +23241,8 @@
23183
23241
  };
23184
23242
  function findTextMethods(virtualNode) {
23185
23243
  var nativeElementType = text.nativeElementType, nativeTextMethods = text.nativeTextMethods;
23186
- var nativeType = nativeElementType.find(function(_ref44) {
23187
- var matches = _ref44.matches;
23244
+ var nativeType = nativeElementType.find(function(_ref46) {
23245
+ var matches = _ref46.matches;
23188
23246
  return axe.commons.matches(virtualNode, matches);
23189
23247
  });
23190
23248
  var methods = nativeType ? [].concat(nativeType.namingMethods) : [];
@@ -23199,12 +23257,12 @@
23199
23257
  button: ''
23200
23258
  };
23201
23259
  text.nativeTextMethods = {
23202
- valueText: function valueText(_ref45) {
23203
- var actualNode = _ref45.actualNode;
23260
+ valueText: function valueText(_ref47) {
23261
+ var actualNode = _ref47.actualNode;
23204
23262
  return actualNode.value || '';
23205
23263
  },
23206
- buttonDefaultText: function buttonDefaultText(_ref46) {
23207
- var actualNode = _ref46.actualNode;
23264
+ buttonDefaultText: function buttonDefaultText(_ref48) {
23265
+ var actualNode = _ref48.actualNode;
23208
23266
  return defaultButtonValues[actualNode.type] || '';
23209
23267
  },
23210
23268
  tableCaptionText: descendantText.bind(null, 'caption'),
@@ -23225,12 +23283,12 @@
23225
23283
  return ' ';
23226
23284
  }
23227
23285
  };
23228
- function attrText(attr, _ref47) {
23229
- var actualNode = _ref47.actualNode;
23286
+ function attrText(attr, _ref49) {
23287
+ var actualNode = _ref49.actualNode;
23230
23288
  return actualNode.getAttribute(attr) || '';
23231
23289
  }
23232
- function descendantText(nodeName, _ref48, context) {
23233
- var actualNode = _ref48.actualNode;
23290
+ function descendantText(nodeName, _ref50, context) {
23291
+ var actualNode = _ref50.actualNode;
23234
23292
  nodeName = nodeName.toLowerCase();
23235
23293
  var nodeNames = [ nodeName, actualNode.nodeName.toLowerCase() ].join(',');
23236
23294
  var candidate = actualNode.querySelector(nodeNames);
@@ -23296,7 +23354,7 @@
23296
23354
  return axe.imports.emojiRegexText().test(str);
23297
23355
  }
23298
23356
  if (nonBmp) {
23299
- return getUnicodeNonBmpRegExp().test(str);
23357
+ return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str);
23300
23358
  }
23301
23359
  if (punctuations) {
23302
23360
  return getPunctuationRegExp().test(str);
@@ -23321,10 +23379,10 @@
23321
23379
  return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
23322
23380
  }
23323
23381
  function getPunctuationRegExp() {
23324
- return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g;
23382
+ return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
23325
23383
  }
23326
23384
  function getSupplementaryPrivateUseRegExp() {
23327
- return /[\uDB80-\uDBBF][\uDC00-\uDFFD]/g;
23385
+ return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
23328
23386
  }
23329
23387
  text.unsupported = {
23330
23388
  accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ]