- commit
- edaaaf7545194c210b6d38f3f8107cdc3b8bbc89
- parent
- 4c6c30b19a072c9147fb3405a22da80c62b307d6
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2018-12-28 10:42
update dependencies
Diffstat
| M | babel.js | 6151 | +++++++++++++++++++++++++++++++++++++++++++++++-------------- |
| M | package.json | 2 | +- |
2 files changed, 4769 insertions, 1384 deletions
diff --git a/babel.js b/babel.js
@@ -1,4 +1,190 @@1 -1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){-1 1 (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ -1 2 // shim for using process in browser -1 3 var process = module.exports = {}; -1 4 -1 5 // cached from whatever global is present so that test runners that stub it -1 6 // don't break things. But we need to wrap it in a try catch in case it is -1 7 // wrapped in strict mode code which doesn't define any globals. It's inside a -1 8 // function because try/catches deoptimize in certain engines. -1 9 -1 10 var cachedSetTimeout; -1 11 var cachedClearTimeout; -1 12 -1 13 function defaultSetTimout() { -1 14 throw new Error('setTimeout has not been defined'); -1 15 } -1 16 function defaultClearTimeout () { -1 17 throw new Error('clearTimeout has not been defined'); -1 18 } -1 19 (function () { -1 20 try { -1 21 if (typeof setTimeout === 'function') { -1 22 cachedSetTimeout = setTimeout; -1 23 } else { -1 24 cachedSetTimeout = defaultSetTimout; -1 25 } -1 26 } catch (e) { -1 27 cachedSetTimeout = defaultSetTimout; -1 28 } -1 29 try { -1 30 if (typeof clearTimeout === 'function') { -1 31 cachedClearTimeout = clearTimeout; -1 32 } else { -1 33 cachedClearTimeout = defaultClearTimeout; -1 34 } -1 35 } catch (e) { -1 36 cachedClearTimeout = defaultClearTimeout; -1 37 } -1 38 } ()) -1 39 function runTimeout(fun) { -1 40 if (cachedSetTimeout === setTimeout) { -1 41 //normal enviroments in sane situations -1 42 return setTimeout(fun, 0); -1 43 } -1 44 // if setTimeout wasn't available but was latter defined -1 45 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { -1 46 cachedSetTimeout = setTimeout; -1 47 return setTimeout(fun, 0); -1 48 } -1 49 try { -1 50 // when when somebody has screwed with setTimeout but no I.E. maddness -1 51 return cachedSetTimeout(fun, 0); -1 52 } catch(e){ -1 53 try { -1 54 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally -1 55 return cachedSetTimeout.call(null, fun, 0); -1 56 } catch(e){ -1 57 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error -1 58 return cachedSetTimeout.call(this, fun, 0); -1 59 } -1 60 } -1 61 -1 62 -1 63 } -1 64 function runClearTimeout(marker) { -1 65 if (cachedClearTimeout === clearTimeout) { -1 66 //normal enviroments in sane situations -1 67 return clearTimeout(marker); -1 68 } -1 69 // if clearTimeout wasn't available but was latter defined -1 70 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { -1 71 cachedClearTimeout = clearTimeout; -1 72 return clearTimeout(marker); -1 73 } -1 74 try { -1 75 // when when somebody has screwed with setTimeout but no I.E. maddness -1 76 return cachedClearTimeout(marker); -1 77 } catch (e){ -1 78 try { -1 79 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally -1 80 return cachedClearTimeout.call(null, marker); -1 81 } catch (e){ -1 82 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. -1 83 // Some versions of I.E. have different rules for clearTimeout vs setTimeout -1 84 return cachedClearTimeout.call(this, marker); -1 85 } -1 86 } -1 87 -1 88 -1 89 -1 90 } -1 91 var queue = []; -1 92 var draining = false; -1 93 var currentQueue; -1 94 var queueIndex = -1; -1 95 -1 96 function cleanUpNextTick() { -1 97 if (!draining || !currentQueue) { -1 98 return; -1 99 } -1 100 draining = false; -1 101 if (currentQueue.length) { -1 102 queue = currentQueue.concat(queue); -1 103 } else { -1 104 queueIndex = -1; -1 105 } -1 106 if (queue.length) { -1 107 drainQueue(); -1 108 } -1 109 } -1 110 -1 111 function drainQueue() { -1 112 if (draining) { -1 113 return; -1 114 } -1 115 var timeout = runTimeout(cleanUpNextTick); -1 116 draining = true; -1 117 -1 118 var len = queue.length; -1 119 while(len) { -1 120 currentQueue = queue; -1 121 queue = []; -1 122 while (++queueIndex < len) { -1 123 if (currentQueue) { -1 124 currentQueue[queueIndex].run(); -1 125 } -1 126 } -1 127 queueIndex = -1; -1 128 len = queue.length; -1 129 } -1 130 currentQueue = null; -1 131 draining = false; -1 132 runClearTimeout(timeout); -1 133 } -1 134 -1 135 process.nextTick = function (fun) { -1 136 var args = new Array(arguments.length - 1); -1 137 if (arguments.length > 1) { -1 138 for (var i = 1; i < arguments.length; i++) { -1 139 args[i - 1] = arguments[i]; -1 140 } -1 141 } -1 142 queue.push(new Item(fun, args)); -1 143 if (queue.length === 1 && !draining) { -1 144 runTimeout(drainQueue); -1 145 } -1 146 }; -1 147 -1 148 // v8 likes predictible objects -1 149 function Item(fun, array) { -1 150 this.fun = fun; -1 151 this.array = array; -1 152 } -1 153 Item.prototype.run = function () { -1 154 this.fun.apply(null, this.array); -1 155 }; -1 156 process.title = 'browser'; -1 157 process.browser = true; -1 158 process.env = {}; -1 159 process.argv = []; -1 160 process.version = ''; // empty string to avoid regexp issues -1 161 process.versions = {}; -1 162 -1 163 function noop() {} -1 164 -1 165 process.on = noop; -1 166 process.addListener = noop; -1 167 process.once = noop; -1 168 process.off = noop; -1 169 process.removeListener = noop; -1 170 process.removeAllListeners = noop; -1 171 process.emit = noop; -1 172 process.prependListener = noop; -1 173 process.prependOnceListener = noop; -1 174 -1 175 process.listeners = function (name) { return [] } -1 176 -1 177 process.binding = function (name) { -1 178 throw new Error('process.binding is not supported'); -1 179 }; -1 180 -1 181 process.cwd = function () { return '/' }; -1 182 process.chdir = function (dir) { -1 183 throw new Error('process.chdir is not supported'); -1 184 }; -1 185 process.umask = function() { return 0; }; -1 186 -1 187 },{}],2:[function(require,module,exports){ 2 188 // Copyright 2012 Google Inc. 3 189 // 4 190 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -1281,7 +1467,7 @@ axs.utils.findDescendantsWithRole = function(element, role) { 1281 1467 return result; 1282 1468 }; 1283 14691284 -1 },{}],2:[function(require,module,exports){-1 1470 },{}],3:[function(require,module,exports){ 1285 1471 // Copyright 2013 Google Inc. 1286 1472 // 1287 1473 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -1318,7 +1504,7 @@ axs.browserUtils.matchSelector = function(element, selector) { 1318 1504 return false; 1319 1505 }; 1320 15061321 -1 },{}],3:[function(require,module,exports){-1 1507 },{}],4:[function(require,module,exports){ 1322 1508 // Copyright 2015 Google Inc. 1323 1509 // 1324 1510 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -1860,7 +2046,7 @@ axs.color.YCC_CUBE_FACES_WHITE = [ { p0: axs.color.WHITE_YCC, p1: axs.color.CYAN 1860 2046 { p0: axs.color.WHITE_YCC, p1: axs.color.MAGENTA_YCC, p2: axs.color.YELLOW_YCC }, 1861 2047 { p0: axs.color.WHITE_YCC, p1: axs.color.YELLOW_YCC, p2: axs.color.CYAN_YCC } ]; 1862 20481863 -1 },{}],4:[function(require,module,exports){-1 2049 },{}],5:[function(require,module,exports){ 1864 2050 // Copyright 2012 Google Inc. 1865 2051 // 1866 2052 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -3544,7 +3730,7 @@ axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO = { 3544 3730 }] 3545 3731 }; 3546 37323547 -1 },{}],5:[function(require,module,exports){-1 3733 },{}],6:[function(require,module,exports){ 3548 3734 // Copyright 2015 Google Inc. 3549 3735 // 3550 3736 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -3758,7 +3944,7 @@ axs.dom.composedTreeSearch = function(node, end, callbacks, parentFlags, opt_sha 3758 3944 return found; 3759 3945 }; 3760 39463761 -1 },{}],6:[function(require,module,exports){-1 3947 },{}],7:[function(require,module,exports){ 3762 3948 // Copyright 2012 Google Inc. 3763 3949 // 3764 3950 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -4687,7 +4873,7 @@ axs.properties.getNativelySupportedAttributes = function(element) { 4687 4873 }; 4688 4874 })(); 4689 48754690 -1 },{}],7:[function(require,module,exports){-1 4876 },{}],8:[function(require,module,exports){ 4691 4877 var query = require('./lib/query.js'); 4692 4878 var name = require('./lib/name.js'); 4693 4879 @@ -4703,7 +4889,7 @@ module.exports = { 4703 4889 closest: query.closest, 4704 4890 }; 4705 48914706 -1 },{"./lib/name.js":9,"./lib/query.js":10}],8:[function(require,module,exports){-1 4892 },{"./lib/name.js":10,"./lib/query.js":11}],9:[function(require,module,exports){ 4707 4893 exports.attributes = { 4708 4894 // widget 4709 4895 'autocomplete': 'token', @@ -5046,7 +5232,7 @@ exports.labelable = [ 5046 5232 'textarea', 5047 5233 ]; 5048 52345049 -1 },{}],9:[function(require,module,exports){-1 5235 },{}],10:[function(require,module,exports){ 5050 5236 var constants = require('./constants.js'); 5051 5237 var query = require('./query.js'); 5052 5238 var util = require('./util.js'); @@ -5247,7 +5433,7 @@ module.exports = { 5247 5433 getDescription: getDescription, 5248 5434 }; 5249 54355250 -1 },{"./constants.js":8,"./query.js":10,"./util.js":11}],10:[function(require,module,exports){-1 5436 },{"./constants.js":9,"./query.js":11,"./util.js":12}],11:[function(require,module,exports){ 5251 5437 var constants = require('./constants.js'); 5252 5438 var util = require('./util.js'); 5253 5439 @@ -5406,7 +5592,7 @@ module.exports = { 5406 5592 closest: closest, 5407 5593 }; 5408 55945409 -1 },{"./constants.js":8,"./util.js":11}],11:[function(require,module,exports){-1 5595 },{"./constants.js":9,"./util.js":12}],12:[function(require,module,exports){ 5410 5596 var walkDOM = function(root, fn) { 5411 5597 if (fn(root) === false) { 5412 5598 return false; @@ -5436,7 +5622,19 @@ module.exports = { 5436 5622 searchUp: searchUp, 5437 5623 }; 5438 56245439 -1 },{}],12:[function(require,module,exports){-1 5625 },{}],13:[function(require,module,exports){ -1 5626 (function (process){ -1 5627 /*! aXe v3.1.2 -1 5628 * Copyright (c) 2018 Deque Systems, Inc. -1 5629 * -1 5630 * Your use of this Source Code Form is subject to the terms of the Mozilla Public -1 5631 * License, v. 2.0. If a copy of the MPL was not distributed with this -1 5632 * file, You can obtain one at http://mozilla.org/MPL/2.0/. -1 5633 * -1 5634 * This entire copyright notice must appear in every copy of this file you -1 5635 * distribute or in any file that contains substantial portions of this source -1 5636 * code. -1 5637 */ 5440 5638 (function axeFunction(window) { 5441 5639 var global = window; 5442 5640 var document = window.document; @@ -5447,7 +5645,7 @@ module.exports = { 5447 5645 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; 5448 5646 }; 5449 5647 var axe = axe || {};5450 -1 axe.version = '3.0.3';-1 5648 axe.version = '3.1.2'; 5451 5649 if (typeof define === 'function' && define.amd) { 5452 5650 define('axe-core', [], function() { 5453 5651 'use strict'; @@ -5475,6 +5673,8 @@ module.exports = { 5475 5673 SupportError.prototype = Object.create(Error.prototype); 5476 5674 SupportError.prototype.constructor = SupportError; 5477 5675 'use strict'; -1 5676 axe.imports = {}; -1 5677 'use strict'; 5478 5678 var utils = axe.utils = {}; 5479 5679 'use strict'; 5480 5680 var helpers = {}; @@ -5484,6 +5684,17 @@ module.exports = { 5484 5684 } : function(obj) { 5485 5685 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; 5486 5686 }; -1 5687 var _extends = Object.assign || function(target) { -1 5688 for (var i = 1; i < arguments.length; i++) { -1 5689 var source = arguments[i]; -1 5690 for (var key in source) { -1 5691 if (Object.prototype.hasOwnProperty.call(source, key)) { -1 5692 target[key] = source[key]; -1 5693 } -1 5694 } -1 5695 } -1 5696 return target; -1 5697 }; 5487 5698 function getDefaultConfiguration(audit) { 5488 5699 'use strict'; 5489 5700 var config; @@ -5496,7 +5707,7 @@ module.exports = { 5496 5707 config.reporter = config.reporter || null; 5497 5708 config.rules = config.rules || []; 5498 5709 config.checks = config.checks || [];5499 -1 config.data = Object.assign({-1 5710 config.data = _extends({ 5500 5711 checks: {}, 5501 5712 rules: {} 5502 5713 }, config.data); @@ -5515,7 +5726,104 @@ module.exports = { 5515 5726 this.tagExclude = [ 'experimental' ]; 5516 5727 this.defaultConfig = audit; 5517 5728 this._init(); -1 5729 this._defaultLocale = null; 5518 5730 } -1 5731 Audit.prototype._setDefaultLocale = function() { -1 5732 if (this._defaultLocale) { -1 5733 return; -1 5734 } -1 5735 var locale = { -1 5736 checks: {}, -1 5737 rules: {} -1 5738 }; -1 5739 var checkIDs = Object.keys(this.data.checks); -1 5740 for (var i = 0; i < checkIDs.length; i++) { -1 5741 var id = checkIDs[i]; -1 5742 var check = this.data.checks[id]; -1 5743 var _check$messages = check.messages, pass = _check$messages.pass, fail = _check$messages.fail, incomplete = _check$messages.incomplete; -1 5744 locale.checks[id] = { -1 5745 pass: pass, -1 5746 fail: fail, -1 5747 incomplete: incomplete -1 5748 }; -1 5749 } -1 5750 var ruleIDs = Object.keys(this.data.rules); -1 5751 for (var _i = 0; _i < ruleIDs.length; _i++) { -1 5752 var _id = ruleIDs[_i]; -1 5753 var rule = this.data.rules[_id]; -1 5754 var description = rule.description, help = rule.help; -1 5755 locale.rules[_id] = { -1 5756 description: description, -1 5757 help: help -1 5758 }; -1 5759 } -1 5760 this._defaultLocale = locale; -1 5761 }; -1 5762 Audit.prototype._resetLocale = function() { -1 5763 var defaultLocale = this._defaultLocale; -1 5764 if (!defaultLocale) { -1 5765 return; -1 5766 } -1 5767 this.applyLocale(defaultLocale); -1 5768 }; -1 5769 var mergeCheckLocale = function mergeCheckLocale(a, b) { -1 5770 var pass = b.pass, fail = b.fail; -1 5771 if (typeof pass === 'string') { -1 5772 pass = axe.imports.doT.compile(pass); -1 5773 } -1 5774 if (typeof fail === 'string') { -1 5775 fail = axe.imports.doT.compile(fail); -1 5776 } -1 5777 return _extends({}, a, { -1 5778 messages: { -1 5779 pass: pass || a.messages.pass, -1 5780 fail: fail || a.messages.fail, -1 5781 incomplete: _typeof(a.messages.incomplete) === 'object' ? _extends({}, a.messages.incomplete, b.incomplete) : b.incomplete -1 5782 } -1 5783 }); -1 5784 }; -1 5785 var mergeRuleLocale = function mergeRuleLocale(a, b) { -1 5786 var help = b.help, description = b.description; -1 5787 if (typeof help === 'string') { -1 5788 help = axe.imports.doT.compile(help); -1 5789 } -1 5790 if (typeof description === 'string') { -1 5791 description = axe.imports.doT.compile(description); -1 5792 } -1 5793 return _extends({}, a, { -1 5794 help: help || a.help, -1 5795 description: description || a.description -1 5796 }); -1 5797 }; -1 5798 Audit.prototype._applyCheckLocale = function(checks) { -1 5799 var keys = Object.keys(checks); -1 5800 for (var i = 0; i < keys.length; i++) { -1 5801 var id = keys[i]; -1 5802 if (!this.data.checks[id]) { -1 5803 throw new Error('Locale provided for unknown check: "' + id + '"'); -1 5804 } -1 5805 this.data.checks[id] = mergeCheckLocale(this.data.checks[id], checks[id]); -1 5806 } -1 5807 }; -1 5808 Audit.prototype._applyRuleLocale = function(rules) { -1 5809 var keys = Object.keys(rules); -1 5810 for (var i = 0; i < keys.length; i++) { -1 5811 var id = keys[i]; -1 5812 if (!this.data.rules[id]) { -1 5813 throw new Error('Locale provided for unknown rule: "' + id + '"'); -1 5814 } -1 5815 this.data.rules[id] = mergeRuleLocale(this.data.rules[id], rules[id]); -1 5816 } -1 5817 }; -1 5818 Audit.prototype.applyLocale = function(locale) { -1 5819 this._setDefaultLocale(); -1 5820 if (locale.checks) { -1 5821 this._applyCheckLocale(locale.checks); -1 5822 } -1 5823 if (locale.rules) { -1 5824 this._applyRuleLocale(locale.rules); -1 5825 } -1 5826 }; 5519 5827 Audit.prototype._init = function() { 5520 5828 var audit = getDefaultConfiguration(this.defaultConfig); 5521 5829 axe.commons = commons = audit.commons; @@ -5569,47 +5877,109 @@ module.exports = { 5569 5877 this.checks[spec.id] = new Check(spec); 5570 5878 } 5571 5879 }; -1 5880 function getRulesToRun(rules, context, options) { -1 5881 var base = { -1 5882 now: [], -1 5883 later: [] -1 5884 }; -1 5885 var splitRules = rules.reduce(function(out, rule) { -1 5886 if (!axe.utils.ruleShouldRun(rule, context, options)) { -1 5887 return out; -1 5888 } -1 5889 if (rule.preload) { -1 5890 out.later.push(rule); -1 5891 return out; -1 5892 } -1 5893 out.now.push(rule); -1 5894 return out; -1 5895 }, base); -1 5896 return splitRules; -1 5897 } -1 5898 function getDefferedRule(rule, context, options) { -1 5899 var markStart = void 0; -1 5900 var markEnd = void 0; -1 5901 if (options.performanceTimer) { -1 5902 markStart = 'mark_rule_start_' + rule.id; -1 5903 markEnd = 'mark_rule_end_' + rule.id; -1 5904 axe.utils.performanceTimer.mark(markStart); -1 5905 } -1 5906 return function(resolve, reject) { -1 5907 rule.run(context, options, function(ruleResult) { -1 5908 if (options.performanceTimer) { -1 5909 axe.utils.performanceTimer.mark(markEnd); -1 5910 axe.utils.performanceTimer.measure('rule_' + rule.id, markStart, markEnd); -1 5911 } -1 5912 resolve(ruleResult); -1 5913 }, function(err) { -1 5914 if (!options.debug) { -1 5915 var errResult = Object.assign(new RuleResult(rule), { -1 5916 result: axe.constants.CANTTELL, -1 5917 description: 'An error occured while running this rule', -1 5918 message: err.message, -1 5919 stack: err.stack, -1 5920 error: err -1 5921 }); -1 5922 resolve(errResult); -1 5923 } else { -1 5924 reject(err); -1 5925 } -1 5926 }); -1 5927 }; -1 5928 } 5572 5929 Audit.prototype.run = function(context, options, resolve, reject) { 5573 5930 'use strict'; 5574 5931 this.normalizeOptions(options); 5575 5932 axe._selectCache = [];5576 -1 var q = axe.utils.queue();5577 -1 this.rules.forEach(function(rule) {5578 -1 if (axe.utils.ruleShouldRun(rule, context, options)) {5579 -1 if (options.performanceTimer) {5580 -1 var markEnd = 'mark_rule_end_' + rule.id;5581 -1 var markStart = 'mark_rule_start_' + rule.id;5582 -1 axe.utils.performanceTimer.mark(markStart);5583 -1 }5584 -1 q.defer(function(res, rej) {5585 -1 rule.run(context, options, function(out) {5586 -1 if (options.performanceTimer) {5587 -1 axe.utils.performanceTimer.mark(markEnd);5588 -1 axe.utils.performanceTimer.measure('rule_' + rule.id, markStart, markEnd);5589 -1 }5590 -1 res(out);5591 -1 }, function(err) {5592 -1 if (!options.debug) {5593 -1 var errResult = Object.assign(new RuleResult(rule), {5594 -1 result: axe.constants.CANTTELL,5595 -1 description: 'An error occured while running this rule',5596 -1 message: err.message,5597 -1 stack: err.stack,5598 -1 error: err5599 -1 });5600 -1 res(errResult);5601 -1 } else {5602 -1 rej(err);5603 -1 }5604 -1 });-1 5933 var allRulesToRun = getRulesToRun(this.rules, context, options); -1 5934 var runNowRules = allRulesToRun.now; -1 5935 var runLaterRules = allRulesToRun.later; -1 5936 var nowRulesQueue = axe.utils.queue(); -1 5937 runNowRules.forEach(function(rule) { -1 5938 nowRulesQueue.defer(getDefferedRule(rule, context, options)); -1 5939 }); -1 5940 var preloaderQueue = axe.utils.queue(); -1 5941 if (runLaterRules.length) { -1 5942 preloaderQueue.defer(function(res, rej) { -1 5943 axe.utils.preload(options).then(function(preloadResults) { -1 5944 var assets = preloadResults[0]; -1 5945 res(assets); -1 5946 }).catch(function(err) { -1 5947 console.warn('Couldn\'t load preload assets: ', err); -1 5948 var assets = undefined; -1 5949 res(assets); 5605 5950 }); -1 5951 }); -1 5952 } -1 5953 var queueForNowRulesAndPreloader = axe.utils.queue(); -1 5954 queueForNowRulesAndPreloader.defer(nowRulesQueue); -1 5955 queueForNowRulesAndPreloader.defer(preloaderQueue); -1 5956 queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) { -1 5957 var assetsFromQueue = nowRulesAndPreloaderResults.pop(); -1 5958 if (assetsFromQueue && assetsFromQueue.length) { -1 5959 var assets = assetsFromQueue[0]; -1 5960 if (assets) { -1 5961 context = _extends({}, context, assets); -1 5962 } 5606 5963 }5607 -1 });5608 -1 q.then(function(results) {5609 -1 axe._selectCache = undefined;5610 -1 resolve(results.filter(function(result) {5611 -1 return !!result;5612 -1 }));-1 5964 var nowRulesResults = nowRulesAndPreloaderResults[0]; -1 5965 if (!runLaterRules.length) { -1 5966 axe._selectCache = undefined; -1 5967 resolve(nowRulesResults.filter(function(result) { -1 5968 return !!result; -1 5969 })); -1 5970 return; -1 5971 } -1 5972 var laterRulesQueue = axe.utils.queue(); -1 5973 runLaterRules.forEach(function(rule) { -1 5974 var deferredRule = getDefferedRule(rule, context, options); -1 5975 laterRulesQueue.defer(deferredRule); -1 5976 }); -1 5977 laterRulesQueue.then(function(laterRuleResults) { -1 5978 axe._selectCache = undefined; -1 5979 resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) { -1 5980 return !!result; -1 5981 })); -1 5982 }).catch(reject); 5613 5983 }).catch(reject); 5614 5984 }; 5615 5985 Audit.prototype.after = function(results, options) { @@ -5711,6 +6081,7 @@ module.exports = { 5711 6081 Audit.prototype.resetRulesAndChecks = function() { 5712 6082 'use strict'; 5713 6083 this._init(); -1 6084 this._resetLocale(); 5714 6085 }; 5715 6086 'use strict'; 5716 6087 function CheckResult(check) { @@ -5735,7 +6106,7 @@ module.exports = { 5735 6106 } 5736 6107 } 5737 6108 Check.prototype.enabled = true;5738 -1 Check.prototype.run = function(node, options, resolve, reject) {-1 6109 Check.prototype.run = function(node, options, context, resolve, reject) { 5739 6110 'use strict'; 5740 6111 options = options || {}; 5741 6112 var enabled = options.hasOwnProperty('enabled') ? options.enabled : this.enabled, checkOptions = options.options || this.options; @@ -5744,7 +6115,7 @@ module.exports = { 5744 6115 var checkHelper = axe.utils.checkHelper(checkResult, options, resolve, reject); 5745 6116 var result; 5746 6117 try {5747 -1 result = this.evaluate.call(checkHelper, node.actualNode, checkOptions, node);-1 6118 result = this.evaluate.call(checkHelper, node.actualNode, checkOptions, node, context); 5748 6119 } catch (e) { 5749 6120 reject(e); 5750 6121 return; @@ -5960,6 +6331,7 @@ module.exports = { 5960 6331 this.all = spec.all || []; 5961 6332 this.none = spec.none || []; 5962 6333 this.tags = spec.tags || []; -1 6334 this.preload = spec.preload ? true : false; 5963 6335 if (spec.matches) { 5964 6336 this.matches = createExecutionContext(spec.matches); 5965 6337 } @@ -5978,7 +6350,7 @@ module.exports = { 5978 6350 } 5979 6351 return elements; 5980 6352 };5981 -1 Rule.prototype.runChecks = function(type, node, options, resolve, reject) {-1 6353 Rule.prototype.runChecks = function(type, node, options, context, resolve, reject) { 5982 6354 'use strict'; 5983 6355 var self = this; 5984 6356 var checkQueue = axe.utils.queue(); @@ -5986,7 +6358,7 @@ module.exports = { 5986 6358 var check = self._audit.checks[c.id || c]; 5987 6359 var option = axe.utils.getCheckOption(check, self.id, options); 5988 6360 checkQueue.defer(function(res, rej) {5989 -1 check.run(node, option, res, rej);-1 6361 check.run(node, option, context, res, rej); 5990 6362 }); 5991 6363 }); 5992 6364 checkQueue.then(function(results) { @@ -6024,14 +6396,10 @@ module.exports = { 6024 6396 nodes.forEach(function(node) { 6025 6397 q.defer(function(resolveNode, rejectNode) { 6026 6398 var checkQueue = axe.utils.queue();6027 -1 checkQueue.defer(function(res, rej) {6028 -1 _this.runChecks('any', node, options, res, rej);6029 -1 });6030 -1 checkQueue.defer(function(res, rej) {6031 -1 _this.runChecks('all', node, options, res, rej);6032 -1 });6033 -1 checkQueue.defer(function(res, rej) {6034 -1 _this.runChecks('none', node, options, res, rej);-1 6399 [ 'any', 'all', 'none' ].forEach(function(type) { -1 6400 checkQueue.defer(function(res, rej) { -1 6401 _this.runChecks(type, node, options, context, res, rej); -1 6402 }); 6035 6403 }); 6036 6404 checkQueue.then(function(results) { 6037 6405 if (results.length) { @@ -6194,7 +6562,9 @@ module.exports = { 6194 6562 results: [], 6195 6563 resultGroups: [], 6196 6564 resultGroupMap: {},6197 -1 impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ])-1 6565 impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ]), -1 6566 preloadAssets: Object.freeze([ 'cssom' ]), -1 6567 preloadAssetsTimeout: 1e4 6198 6568 }; 6199 6569 definitions.forEach(function(definition) { 6200 6570 var name = definition.name; @@ -6225,91 +6595,1039 @@ module.exports = { 6225 6595 } : function(obj) { 6226 6596 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; 6227 6597 };6228 -1 axe.log = function() {6229 -1 'use strict';6230 -1 if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) {6231 -1 Function.prototype.apply.call(console.log, console, arguments);6232 -1 }6233 -1 };6234 -1 'use strict';6235 -1 function cleanupPlugins(resolve, reject) {6236 -1 'use strict';6237 -1 resolve = resolve || function() {};6238 -1 reject = reject || axe.log;6239 -1 if (!axe._audit) {6240 -1 throw new Error('No audit configured');6241 -1 }6242 -1 var q = axe.utils.queue();6243 -1 var cleanupErrors = [];6244 -1 Object.keys(axe.plugins).forEach(function(key) {6245 -1 q.defer(function(res) {6246 -1 var rej = function rej(err) {6247 -1 cleanupErrors.push(err);6248 -1 res();-1 6598 axe.imports['axios'] = function() { -1 6599 return function(modules) { -1 6600 var installedModules = {}; -1 6601 function __webpack_require__(moduleId) { -1 6602 if (installedModules[moduleId]) { -1 6603 return installedModules[moduleId].exports; -1 6604 } -1 6605 var module = installedModules[moduleId] = { -1 6606 exports: {}, -1 6607 id: moduleId, -1 6608 loaded: false 6249 6609 };6250 -1 try {6251 -1 axe.plugins[key].cleanup(res, rej);6252 -1 } catch (err) {6253 -1 rej(err);-1 6610 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -1 6611 module.loaded = true; -1 6612 return module.exports; -1 6613 } -1 6614 __webpack_require__.m = modules; -1 6615 __webpack_require__.c = installedModules; -1 6616 __webpack_require__.p = ''; -1 6617 return __webpack_require__(0); -1 6618 }([ function(module, exports, __webpack_require__) { -1 6619 module.exports = __webpack_require__(1); -1 6620 }, function(module, exports, __webpack_require__) { -1 6621 'use strict'; -1 6622 var utils = __webpack_require__(2); -1 6623 var bind = __webpack_require__(3); -1 6624 var Axios = __webpack_require__(5); -1 6625 var defaults = __webpack_require__(6); -1 6626 function createInstance(defaultConfig) { -1 6627 var context = new Axios(defaultConfig); -1 6628 var instance = bind(Axios.prototype.request, context); -1 6629 utils.extend(instance, Axios.prototype, context); -1 6630 utils.extend(instance, context); -1 6631 return instance; -1 6632 } -1 6633 var axios = createInstance(defaults); -1 6634 axios.Axios = Axios; -1 6635 axios.create = function create(instanceConfig) { -1 6636 return createInstance(utils.merge(defaults, instanceConfig)); -1 6637 }; -1 6638 axios.Cancel = __webpack_require__(23); -1 6639 axios.CancelToken = __webpack_require__(24); -1 6640 axios.isCancel = __webpack_require__(20); -1 6641 axios.all = function all(promises) { -1 6642 return Promise.all(promises); -1 6643 }; -1 6644 axios.spread = __webpack_require__(25); -1 6645 module.exports = axios; -1 6646 module.exports.default = axios; -1 6647 }, function(module, exports, __webpack_require__) { -1 6648 'use strict'; -1 6649 var bind = __webpack_require__(3); -1 6650 var isBuffer = __webpack_require__(4); -1 6651 var toString = Object.prototype.toString; -1 6652 function isArray(val) { -1 6653 return toString.call(val) === '[object Array]'; -1 6654 } -1 6655 function isArrayBuffer(val) { -1 6656 return toString.call(val) === '[object ArrayBuffer]'; -1 6657 } -1 6658 function isFormData(val) { -1 6659 return typeof FormData !== 'undefined' && val instanceof FormData; -1 6660 } -1 6661 function isArrayBufferView(val) { -1 6662 var result; -1 6663 if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { -1 6664 result = ArrayBuffer.isView(val); -1 6665 } else { -1 6666 result = val && val.buffer && val.buffer instanceof ArrayBuffer; 6254 6667 }6255 -1 });6256 -1 });6257 -1 var flattenedTree = axe.utils.getFlattenedTree(document.body);6258 -1 axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function(node) {6259 -1 q.defer(function(res, rej) {6260 -1 return axe.utils.sendCommandToFrame(node.actualNode, {6261 -1 command: 'cleanup-plugin'6262 -1 }, res, rej);6263 -1 });6264 -1 });6265 -1 q.then(function(results) {6266 -1 if (cleanupErrors.length === 0) {6267 -1 resolve(results);6268 -1 } else {6269 -1 reject(cleanupErrors);-1 6668 return result; 6270 6669 }6271 -1 }).catch(reject);6272 -1 }6273 -1 axe.cleanup = cleanupPlugins;6274 -1 'use strict';6275 -1 function configureChecksRulesAndBranding(spec) {6276 -1 'use strict';6277 -1 var audit;6278 -1 audit = axe._audit;6279 -1 if (!audit) {6280 -1 throw new Error('No audit configured');6281 -1 }6282 -1 if (spec.reporter && (typeof spec.reporter === 'function' || reporters[spec.reporter])) {6283 -1 audit.reporter = spec.reporter;6284 -1 }6285 -1 if (spec.checks) {6286 -1 spec.checks.forEach(function(check) {6287 -1 audit.addCheck(check);6288 -1 });6289 -1 }6290 -1 var modifiedRules = [];6291 -1 if (spec.rules) {6292 -1 spec.rules.forEach(function(rule) {6293 -1 modifiedRules.push(rule.id);6294 -1 audit.addRule(rule);6295 -1 });6296 -1 }6297 -1 if (spec.disableOtherRules) {6298 -1 audit.rules.forEach(function(rule) {6299 -1 if (modifiedRules.includes(rule.id) === false) {6300 -1 rule.enabled = false;-1 6670 function isString(val) { -1 6671 return typeof val === 'string'; -1 6672 } -1 6673 function isNumber(val) { -1 6674 return typeof val === 'number'; -1 6675 } -1 6676 function isUndefined(val) { -1 6677 return typeof val === 'undefined'; -1 6678 } -1 6679 function isObject(val) { -1 6680 return val !== null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object'; -1 6681 } -1 6682 function isDate(val) { -1 6683 return toString.call(val) === '[object Date]'; -1 6684 } -1 6685 function isFile(val) { -1 6686 return toString.call(val) === '[object File]'; -1 6687 } -1 6688 function isBlob(val) { -1 6689 return toString.call(val) === '[object Blob]'; -1 6690 } -1 6691 function isFunction(val) { -1 6692 return toString.call(val) === '[object Function]'; -1 6693 } -1 6694 function isStream(val) { -1 6695 return isObject(val) && isFunction(val.pipe); -1 6696 } -1 6697 function isURLSearchParams(val) { -1 6698 return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; -1 6699 } -1 6700 function trim(str) { -1 6701 return str.replace(/^\s*/, '').replace(/\s*$/, ''); -1 6702 } -1 6703 function isStandardBrowserEnv() { -1 6704 if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { -1 6705 return false; 6301 6706 }6302 -1 });6303 -1 }6304 -1 if (typeof spec.branding !== 'undefined') {6305 -1 audit.setBranding(spec.branding);6306 -1 } else {6307 -1 audit._constructHelpUrls();6308 -1 }6309 -1 if (spec.tagExclude) {6310 -1 audit.tagExclude = spec.tagExclude;6311 -1 }6312 -1 }-1 6707 return typeof window !== 'undefined' && typeof document !== 'undefined'; -1 6708 } -1 6709 function forEach(obj, fn) { -1 6710 if (obj === null || typeof obj === 'undefined') { -1 6711 return; -1 6712 } -1 6713 if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object') { -1 6714 obj = [ obj ]; -1 6715 } -1 6716 if (isArray(obj)) { -1 6717 for (var i = 0, l = obj.length; i < l; i++) { -1 6718 fn.call(null, obj[i], i, obj); -1 6719 } -1 6720 } else { -1 6721 for (var key in obj) { -1 6722 if (Object.prototype.hasOwnProperty.call(obj, key)) { -1 6723 fn.call(null, obj[key], key, obj); -1 6724 } -1 6725 } -1 6726 } -1 6727 } -1 6728 function merge() { -1 6729 var result = {}; -1 6730 function assignValue(val, key) { -1 6731 if (_typeof(result[key]) === 'object' && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') { -1 6732 result[key] = merge(result[key], val); -1 6733 } else { -1 6734 result[key] = val; -1 6735 } -1 6736 } -1 6737 for (var i = 0, l = arguments.length; i < l; i++) { -1 6738 forEach(arguments[i], assignValue); -1 6739 } -1 6740 return result; -1 6741 } -1 6742 function extend(a, b, thisArg) { -1 6743 forEach(b, function assignValue(val, key) { -1 6744 if (thisArg && typeof val === 'function') { -1 6745 a[key] = bind(val, thisArg); -1 6746 } else { -1 6747 a[key] = val; -1 6748 } -1 6749 }); -1 6750 return a; -1 6751 } -1 6752 module.exports = { -1 6753 isArray: isArray, -1 6754 isArrayBuffer: isArrayBuffer, -1 6755 isBuffer: isBuffer, -1 6756 isFormData: isFormData, -1 6757 isArrayBufferView: isArrayBufferView, -1 6758 isString: isString, -1 6759 isNumber: isNumber, -1 6760 isObject: isObject, -1 6761 isUndefined: isUndefined, -1 6762 isDate: isDate, -1 6763 isFile: isFile, -1 6764 isBlob: isBlob, -1 6765 isFunction: isFunction, -1 6766 isStream: isStream, -1 6767 isURLSearchParams: isURLSearchParams, -1 6768 isStandardBrowserEnv: isStandardBrowserEnv, -1 6769 forEach: forEach, -1 6770 merge: merge, -1 6771 extend: extend, -1 6772 trim: trim -1 6773 }; -1 6774 }, function(module, exports) { -1 6775 'use strict'; -1 6776 module.exports = function bind(fn, thisArg) { -1 6777 return function wrap() { -1 6778 var args = new Array(arguments.length); -1 6779 for (var i = 0; i < args.length; i++) { -1 6780 args[i] = arguments[i]; -1 6781 } -1 6782 return fn.apply(thisArg, args); -1 6783 }; -1 6784 }; -1 6785 }, function(module, exports) { -1 6786 module.exports = function(obj) { -1 6787 return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer); -1 6788 }; -1 6789 function isBuffer(obj) { -1 6790 return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj); -1 6791 } -1 6792 function isSlowBuffer(obj) { -1 6793 return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)); -1 6794 } -1 6795 }, function(module, exports, __webpack_require__) { -1 6796 'use strict'; -1 6797 var defaults = __webpack_require__(6); -1 6798 var utils = __webpack_require__(2); -1 6799 var InterceptorManager = __webpack_require__(17); -1 6800 var dispatchRequest = __webpack_require__(18); -1 6801 function Axios(instanceConfig) { -1 6802 this.defaults = instanceConfig; -1 6803 this.interceptors = { -1 6804 request: new InterceptorManager(), -1 6805 response: new InterceptorManager() -1 6806 }; -1 6807 } -1 6808 Axios.prototype.request = function request(config) { -1 6809 if (typeof config === 'string') { -1 6810 config = utils.merge({ -1 6811 url: arguments[0] -1 6812 }, arguments[1]); -1 6813 } -1 6814 config = utils.merge(defaults, { -1 6815 method: 'get' -1 6816 }, this.defaults, config); -1 6817 config.method = config.method.toLowerCase(); -1 6818 var chain = [ dispatchRequest, undefined ]; -1 6819 var promise = Promise.resolve(config); -1 6820 this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { -1 6821 chain.unshift(interceptor.fulfilled, interceptor.rejected); -1 6822 }); -1 6823 this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { -1 6824 chain.push(interceptor.fulfilled, interceptor.rejected); -1 6825 }); -1 6826 while (chain.length) { -1 6827 promise = promise.then(chain.shift(), chain.shift()); -1 6828 } -1 6829 return promise; -1 6830 }; -1 6831 utils.forEach([ 'delete', 'get', 'head', 'options' ], function forEachMethodNoData(method) { -1 6832 Axios.prototype[method] = function(url, config) { -1 6833 return this.request(utils.merge(config || {}, { -1 6834 method: method, -1 6835 url: url -1 6836 })); -1 6837 }; -1 6838 }); -1 6839 utils.forEach([ 'post', 'put', 'patch' ], function forEachMethodWithData(method) { -1 6840 Axios.prototype[method] = function(url, data, config) { -1 6841 return this.request(utils.merge(config || {}, { -1 6842 method: method, -1 6843 url: url, -1 6844 data: data -1 6845 })); -1 6846 }; -1 6847 }); -1 6848 module.exports = Axios; -1 6849 }, function(module, exports, __webpack_require__) { -1 6850 'use strict'; -1 6851 var utils = __webpack_require__(2); -1 6852 var normalizeHeaderName = __webpack_require__(7); -1 6853 var DEFAULT_CONTENT_TYPE = { -1 6854 'Content-Type': 'application/x-www-form-urlencoded' -1 6855 }; -1 6856 function setContentTypeIfUnset(headers, value) { -1 6857 if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { -1 6858 headers['Content-Type'] = value; -1 6859 } -1 6860 } -1 6861 function getDefaultAdapter() { -1 6862 var adapter; -1 6863 if (typeof XMLHttpRequest !== 'undefined') { -1 6864 adapter = __webpack_require__(8); -1 6865 } else if (typeof process !== 'undefined') { -1 6866 adapter = __webpack_require__(8); -1 6867 } -1 6868 return adapter; -1 6869 } -1 6870 var defaults = { -1 6871 adapter: getDefaultAdapter(), -1 6872 transformRequest: [ function transformRequest(data, headers) { -1 6873 normalizeHeaderName(headers, 'Content-Type'); -1 6874 if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) { -1 6875 return data; -1 6876 } -1 6877 if (utils.isArrayBufferView(data)) { -1 6878 return data.buffer; -1 6879 } -1 6880 if (utils.isURLSearchParams(data)) { -1 6881 setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); -1 6882 return data.toString(); -1 6883 } -1 6884 if (utils.isObject(data)) { -1 6885 setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); -1 6886 return JSON.stringify(data); -1 6887 } -1 6888 return data; -1 6889 } ], -1 6890 transformResponse: [ function transformResponse(data) { -1 6891 if (typeof data === 'string') { -1 6892 try { -1 6893 data = JSON.parse(data); -1 6894 } catch (e) {} -1 6895 } -1 6896 return data; -1 6897 } ], -1 6898 timeout: 0, -1 6899 xsrfCookieName: 'XSRF-TOKEN', -1 6900 xsrfHeaderName: 'X-XSRF-TOKEN', -1 6901 maxContentLength: -1, -1 6902 validateStatus: function validateStatus(status) { -1 6903 return status >= 200 && status < 300; -1 6904 } -1 6905 }; -1 6906 defaults.headers = { -1 6907 common: { -1 6908 Accept: 'application/json, text/plain, */*' -1 6909 } -1 6910 }; -1 6911 utils.forEach([ 'delete', 'get', 'head' ], function forEachMethodNoData(method) { -1 6912 defaults.headers[method] = {}; -1 6913 }); -1 6914 utils.forEach([ 'post', 'put', 'patch' ], function forEachMethodWithData(method) { -1 6915 defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -1 6916 }); -1 6917 module.exports = defaults; -1 6918 }, function(module, exports, __webpack_require__) { -1 6919 'use strict'; -1 6920 var utils = __webpack_require__(2); -1 6921 module.exports = function normalizeHeaderName(headers, normalizedName) { -1 6922 utils.forEach(headers, function processHeader(value, name) { -1 6923 if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { -1 6924 headers[normalizedName] = value; -1 6925 delete headers[name]; -1 6926 } -1 6927 }); -1 6928 }; -1 6929 }, function(module, exports, __webpack_require__) { -1 6930 'use strict'; -1 6931 var utils = __webpack_require__(2); -1 6932 var settle = __webpack_require__(9); -1 6933 var buildURL = __webpack_require__(12); -1 6934 var parseHeaders = __webpack_require__(13); -1 6935 var isURLSameOrigin = __webpack_require__(14); -1 6936 var createError = __webpack_require__(10); -1 6937 var btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || __webpack_require__(15); -1 6938 module.exports = function xhrAdapter(config) { -1 6939 return new Promise(function dispatchXhrRequest(resolve, reject) { -1 6940 var requestData = config.data; -1 6941 var requestHeaders = config.headers; -1 6942 if (utils.isFormData(requestData)) { -1 6943 delete requestHeaders['Content-Type']; -1 6944 } -1 6945 var request = new XMLHttpRequest(); -1 6946 var loadEvent = 'onreadystatechange'; -1 6947 var xDomain = false; -1 6948 if ('production' !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) { -1 6949 request = new window.XDomainRequest(); -1 6950 loadEvent = 'onload'; -1 6951 xDomain = true; -1 6952 request.onprogress = function handleProgress() {}; -1 6953 request.ontimeout = function handleTimeout() {}; -1 6954 } -1 6955 if (config.auth) { -1 6956 var username = config.auth.username || ''; -1 6957 var password = config.auth.password || ''; -1 6958 requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); -1 6959 } -1 6960 request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); -1 6961 request.timeout = config.timeout; -1 6962 request[loadEvent] = function handleLoad() { -1 6963 if (!request || request.readyState !== 4 && !xDomain) { -1 6964 return; -1 6965 } -1 6966 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { -1 6967 return; -1 6968 } -1 6969 var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; -1 6970 var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; -1 6971 var response = { -1 6972 data: responseData, -1 6973 status: request.status === 1223 ? 204 : request.status, -1 6974 statusText: request.status === 1223 ? 'No Content' : request.statusText, -1 6975 headers: responseHeaders, -1 6976 config: config, -1 6977 request: request -1 6978 }; -1 6979 settle(resolve, reject, response); -1 6980 request = null; -1 6981 }; -1 6982 request.onerror = function handleError() { -1 6983 reject(createError('Network Error', config, null, request)); -1 6984 request = null; -1 6985 }; -1 6986 request.ontimeout = function handleTimeout() { -1 6987 reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request)); -1 6988 request = null; -1 6989 }; -1 6990 if (utils.isStandardBrowserEnv()) { -1 6991 var cookies = __webpack_require__(16); -1 6992 var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined; -1 6993 if (xsrfValue) { -1 6994 requestHeaders[config.xsrfHeaderName] = xsrfValue; -1 6995 } -1 6996 } -1 6997 if ('setRequestHeader' in request) { -1 6998 utils.forEach(requestHeaders, function setRequestHeader(val, key) { -1 6999 if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { -1 7000 delete requestHeaders[key]; -1 7001 } else { -1 7002 request.setRequestHeader(key, val); -1 7003 } -1 7004 }); -1 7005 } -1 7006 if (config.withCredentials) { -1 7007 request.withCredentials = true; -1 7008 } -1 7009 if (config.responseType) { -1 7010 try { -1 7011 request.responseType = config.responseType; -1 7012 } catch (e) { -1 7013 if (config.responseType !== 'json') { -1 7014 throw e; -1 7015 } -1 7016 } -1 7017 } -1 7018 if (typeof config.onDownloadProgress === 'function') { -1 7019 request.addEventListener('progress', config.onDownloadProgress); -1 7020 } -1 7021 if (typeof config.onUploadProgress === 'function' && request.upload) { -1 7022 request.upload.addEventListener('progress', config.onUploadProgress); -1 7023 } -1 7024 if (config.cancelToken) { -1 7025 config.cancelToken.promise.then(function onCanceled(cancel) { -1 7026 if (!request) { -1 7027 return; -1 7028 } -1 7029 request.abort(); -1 7030 reject(cancel); -1 7031 request = null; -1 7032 }); -1 7033 } -1 7034 if (requestData === undefined) { -1 7035 requestData = null; -1 7036 } -1 7037 request.send(requestData); -1 7038 }); -1 7039 }; -1 7040 }, function(module, exports, __webpack_require__) { -1 7041 'use strict'; -1 7042 var createError = __webpack_require__(10); -1 7043 module.exports = function settle(resolve, reject, response) { -1 7044 var validateStatus = response.config.validateStatus; -1 7045 if (!response.status || !validateStatus || validateStatus(response.status)) { -1 7046 resolve(response); -1 7047 } else { -1 7048 reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response)); -1 7049 } -1 7050 }; -1 7051 }, function(module, exports, __webpack_require__) { -1 7052 'use strict'; -1 7053 var enhanceError = __webpack_require__(11); -1 7054 module.exports = function createError(message, config, code, request, response) { -1 7055 var error = new Error(message); -1 7056 return enhanceError(error, config, code, request, response); -1 7057 }; -1 7058 }, function(module, exports) { -1 7059 'use strict'; -1 7060 module.exports = function enhanceError(error, config, code, request, response) { -1 7061 error.config = config; -1 7062 if (code) { -1 7063 error.code = code; -1 7064 } -1 7065 error.request = request; -1 7066 error.response = response; -1 7067 return error; -1 7068 }; -1 7069 }, function(module, exports, __webpack_require__) { -1 7070 'use strict'; -1 7071 var utils = __webpack_require__(2); -1 7072 function encode(val) { -1 7073 return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); -1 7074 } -1 7075 module.exports = function buildURL(url, params, paramsSerializer) { -1 7076 if (!params) { -1 7077 return url; -1 7078 } -1 7079 var serializedParams; -1 7080 if (paramsSerializer) { -1 7081 serializedParams = paramsSerializer(params); -1 7082 } else if (utils.isURLSearchParams(params)) { -1 7083 serializedParams = params.toString(); -1 7084 } else { -1 7085 var parts = []; -1 7086 utils.forEach(params, function serialize(val, key) { -1 7087 if (val === null || typeof val === 'undefined') { -1 7088 return; -1 7089 } -1 7090 if (utils.isArray(val)) { -1 7091 key = key + '[]'; -1 7092 } else { -1 7093 val = [ val ]; -1 7094 } -1 7095 utils.forEach(val, function parseValue(v) { -1 7096 if (utils.isDate(v)) { -1 7097 v = v.toISOString(); -1 7098 } else if (utils.isObject(v)) { -1 7099 v = JSON.stringify(v); -1 7100 } -1 7101 parts.push(encode(key) + '=' + encode(v)); -1 7102 }); -1 7103 }); -1 7104 serializedParams = parts.join('&'); -1 7105 } -1 7106 if (serializedParams) { -1 7107 url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; -1 7108 } -1 7109 return url; -1 7110 }; -1 7111 }, function(module, exports, __webpack_require__) { -1 7112 'use strict'; -1 7113 var utils = __webpack_require__(2); -1 7114 var ignoreDuplicateOf = [ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent' ]; -1 7115 module.exports = function parseHeaders(headers) { -1 7116 var parsed = {}; -1 7117 var key; -1 7118 var val; -1 7119 var i; -1 7120 if (!headers) { -1 7121 return parsed; -1 7122 } -1 7123 utils.forEach(headers.split('\n'), function parser(line) { -1 7124 i = line.indexOf(':'); -1 7125 key = utils.trim(line.substr(0, i)).toLowerCase(); -1 7126 val = utils.trim(line.substr(i + 1)); -1 7127 if (key) { -1 7128 if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { -1 7129 return; -1 7130 } -1 7131 if (key === 'set-cookie') { -1 7132 parsed[key] = (parsed[key] ? parsed[key] : []).concat([ val ]); -1 7133 } else { -1 7134 parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; -1 7135 } -1 7136 } -1 7137 }); -1 7138 return parsed; -1 7139 }; -1 7140 }, function(module, exports, __webpack_require__) { -1 7141 'use strict'; -1 7142 var utils = __webpack_require__(2); -1 7143 module.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() { -1 7144 var msie = /(msie|trident)/i.test(navigator.userAgent); -1 7145 var urlParsingNode = document.createElement('a'); -1 7146 var originURL; -1 7147 function resolveURL(url) { -1 7148 var href = url; -1 7149 if (msie) { -1 7150 urlParsingNode.setAttribute('href', href); -1 7151 href = urlParsingNode.href; -1 7152 } -1 7153 urlParsingNode.setAttribute('href', href); -1 7154 return { -1 7155 href: urlParsingNode.href, -1 7156 protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', -1 7157 host: urlParsingNode.host, -1 7158 search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', -1 7159 hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', -1 7160 hostname: urlParsingNode.hostname, -1 7161 port: urlParsingNode.port, -1 7162 pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname -1 7163 }; -1 7164 } -1 7165 originURL = resolveURL(window.location.href); -1 7166 return function isURLSameOrigin(requestURL) { -1 7167 var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL; -1 7168 return parsed.protocol === originURL.protocol && parsed.host === originURL.host; -1 7169 }; -1 7170 }() : function nonStandardBrowserEnv() { -1 7171 return function isURLSameOrigin() { -1 7172 return true; -1 7173 }; -1 7174 }(); -1 7175 }, function(module, exports) { -1 7176 'use strict'; -1 7177 var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; -1 7178 function E() { -1 7179 this.message = 'String contains an invalid character'; -1 7180 } -1 7181 E.prototype = new Error(); -1 7182 E.prototype.code = 5; -1 7183 E.prototype.name = 'InvalidCharacterError'; -1 7184 function btoa(input) { -1 7185 var str = String(input); -1 7186 var output = ''; -1 7187 for (var block, charCode, idx = 0, map = chars; str.charAt(idx | 0) || (map = '=', -1 7188 idx % 1); output += map.charAt(63 & block >> 8 - idx % 1 * 8)) { -1 7189 charCode = str.charCodeAt(idx += 3 / 4); -1 7190 if (charCode > 255) { -1 7191 throw new E(); -1 7192 } -1 7193 block = block << 8 | charCode; -1 7194 } -1 7195 return output; -1 7196 } -1 7197 module.exports = btoa; -1 7198 }, function(module, exports, __webpack_require__) { -1 7199 'use strict'; -1 7200 var utils = __webpack_require__(2); -1 7201 module.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() { -1 7202 return { -1 7203 write: function write(name, value, expires, path, domain, secure) { -1 7204 var cookie = []; -1 7205 cookie.push(name + '=' + encodeURIComponent(value)); -1 7206 if (utils.isNumber(expires)) { -1 7207 cookie.push('expires=' + new Date(expires).toGMTString()); -1 7208 } -1 7209 if (utils.isString(path)) { -1 7210 cookie.push('path=' + path); -1 7211 } -1 7212 if (utils.isString(domain)) { -1 7213 cookie.push('domain=' + domain); -1 7214 } -1 7215 if (secure === true) { -1 7216 cookie.push('secure'); -1 7217 } -1 7218 document.cookie = cookie.join('; '); -1 7219 }, -1 7220 read: function read(name) { -1 7221 var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); -1 7222 return match ? decodeURIComponent(match[3]) : null; -1 7223 }, -1 7224 remove: function remove(name) { -1 7225 this.write(name, '', Date.now() - 864e5); -1 7226 } -1 7227 }; -1 7228 }() : function nonStandardBrowserEnv() { -1 7229 return { -1 7230 write: function write() {}, -1 7231 read: function read() { -1 7232 return null; -1 7233 }, -1 7234 remove: function remove() {} -1 7235 }; -1 7236 }(); -1 7237 }, function(module, exports, __webpack_require__) { -1 7238 'use strict'; -1 7239 var utils = __webpack_require__(2); -1 7240 function InterceptorManager() { -1 7241 this.handlers = []; -1 7242 } -1 7243 InterceptorManager.prototype.use = function use(fulfilled, rejected) { -1 7244 this.handlers.push({ -1 7245 fulfilled: fulfilled, -1 7246 rejected: rejected -1 7247 }); -1 7248 return this.handlers.length - 1; -1 7249 }; -1 7250 InterceptorManager.prototype.eject = function eject(id) { -1 7251 if (this.handlers[id]) { -1 7252 this.handlers[id] = null; -1 7253 } -1 7254 }; -1 7255 InterceptorManager.prototype.forEach = function forEach(fn) { -1 7256 utils.forEach(this.handlers, function forEachHandler(h) { -1 7257 if (h !== null) { -1 7258 fn(h); -1 7259 } -1 7260 }); -1 7261 }; -1 7262 module.exports = InterceptorManager; -1 7263 }, function(module, exports, __webpack_require__) { -1 7264 'use strict'; -1 7265 var utils = __webpack_require__(2); -1 7266 var transformData = __webpack_require__(19); -1 7267 var isCancel = __webpack_require__(20); -1 7268 var defaults = __webpack_require__(6); -1 7269 var isAbsoluteURL = __webpack_require__(21); -1 7270 var combineURLs = __webpack_require__(22); -1 7271 function throwIfCancellationRequested(config) { -1 7272 if (config.cancelToken) { -1 7273 config.cancelToken.throwIfRequested(); -1 7274 } -1 7275 } -1 7276 module.exports = function dispatchRequest(config) { -1 7277 throwIfCancellationRequested(config); -1 7278 if (config.baseURL && !isAbsoluteURL(config.url)) { -1 7279 config.url = combineURLs(config.baseURL, config.url); -1 7280 } -1 7281 config.headers = config.headers || {}; -1 7282 config.data = transformData(config.data, config.headers, config.transformRequest); -1 7283 config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers || {}); -1 7284 utils.forEach([ 'delete', 'get', 'head', 'post', 'put', 'patch', 'common' ], function cleanHeaderConfig(method) { -1 7285 delete config.headers[method]; -1 7286 }); -1 7287 var adapter = config.adapter || defaults.adapter; -1 7288 return adapter(config).then(function onAdapterResolution(response) { -1 7289 throwIfCancellationRequested(config); -1 7290 response.data = transformData(response.data, response.headers, config.transformResponse); -1 7291 return response; -1 7292 }, function onAdapterRejection(reason) { -1 7293 if (!isCancel(reason)) { -1 7294 throwIfCancellationRequested(config); -1 7295 if (reason && reason.response) { -1 7296 reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse); -1 7297 } -1 7298 } -1 7299 return Promise.reject(reason); -1 7300 }); -1 7301 }; -1 7302 }, function(module, exports, __webpack_require__) { -1 7303 'use strict'; -1 7304 var utils = __webpack_require__(2); -1 7305 module.exports = function transformData(data, headers, fns) { -1 7306 utils.forEach(fns, function transform(fn) { -1 7307 data = fn(data, headers); -1 7308 }); -1 7309 return data; -1 7310 }; -1 7311 }, function(module, exports) { -1 7312 'use strict'; -1 7313 module.exports = function isCancel(value) { -1 7314 return !!(value && value.__CANCEL__); -1 7315 }; -1 7316 }, function(module, exports) { -1 7317 'use strict'; -1 7318 module.exports = function isAbsoluteURL(url) { -1 7319 return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); -1 7320 }; -1 7321 }, function(module, exports) { -1 7322 'use strict'; -1 7323 module.exports = function combineURLs(baseURL, relativeURL) { -1 7324 return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; -1 7325 }; -1 7326 }, function(module, exports) { -1 7327 'use strict'; -1 7328 function Cancel(message) { -1 7329 this.message = message; -1 7330 } -1 7331 Cancel.prototype.toString = function toString() { -1 7332 return 'Cancel' + (this.message ? ': ' + this.message : ''); -1 7333 }; -1 7334 Cancel.prototype.__CANCEL__ = true; -1 7335 module.exports = Cancel; -1 7336 }, function(module, exports, __webpack_require__) { -1 7337 'use strict'; -1 7338 var Cancel = __webpack_require__(23); -1 7339 function CancelToken(executor) { -1 7340 if (typeof executor !== 'function') { -1 7341 throw new TypeError('executor must be a function.'); -1 7342 } -1 7343 var resolvePromise; -1 7344 this.promise = new Promise(function promiseExecutor(resolve) { -1 7345 resolvePromise = resolve; -1 7346 }); -1 7347 var token = this; -1 7348 executor(function cancel(message) { -1 7349 if (token.reason) { -1 7350 return; -1 7351 } -1 7352 token.reason = new Cancel(message); -1 7353 resolvePromise(token.reason); -1 7354 }); -1 7355 } -1 7356 CancelToken.prototype.throwIfRequested = function throwIfRequested() { -1 7357 if (this.reason) { -1 7358 throw this.reason; -1 7359 } -1 7360 }; -1 7361 CancelToken.source = function source() { -1 7362 var cancel; -1 7363 var token = new CancelToken(function executor(c) { -1 7364 cancel = c; -1 7365 }); -1 7366 return { -1 7367 token: token, -1 7368 cancel: cancel -1 7369 }; -1 7370 }; -1 7371 module.exports = CancelToken; -1 7372 }, function(module, exports) { -1 7373 'use strict'; -1 7374 module.exports = function spread(callback) { -1 7375 return function wrap(arr) { -1 7376 return callback.apply(null, arr); -1 7377 }; -1 7378 }; -1 7379 } ]); -1 7380 }(); -1 7381 'use strict'; -1 7382 axe.imports['doT'] = function(module, exports, define, require, process) { -1 7383 var global = Function('return this')(); -1 7384 var __old_global__ = global['doT']; -1 7385 (function() { -1 7386 'use strict'; -1 7387 var doT = { -1 7388 name: 'doT', -1 7389 version: '1.1.1', -1 7390 templateSettings: { -1 7391 evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g, -1 7392 interpolate: /\{\{=([\s\S]+?)\}\}/g, -1 7393 encode: /\{\{!([\s\S]+?)\}\}/g, -1 7394 use: /\{\{#([\s\S]+?)\}\}/g, -1 7395 useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g, -1 7396 define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, -1 7397 defineParams: /^\s*([\w$]+):([\s\S]+)/, -1 7398 conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, -1 7399 iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, -1 7400 varname: 'it', -1 7401 strip: true, -1 7402 append: true, -1 7403 selfcontained: false, -1 7404 doNotSkipEncoded: false -1 7405 }, -1 7406 template: undefined, -1 7407 compile: undefined, -1 7408 log: true -1 7409 }, _globals; -1 7410 doT.encodeHTMLSource = function(doNotSkipEncoded) { -1 7411 var encodeHTMLRules = { -1 7412 '&': '&', -1 7413 '<': '<', -1 7414 '>': '>', -1 7415 '"': '"', -1 7416 '\'': ''', -1 7417 '/': '/' -1 7418 }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g; -1 7419 return function(code) { -1 7420 return code ? code.toString().replace(matchHTML, function(m) { -1 7421 return encodeHTMLRules[m] || m; -1 7422 }) : ''; -1 7423 }; -1 7424 }; -1 7425 _globals = function() { -1 7426 return this || (0, eval)('this'); -1 7427 }(); -1 7428 if (typeof module !== 'undefined' && module.exports) { -1 7429 module.exports = doT; -1 7430 } else if (typeof define === 'function' && define.amd) { -1 7431 define(function() { -1 7432 return doT; -1 7433 }); -1 7434 } else { -1 7435 _globals.doT = doT; -1 7436 } -1 7437 var startend = { -1 7438 append: { -1 7439 start: '\'+(', -1 7440 end: ')+\'', -1 7441 startencode: '\'+encodeHTML(' -1 7442 }, -1 7443 split: { -1 7444 start: '\';out+=(', -1 7445 end: ');out+=\'', -1 7446 startencode: '\';out+=encodeHTML(' -1 7447 } -1 7448 }, skip = /$^/; -1 7449 function resolveDefs(c, block, def) { -1 7450 return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function(m, code, assign, value) { -1 7451 if (code.indexOf('def.') === 0) { -1 7452 code = code.substring(4); -1 7453 } -1 7454 if (!(code in def)) { -1 7455 if (assign === ':') { -1 7456 if (c.defineParams) { -1 7457 value.replace(c.defineParams, function(m, param, v) { -1 7458 def[code] = { -1 7459 arg: param, -1 7460 text: v -1 7461 }; -1 7462 }); -1 7463 } -1 7464 if (!(code in def)) { -1 7465 def[code] = value; -1 7466 } -1 7467 } else { -1 7468 new Function('def', 'def[\'' + code + '\']=' + value)(def); -1 7469 } -1 7470 } -1 7471 return ''; -1 7472 }).replace(c.use || skip, function(m, code) { -1 7473 if (c.useParams) { -1 7474 code = code.replace(c.useParams, function(m, s, d, param) { -1 7475 if (def[d] && def[d].arg && param) { -1 7476 var rw = (d + ':' + param).replace(/'|\\/g, '_'); -1 7477 def.__exp = def.__exp || {}; -1 7478 def.__exp[rw] = def[d].text.replace(new RegExp('(^|[^\\w$])' + def[d].arg + '([^\\w$])', 'g'), '$1' + param + '$2'); -1 7479 return s + 'def.__exp[\'' + rw + '\']'; -1 7480 } -1 7481 }); -1 7482 } -1 7483 var v = new Function('def', 'return ' + code)(def); -1 7484 return v ? resolveDefs(c, v, def) : v; -1 7485 }); -1 7486 } -1 7487 function unescape(code) { -1 7488 return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' '); -1 7489 } -1 7490 doT.template = function(tmpl, c, def) { -1 7491 c = c || doT.templateSettings; -1 7492 var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl; -1 7493 str = ('var out=\'' + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str).replace(/'|\\/g, '\\$&').replace(c.interpolate || skip, function(m, code) { -1 7494 return cse.start + unescape(code) + cse.end; -1 7495 }).replace(c.encode || skip, function(m, code) { -1 7496 needhtmlencode = true; -1 7497 return cse.startencode + unescape(code) + cse.end; -1 7498 }).replace(c.conditional || skip, function(m, elsecase, code) { -1 7499 return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\''; -1 7500 }).replace(c.iterate || skip, function(m, iterate, vname, iname) { -1 7501 if (!iterate) { -1 7502 return '\';} } out+=\''; -1 7503 } -1 7504 sid += 1; -1 7505 indv = iname || 'i' + sid; -1 7506 iterate = unescape(iterate); -1 7507 return '\';var arr' + sid + '=' + iterate + ';if(arr' + sid + '){var ' + vname + ',' + indv + '=-1,l' + sid + '=arr' + sid + '.length-1;while(' + indv + '<l' + sid + '){' + vname + '=arr' + sid + '[' + indv + '+=1];out+=\''; -1 7508 }).replace(c.evaluate || skip, function(m, code) { -1 7509 return '\';' + unescape(code) + 'out+=\''; -1 7510 }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, ''); -1 7511 if (needhtmlencode) { -1 7512 if (!c.selfcontained && _globals && !_globals._encodeHTML) { -1 7513 _globals._encodeHTML = doT.encodeHTMLSource(c.doNotSkipEncoded); -1 7514 } -1 7515 str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT.encodeHTMLSource.toString() + '(' + (c.doNotSkipEncoded || '') + '));' + str; -1 7516 } -1 7517 try { -1 7518 return new Function(c.varname, str); -1 7519 } catch (e) { -1 7520 if (typeof console !== 'undefined') { -1 7521 console.log('Could not create a template function: ' + str); -1 7522 } -1 7523 throw e; -1 7524 } -1 7525 }; -1 7526 doT.compile = function(tmpl, def) { -1 7527 return doT.template(tmpl, null, def); -1 7528 }; -1 7529 })(); -1 7530 var lib = global['doT']; -1 7531 delete global['doT']; -1 7532 if (__old_global__) { -1 7533 global['doT'] = __old_global__; -1 7534 } -1 7535 return lib; -1 7536 }(); -1 7537 'use strict'; -1 7538 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) { -1 7539 return typeof obj; -1 7540 } : function(obj) { -1 7541 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; -1 7542 }; -1 7543 axe.log = function() { -1 7544 'use strict'; -1 7545 if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) { -1 7546 Function.prototype.apply.call(console.log, console, arguments); -1 7547 } -1 7548 }; -1 7549 'use strict'; -1 7550 function cleanupPlugins(resolve, reject) { -1 7551 'use strict'; -1 7552 resolve = resolve || function() {}; -1 7553 reject = reject || axe.log; -1 7554 if (!axe._audit) { -1 7555 throw new Error('No audit configured'); -1 7556 } -1 7557 var q = axe.utils.queue(); -1 7558 var cleanupErrors = []; -1 7559 Object.keys(axe.plugins).forEach(function(key) { -1 7560 q.defer(function(res) { -1 7561 var rej = function rej(err) { -1 7562 cleanupErrors.push(err); -1 7563 res(); -1 7564 }; -1 7565 try { -1 7566 axe.plugins[key].cleanup(res, rej); -1 7567 } catch (err) { -1 7568 rej(err); -1 7569 } -1 7570 }); -1 7571 }); -1 7572 var flattenedTree = axe.utils.getFlattenedTree(document.body); -1 7573 axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function(node) { -1 7574 q.defer(function(res, rej) { -1 7575 return axe.utils.sendCommandToFrame(node.actualNode, { -1 7576 command: 'cleanup-plugin' -1 7577 }, res, rej); -1 7578 }); -1 7579 }); -1 7580 q.then(function(results) { -1 7581 if (cleanupErrors.length === 0) { -1 7582 resolve(results); -1 7583 } else { -1 7584 reject(cleanupErrors); -1 7585 } -1 7586 }).catch(reject); -1 7587 } -1 7588 axe.cleanup = cleanupPlugins; -1 7589 'use strict'; -1 7590 function configureChecksRulesAndBranding(spec) { -1 7591 'use strict'; -1 7592 var audit; -1 7593 audit = axe._audit; -1 7594 if (!audit) { -1 7595 throw new Error('No audit configured'); -1 7596 } -1 7597 if (spec.reporter && (typeof spec.reporter === 'function' || reporters[spec.reporter])) { -1 7598 audit.reporter = spec.reporter; -1 7599 } -1 7600 if (spec.checks) { -1 7601 spec.checks.forEach(function(check) { -1 7602 audit.addCheck(check); -1 7603 }); -1 7604 } -1 7605 var modifiedRules = []; -1 7606 if (spec.rules) { -1 7607 spec.rules.forEach(function(rule) { -1 7608 modifiedRules.push(rule.id); -1 7609 audit.addRule(rule); -1 7610 }); -1 7611 } -1 7612 if (spec.disableOtherRules) { -1 7613 audit.rules.forEach(function(rule) { -1 7614 if (modifiedRules.includes(rule.id) === false) { -1 7615 rule.enabled = false; -1 7616 } -1 7617 }); -1 7618 } -1 7619 if (typeof spec.branding !== 'undefined') { -1 7620 audit.setBranding(spec.branding); -1 7621 } else { -1 7622 audit._constructHelpUrls(); -1 7623 } -1 7624 if (spec.tagExclude) { -1 7625 audit.tagExclude = spec.tagExclude; -1 7626 } -1 7627 if (spec.locale) { -1 7628 audit.applyLocale(spec.locale); -1 7629 } -1 7630 } 6313 7631 axe.configure = configureChecksRulesAndBranding; 6314 7632 'use strict'; 6315 7633 axe.getRules = function(tags) { @@ -6581,7 +7899,7 @@ module.exports = { 6581 7899 var p = void 0; 6582 7900 var reject = noop; 6583 7901 var resolve = noop;6584 -1 if (window.Promise && callback === noop) {-1 7902 if (typeof Promise === 'function' && callback === noop) { 6585 7903 p = new Promise(function(_resolve, _reject) { 6586 7904 reject = _reject; 6587 7905 resolve = _resolve; @@ -6829,10 +8147,14 @@ module.exports = { 6829 8147 axe.utils.aggregateChecks = function(nodeResOriginal) { 6830 8148 var nodeResult = Object.assign({}, nodeResOriginal); 6831 8149 anyAllNone(nodeResult, function(check, type) {6832 -1 var i = checkMap.indexOf(check.result);-1 8150 var i = typeof check.result === 'undefined' ? -1 : checkMap.indexOf(check.result); 6833 8151 check.priority = i !== -1 ? i : axe.constants.CANTTELL_PRIO; 6834 8152 if (type === 'none') {6835 -1 check.priority = 4 - check.priority;-1 8153 if (check.priority === axe.constants.PASS_PRIO) { -1 8154 check.priority = axe.constants.FAIL_PRIO; -1 8155 } else if (check.priority === axe.constants.FAIL_PRIO) { -1 8156 check.priority = axe.constants.PASS_PRIO; -1 8157 } 6836 8158 } 6837 8159 }); 6838 8160 var priorities = { @@ -7731,18 +9053,18 @@ module.exports = { 7731 9053 axe.utils.matchesSelector = function() { 7732 9054 'use strict'; 7733 9055 var method;7734 -1 function getMethod(win) {7735 -1 var index, candidate, elProto = win.Element.prototype, candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ], length = candidates.length;-1 9056 function getMethod(node) { -1 9057 var index, candidate, candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ], length = candidates.length; 7736 9058 for (index = 0; index < length; index++) { 7737 9059 candidate = candidates[index];7738 -1 if (elProto[candidate]) {-1 9060 if (node[candidate]) { 7739 9061 return candidate; 7740 9062 } 7741 9063 } 7742 9064 } 7743 9065 return function(node, selector) { 7744 9066 if (!method || !node[method]) {7745 -1 method = getMethod(node.ownerDocument.defaultView);-1 9067 method = getMethod(node); 7746 9068 } 7747 9069 return node[method](selector); 7748 9070 }; @@ -7852,7 +9174,7 @@ module.exports = { 7852 9174 if (nodeName === 'content') { 7853 9175 realArray = Array.from(node.getDistributedNodes()); 7854 9176 return realArray.reduce(reduceShadowDOM, []);7855 -1 } else if (nodeName === 'slot') {-1 9177 } else if (nodeName === 'slot' && typeof node.assignedNodes === 'function') { 7856 9178 realArray = Array.from(node.assignedNodes()); 7857 9179 if (!realArray.length) { 7858 9180 realArray = getSlotChildren(node); @@ -8060,6 +9382,14 @@ module.exports = { 8060 9382 } 8061 9383 }; 8062 9384 'use strict'; -1 9385 axe.utils.getRootNode = function getRootNode(node) { -1 9386 var doc = node.getRootNode && node.getRootNode() || document; -1 9387 if (doc === node) { -1 9388 doc = document; -1 9389 } -1 9390 return doc; -1 9391 }; -1 9392 'use strict'; 8063 9393 var escapeSelector = axe.utils.escapeSelector; 8064 9394 var isXHTML = void 0; 8065 9395 var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ]; @@ -8789,13 +10119,228 @@ module.exports = { 8789 10119 if (typeof start !== 'number') { 8790 10120 start = 0; 8791 10121 }8792 -1 if (start + search.length > this.length) {-1 10122 if (start + search.length > this.length) { -1 10123 return false; -1 10124 } else { -1 10125 return this.indexOf(search, start) !== -1; -1 10126 } -1 10127 }; -1 10128 } -1 10129 'use strict'; -1 10130 function loadCssom(_ref, timeout, convertTextToStylesheetFn) { -1 10131 var root = _ref.root, shadowId = _ref.shadowId; -1 10132 function getExternalStylesheet(_ref2) { -1 10133 var resolve = _ref2.resolve, reject = _ref2.reject, url = _ref2.url; -1 10134 axe.imports.axios({ -1 10135 method: 'get', -1 10136 url: url, -1 10137 timeout: timeout -1 10138 }).then(function(_ref3) { -1 10139 var data = _ref3.data; -1 10140 var sheet = convertTextToStylesheetFn({ -1 10141 data: data, -1 10142 isExternal: true, -1 10143 shadowId: shadowId, -1 10144 root: root -1 10145 }); -1 10146 resolve(sheet); -1 10147 }).catch(reject); -1 10148 } -1 10149 var q = axe.utils.queue(); -1 10150 var rootStyleSheets = root.styleSheets ? Array.from(root.styleSheets) : null; -1 10151 if (!rootStyleSheets) { -1 10152 return q; -1 10153 } -1 10154 var sheetHrefs = []; -1 10155 var sheets = rootStyleSheets.filter(function(sheet) { -1 10156 var sheetAlreadyExists = false; -1 10157 if (sheet.href) { -1 10158 if (!sheetHrefs.includes(sheet.href)) { -1 10159 sheetHrefs.push(sheet.href); -1 10160 } else { -1 10161 sheetAlreadyExists = true; -1 10162 } -1 10163 } -1 10164 var isPrintMedia = Array.from(sheet.media).includes('print'); -1 10165 return !isPrintMedia && !sheetAlreadyExists; -1 10166 }); -1 10167 sheets.forEach(function(sheet) { -1 10168 try { -1 10169 var cssRules = sheet.cssRules; -1 10170 var rules = Array.from(cssRules); -1 10171 var importRules = rules.filter(function(r) { -1 10172 return r.href; -1 10173 }); -1 10174 if (!importRules.length) { -1 10175 q.defer(function(resolve) { -1 10176 return resolve({ -1 10177 sheet: sheet, -1 10178 isExternal: false, -1 10179 shadowId: shadowId, -1 10180 root: root -1 10181 }); -1 10182 }); -1 10183 return; -1 10184 } -1 10185 importRules.forEach(function(rule) { -1 10186 q.defer(function(resolve, reject) { -1 10187 getExternalStylesheet({ -1 10188 resolve: resolve, -1 10189 reject: reject, -1 10190 url: rule.href -1 10191 }); -1 10192 }); -1 10193 }); -1 10194 var inlineRules = rules.filter(function(rule) { -1 10195 return !rule.href; -1 10196 }); -1 10197 var inlineRulesCssText = inlineRules.reduce(function(out, rule) { -1 10198 out.push(rule.cssText); -1 10199 return out; -1 10200 }, []).join(); -1 10201 q.defer(function(resolve) { -1 10202 return resolve(convertTextToStylesheetFn({ -1 10203 data: inlineRulesCssText, -1 10204 shadowId: shadowId, -1 10205 root: root, -1 10206 isExternal: false -1 10207 })); -1 10208 }); -1 10209 } catch (e) { -1 10210 q.defer(function(resolve, reject) { -1 10211 getExternalStylesheet({ -1 10212 resolve: resolve, -1 10213 reject: reject, -1 10214 url: sheet.href -1 10215 }); -1 10216 }); -1 10217 } -1 10218 }, []); -1 10219 return q; -1 10220 } -1 10221 function getAllRootsInTree(tree) { -1 10222 var ids = []; -1 10223 var documents = axe.utils.querySelectorAllFilter(tree, '*', function(node) { -1 10224 if (ids.includes(node.shadowId)) { 8793 10225 return false;8794 -1 } else {8795 -1 return this.indexOf(search, start) !== -1;8796 10226 }8797 -1 };-1 10227 ids.push(node.shadowId); -1 10228 return true; -1 10229 }).map(function(node) { -1 10230 return { -1 10231 shadowId: node.shadowId, -1 10232 root: axe.utils.getRootNode(node.actualNode) -1 10233 }; -1 10234 }); -1 10235 return documents; -1 10236 } -1 10237 axe.utils.preloadCssom = function preloadCssom(_ref4) { -1 10238 var timeout = _ref4.timeout, _ref4$treeRoot = _ref4.treeRoot, treeRoot = _ref4$treeRoot === undefined ? axe._tree[0] : _ref4$treeRoot; -1 10239 var roots = axe.utils.uniqueArray(getAllRootsInTree(treeRoot), []); -1 10240 var q = axe.utils.queue(); -1 10241 if (!roots.length) { -1 10242 return q; -1 10243 } -1 10244 var dynamicDoc = document.implementation.createHTMLDocument(); -1 10245 function convertTextToStylesheet(_ref5) { -1 10246 var data = _ref5.data, isExternal = _ref5.isExternal, shadowId = _ref5.shadowId, root = _ref5.root; -1 10247 var style = dynamicDoc.createElement('style'); -1 10248 style.type = 'text/css'; -1 10249 style.appendChild(dynamicDoc.createTextNode(data)); -1 10250 dynamicDoc.head.appendChild(style); -1 10251 return { -1 10252 sheet: style.sheet, -1 10253 isExternal: isExternal, -1 10254 shadowId: shadowId, -1 10255 root: root -1 10256 }; -1 10257 } -1 10258 q.defer(function(resolve, reject) { -1 10259 roots.reduce(function(out, root) { -1 10260 out.defer(function(resolve, reject) { -1 10261 loadCssom(root, timeout, convertTextToStylesheet).then(resolve).catch(reject); -1 10262 }); -1 10263 return out; -1 10264 }, axe.utils.queue()).then(function(assets) { -1 10265 resolve(assets.reduce(function(out, cssomSheets) { -1 10266 return out.concat(cssomSheets); -1 10267 }, [])); -1 10268 }).catch(reject); -1 10269 }); -1 10270 return q; -1 10271 }; -1 10272 'use strict'; -1 10273 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) { -1 10274 return typeof obj; -1 10275 } : function(obj) { -1 10276 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; -1 10277 }; -1 10278 function _defineProperty(obj, key, value) { -1 10279 if (key in obj) { -1 10280 Object.defineProperty(obj, key, { -1 10281 value: value, -1 10282 enumerable: true, -1 10283 configurable: true, -1 10284 writable: true -1 10285 }); -1 10286 } else { -1 10287 obj[key] = value; -1 10288 } -1 10289 return obj; 8798 10290 } -1 10291 function isValidPreloadObject(preload) { -1 10292 return (typeof preload === 'undefined' ? 'undefined' : _typeof(preload)) === 'object' && Array.isArray(preload.assets); -1 10293 } -1 10294 axe.utils.shouldPreload = function shouldPreload(options) { -1 10295 if (!options || !options.preload) { -1 10296 return false; -1 10297 } -1 10298 if (typeof options.preload === 'boolean') { -1 10299 return options.preload; -1 10300 } -1 10301 return isValidPreloadObject(options.preload); -1 10302 }; -1 10303 axe.utils.getPreloadConfig = function getPreloadConfig(options) { -1 10304 var config = { -1 10305 assets: axe.constants.preloadAssets, -1 10306 timeout: axe.constants.preloadAssetsTimeout -1 10307 }; -1 10308 if (typeof options.preload === 'boolean') { -1 10309 return config; -1 10310 } -1 10311 var areRequestedAssetsValid = options.preload.assets.every(function(a) { -1 10312 return axe.constants.preloadAssets.includes(a.toLowerCase()); -1 10313 }); -1 10314 if (!areRequestedAssetsValid) { -1 10315 throw new Error('Requested assets, not supported. ' + ('Supported assets are: ' + axe.constants.preloadAssets.join(', ') + '.')); -1 10316 } -1 10317 config.assets = axe.utils.uniqueArray(options.preload.assets.map(function(a) { -1 10318 return a.toLowerCase(); -1 10319 }), []); -1 10320 if (options.preload.timeout && typeof options.preload.timeout === 'number' && !Number.isNaN(options.preload.timeout)) { -1 10321 config.timeout = options.preload.timeout; -1 10322 } -1 10323 return config; -1 10324 }; -1 10325 axe.utils.preload = function preload(options) { -1 10326 var preloadFunctionsMap = { -1 10327 cssom: axe.utils.preloadCssom -1 10328 }; -1 10329 var q = axe.utils.queue(); -1 10330 var shouldPreload = axe.utils.shouldPreload(options); -1 10331 if (!shouldPreload) { -1 10332 return q; -1 10333 } -1 10334 var preloadConfig = axe.utils.getPreloadConfig(options); -1 10335 preloadConfig.assets.forEach(function(asset) { -1 10336 q.defer(function(resolve, reject) { -1 10337 preloadFunctionsMap[asset](preloadConfig).then(function(results) { -1 10338 resolve(_defineProperty({}, asset, results[0])); -1 10339 }).catch(reject); -1 10340 }); -1 10341 }); -1 10342 return q; -1 10343 }; 8799 10344 'use strict'; 8800 10345 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) { 8801 10346 return typeof obj; @@ -9625,6 +11170,11 @@ module.exports = { 9625 11170 uuid.BufferClass = BufferClass; 9626 11171 })(window); 9627 11172 'use strict'; -1 11173 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) { -1 11174 return typeof obj; -1 11175 } : function(obj) { -1 11176 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; -1 11177 }; 9628 11178 axe._load({ 9629 11179 data: { 9630 11180 rules: { @@ -9640,6 +11190,10 @@ module.exports = { 9640 11190 description: 'Ensures ARIA attributes are allowed for an element\'s role', 9641 11191 help: 'Elements must only use allowed ARIA attributes' 9642 11192 }, -1 11193 'aria-allowed-role': { -1 11194 description: 'Ensures role attribute has an appropriate value for the element', -1 11195 help: 'ARIA role must be appropriate for the element' -1 11196 }, 9643 11197 'aria-dpub-role-fallback': { 9644 11198 description: 'Ensures unsupported DPUB roles are only used on elements with implicit fallback roles', 9645 11199 help: 'Unsupported DPUB ARIA roles should be used on elements with implicit fallback roles' @@ -9676,6 +11230,10 @@ module.exports = { 9676 11230 description: 'Ensures <audio> elements have captions', 9677 11231 help: '<audio> elements must have a captions track' 9678 11232 }, -1 11233 'autocomplete-valid': { -1 11234 description: 'Ensure the autocomplete attribute is correct and suitable for the form field', -1 11235 help: 'autocomplete attribute must be used correctly' -1 11236 }, 9679 11237 blink: { 9680 11238 description: 'Ensures <blink> elements are not used', 9681 11239 help: '<blink> elements are deprecated and must not be used' @@ -9696,6 +11254,10 @@ module.exports = { 9696 11254 description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds', 9697 11255 help: 'Elements must have sufficient color contrast' 9698 11256 }, -1 11257 'css-orientation-lock': { -1 11258 description: 'Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations', -1 11259 help: 'CSS Media queries are not used to lock display orientation' -1 11260 }, 9699 11261 'definition-list': { 9700 11262 description: 'Ensures <dl> elements are structured correctly', 9701 11263 help: '<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script> or <template> elements' @@ -9708,6 +11270,14 @@ module.exports = { 9708 11270 description: 'Ensures each HTML document contains a non-empty <title> element', 9709 11271 help: 'Documents must have <title> element to aid in navigation' 9710 11272 }, -1 11273 'duplicate-id-active': { -1 11274 description: 'Ensures every id attribute value of active elements is unique', -1 11275 help: 'IDs of active elements must be unique' -1 11276 }, -1 11277 'duplicate-id-aria': { -1 11278 description: 'Ensures every id attribute value used in ARIA and in labels is unique', -1 11279 help: 'IDs used in ARIA and labels must be unique' -1 11280 }, 9711 11281 'duplicate-id': { 9712 11282 description: 'Ensures every id attribute value is unique', 9713 11283 help: 'id attribute value must be unique' @@ -9748,6 +11318,10 @@ module.exports = { 9748 11318 description: 'Ensures the lang attribute of the <html> element has a valid value', 9749 11319 help: '<html> element must have a valid value for the lang attribute' 9750 11320 }, -1 11321 'html-xml-lang-mismatch': { -1 11322 description: 'Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page', -1 11323 help: 'HTML elements with lang and xml:lang must have the same base language' -1 11324 }, 9751 11325 'image-alt': { 9752 11326 description: 'Ensures <img> elements have alternate text or a role of none or presentation', 9753 11327 help: 'Images must have alternate text' @@ -9769,28 +11343,28 @@ module.exports = { 9769 11343 help: 'Form elements must have labels' 9770 11344 }, 9771 11345 'landmark-banner-is-top-level': {9772 -1 description: 'The banner landmark should not be contained in another landmark',9773 -1 help: 'Banner landmark must be at top level'-1 11346 description: 'Ensures the banner landmark is at top level', -1 11347 help: 'Banner landmark must not be contained in another landmark' 9774 11348 }, 9775 11349 'landmark-contentinfo-is-top-level': {9776 -1 description: 'The contentinfo landmark should not be contained in another landmark',9777 -1 help: 'Contentinfo landmark must be at top level'-1 11350 description: 'Ensures the contentinfo landmark is at top level', -1 11351 help: 'Contentinfo landmark must not be contained in another landmark' 9778 11352 }, 9779 11353 'landmark-main-is-top-level': {9780 -1 description: 'The main landmark should not be contained in another landmark',9781 -1 help: 'Main landmark is not at top level'-1 11354 description: 'Ensures the main landmark is at top level', -1 11355 help: 'Main landmark must not be contained in another landmark' 9782 11356 }, 9783 11357 'landmark-no-duplicate-banner': {9784 -1 description: 'Ensures the document has no more than one banner landmark',9785 -1 help: 'Document contain at most one banner landmark'-1 11358 description: 'Ensures the page has at most one banner landmark', -1 11359 help: 'Page must not have more than one banner landmark' 9786 11360 }, 9787 11361 'landmark-no-duplicate-contentinfo': {9788 -1 description: 'Ensures the document has no more than one contentinfo landmark',9789 -1 help: 'Document contain at most one contentinfo landmark'-1 11362 description: 'Ensures the page has at most one contentinfo landmark', -1 11363 help: 'Page must not have more than one contentinfo landmark' 9790 11364 }, 9791 11365 'landmark-one-main': {9792 -1 description: 'Ensures a navigation point to the primary content of the page. If the page contains iframes, each iframe should contain either no main landmarks or just one',9793 -1 help: 'Page must contain one main landmark'-1 11366 description: 'Ensures the page has only one main landmark and each iframe in the page has at most one main landmark', -1 11367 help: 'Page must have one main landmark' 9794 11368 }, 9795 11369 'layout-table': { 9796 11370 description: 'Ensures presentational <table> elements do not use <th>, <caption> elements or the summary attribute', @@ -9845,8 +11419,8 @@ module.exports = { 9845 11419 help: 'Radio inputs with the same name attribute value must be part of a group' 9846 11420 }, 9847 11421 region: {9848 -1 description: 'Ensures all content is contained within a landmark region',9849 -1 help: 'Content should be contained in a landmark region'-1 11422 description: 'Ensures all page content is contained by landmarks', -1 11423 help: 'All page content must be contained by landmarks' 9850 11424 }, 9851 11425 'scope-attr-valid': { 9852 11426 description: 'Ensures the scope attribute is used correctly on tables', @@ -9958,7 +11532,7 @@ module.exports = { 9958 11532 return out; 9959 11533 }, 9960 11534 fail: function anonymous(it) {9961 -1 var out = 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty or not visible';-1 11535 var out = 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty'; 9962 11536 return out; 9963 11537 } 9964 11538 } @@ -9984,6 +11558,19 @@ module.exports = { 9984 11558 } 9985 11559 } 9986 11560 }, -1 11561 'aria-allowed-role': { -1 11562 impact: 'minor', -1 11563 messages: { -1 11564 pass: function anonymous(it) { -1 11565 var out = 'ARIA role is allowed for given element'; -1 11566 return out; -1 11567 }, -1 11568 fail: function anonymous(it) { -1 11569 var out = 'role' + (it.data && it.data.length > 1 ? 's' : '') + ' ' + it.data.join(', ') + ' ' + (it.data && it.data.length > 1 ? 'are' : ' is') + ' not allowed for given element'; -1 11570 return out; -1 11571 } -1 11572 } -1 11573 }, 9987 11574 'implicit-role-fallback': { 9988 11575 impact: 'moderate', 9989 11576 messages: { @@ -10111,6 +11698,19 @@ module.exports = { 10111 11698 } 10112 11699 } 10113 11700 }, -1 11701 unsupportedrole: { -1 11702 impact: 'critical', -1 11703 messages: { -1 11704 pass: function anonymous(it) { -1 11705 var out = 'ARIA role is supported'; -1 11706 return out; -1 11707 }, -1 11708 fail: function anonymous(it) { -1 11709 var out = 'The role used is not widely supported in assistive technologies'; -1 11710 return out; -1 11711 } -1 11712 } -1 11713 }, 10114 11714 'aria-valid-attr-value': { 10115 11715 impact: 'critical', 10116 11716 messages: { @@ -10182,12 +11782,34 @@ module.exports = { 10182 11782 var out = 'The multimedia element has a captions track'; 10183 11783 return out; 10184 11784 }, -1 11785 incomplete: function anonymous(it) { -1 11786 var out = 'Check that captions is available for the element'; -1 11787 return out; -1 11788 } -1 11789 } -1 11790 }, -1 11791 'autocomplete-valid': { -1 11792 impact: 'serious', -1 11793 messages: { -1 11794 pass: function anonymous(it) { -1 11795 var out = 'the autocomplete attribute is correctly formatted'; -1 11796 return out; -1 11797 }, 10185 11798 fail: function anonymous(it) {10186 -1 var out = 'The multimedia element does not have a captions track';-1 11799 var out = 'the autocomplete attribute is incorrectly formatted'; -1 11800 return out; -1 11801 } -1 11802 } -1 11803 }, -1 11804 'autocomplete-appropriate': { -1 11805 impact: 'serious', -1 11806 messages: { -1 11807 pass: function anonymous(it) { -1 11808 var out = 'the autocomplete value is on an appropriate element'; 10187 11809 return out; 10188 11810 },10189 -1 incomplete: function anonymous(it) {10190 -1 var out = 'A captions track for this element could not be found';-1 11811 fail: function anonymous(it) { -1 11812 var out = 'the autocomplete value is inappropriate for this type of input'; 10191 11813 return out; 10192 11814 } 10193 11815 } @@ -10388,10 +12010,24 @@ module.exports = { 10388 12010 elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements', 10389 12011 outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport', 10390 12012 equalRatio: 'Element has a 1:1 contrast ratio with the background', -1 12013 shortTextContent: 'Element content is too short to determine if it is actual text content', 10391 12014 default: 'Unable to determine contrast ratio' 10392 12015 } 10393 12016 } 10394 12017 }, -1 12018 'css-orientation-lock': { -1 12019 impact: 'serious', -1 12020 messages: { -1 12021 pass: function anonymous(it) { -1 12022 var out = 'Display is operable, and orientation lock does not exist'; -1 12023 return out; -1 12024 }, -1 12025 fail: function anonymous(it) { -1 12026 var out = 'CSS Orientation lock is applied, and makes display inoperable'; -1 12027 return out; -1 12028 } -1 12029 } -1 12030 }, 10395 12031 'structured-dlitems': { 10396 12032 impact: 'serious', 10397 12033 messages: { @@ -10444,15 +12080,41 @@ module.exports = { 10444 12080 } 10445 12081 } 10446 12082 }, -1 12083 'duplicate-id-active': { -1 12084 impact: 'serious', -1 12085 messages: { -1 12086 pass: function anonymous(it) { -1 12087 var out = 'Document has no active elements that share the same id attribute'; -1 12088 return out; -1 12089 }, -1 12090 fail: function anonymous(it) { -1 12091 var out = 'Document has active elements with the same id attribute: ' + it.data; -1 12092 return out; -1 12093 } -1 12094 } -1 12095 }, -1 12096 'duplicate-id-aria': { -1 12097 impact: 'critical', -1 12098 messages: { -1 12099 pass: function anonymous(it) { -1 12100 var out = 'Document has no elements referenced with ARIA or labels that share the same id attribute'; -1 12101 return out; -1 12102 }, -1 12103 fail: function anonymous(it) { -1 12104 var out = 'Document has multiple elements referenced with ARIA with the same id attribute: ' + it.data; -1 12105 return out; -1 12106 } -1 12107 } -1 12108 }, 10447 12109 'duplicate-id': {10448 -1 impact: 'moderate',-1 12110 impact: 'minor', 10449 12111 messages: { 10450 12112 pass: function anonymous(it) {10451 -1 var out = 'Document has no elements that share the same id attribute';-1 12113 var out = 'Document has no static elements that share the same id attribute'; 10452 12114 return out; 10453 12115 }, 10454 12116 fail: function anonymous(it) {10455 -1 var out = 'Document has multiple elements with the same id attribute: ' + it.data;-1 12117 var out = 'Document has multiple static elements with the same id attribute'; 10456 12118 return out; 10457 12119 } 10458 12120 } @@ -10582,6 +12244,19 @@ module.exports = { 10582 12244 } 10583 12245 } 10584 12246 }, -1 12247 'xml-lang-mismatch': { -1 12248 impact: 'moderate', -1 12249 messages: { -1 12250 pass: function anonymous(it) { -1 12251 var out = 'Lang and xml:lang attributes have the same base language'; -1 12252 return out; -1 12253 }, -1 12254 fail: function anonymous(it) { -1 12255 var out = 'Lang and xml:lang attributes do not have the same base language'; -1 12256 return out; -1 12257 } -1 12258 } -1 12259 }, 10585 12260 'has-alt': { 10586 12261 impact: 'critical', 10587 12262 messages: { @@ -10673,6 +12348,19 @@ module.exports = { 10673 12348 } 10674 12349 } 10675 12350 }, -1 12351 'hidden-explicit-label': { -1 12352 impact: 'critical', -1 12353 messages: { -1 12354 pass: function anonymous(it) { -1 12355 var out = 'Form element has a visible explicit <label>'; -1 12356 return out; -1 12357 }, -1 12358 fail: function anonymous(it) { -1 12359 var out = 'Form element has explicit <label> that is hidden'; -1 12360 return out; -1 12361 } -1 12362 } -1 12363 }, 10676 12364 'landmark-is-top-level': { 10677 12365 impact: 'moderate', 10678 12366 messages: { @@ -10703,11 +12391,11 @@ module.exports = { 10703 12391 impact: 'moderate', 10704 12392 messages: { 10705 12393 pass: function anonymous(it) {10706 -1 var out = 'Document has no more than one contentinfo landmark';-1 12394 var out = 'Page does not have more than one contentinfo landmark'; 10707 12395 return out; 10708 12396 }, 10709 12397 fail: function anonymous(it) {10710 -1 var out = 'Document has more than one contentinfo landmark';-1 12398 var out = 'Page has more than one contentinfo landmark'; 10711 12399 return out; 10712 12400 } 10713 12401 } @@ -10720,7 +12408,7 @@ module.exports = { 10720 12408 return out; 10721 12409 }, 10722 12410 fail: function anonymous(it) {10723 -1 var out = 'Page must have a main landmark';-1 12411 var out = 'Page does not have a main landmark'; 10724 12412 return out; 10725 12413 } 10726 12414 } @@ -10729,11 +12417,11 @@ module.exports = { 10729 12417 impact: 'moderate', 10730 12418 messages: { 10731 12419 pass: function anonymous(it) {10732 -1 var out = 'Document has no more than one main landmark';-1 12420 var out = 'Page does not have more than one main landmark'; 10733 12421 return out; 10734 12422 }, 10735 12423 fail: function anonymous(it) {10736 -1 var out = 'Document has more than one main landmark';-1 12424 var out = 'Page has more than one main landmark'; 10737 12425 return out; 10738 12426 } 10739 12427 } @@ -10858,7 +12546,7 @@ module.exports = { 10858 12546 return out; 10859 12547 }, 10860 12548 fail: function anonymous(it) {10861 -1 var out = '<meta> tag disables zooming on mobile devices';-1 12549 var out = '' + it.data + ' on <meta> tag disables zooming on mobile devices'; 10862 12550 return out; 10863 12551 } 10864 12552 } @@ -10893,11 +12581,11 @@ module.exports = { 10893 12581 impact: 'moderate', 10894 12582 messages: { 10895 12583 pass: function anonymous(it) {10896 -1 var out = 'Content contained by ARIA landmark';-1 12584 var out = 'All page content is contained by landmarks'; 10897 12585 return out; 10898 12586 }, 10899 12587 fail: function anonymous(it) {10900 -1 var out = 'Content not contained by an ARIA landmark';-1 12588 var out = 'Some page content is not contained by landmarks'; 10901 12589 return out; 10902 12590 } 10903 12591 } @@ -11047,12 +12735,8 @@ module.exports = { 11047 12735 var out = 'The multimedia element has an audio description track'; 11048 12736 return out; 11049 12737 },11050 -1 fail: function anonymous(it) {11051 -1 var out = 'The multimedia element does not have an audio description track';11052 -1 return out;11053 -1 },11054 12738 incomplete: function anonymous(it) {11055 -1 var out = 'An audio description track for this element could not be found';-1 12739 var out = 'Check that audio description is available for the element'; 11056 12740 return out; 11057 12741 } 11058 12742 } @@ -11130,11 +12814,32 @@ module.exports = { 11130 12814 } 11131 12815 return false; 11132 12816 },11133 -1 tags: [ 'cat.aria', 'wcag2a', 'wcag411', 'wcag412' ],-1 12817 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], 11134 12818 all: [], 11135 12819 any: [ 'aria-allowed-attr' ], 11136 12820 none: [] 11137 12821 }, { -1 12822 id: 'aria-allowed-role', -1 12823 excludeHidden: false, -1 12824 selector: '[role]', -1 12825 matches: function matches(node, virtualNode) { -1 12826 return axe.commons.aria.getRole(node, { -1 12827 noImplicit: true, -1 12828 dpub: true, -1 12829 fallback: true -1 12830 }) !== null; -1 12831 }, -1 12832 tags: [ 'cat.aria', 'best-practice' ], -1 12833 all: [], -1 12834 any: [ { -1 12835 options: { -1 12836 allowImplicit: true, -1 12837 ignoredTags: [] -1 12838 }, -1 12839 id: 'aria-allowed-role' -1 12840 } ], -1 12841 none: [] -1 12842 }, { 11138 12843 id: 'aria-dpub-role-fallback', 11139 12844 selector: '[role]', 11140 12845 matches: function matches(node, virtualNode) { @@ -11156,7 +12861,7 @@ module.exports = { 11156 12861 }, { 11157 12862 id: 'aria-required-attr', 11158 12863 selector: '[role]',11159 -1 tags: [ 'cat.aria', 'wcag2a', 'wcag411', 'wcag412' ],-1 12864 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], 11160 12865 all: [], 11161 12866 any: [ 'aria-required-attr' ], 11162 12867 none: [] @@ -11182,10 +12887,10 @@ module.exports = { 11182 12887 }, { 11183 12888 id: 'aria-roles', 11184 12889 selector: '[role]',11185 -1 tags: [ 'cat.aria', 'wcag2a', 'wcag131', 'wcag411', 'wcag412' ],-1 12890 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], 11186 12891 all: [], 11187 12892 any: [],11188 -1 none: [ 'invalidrole', 'abstractrole' ]-1 12893 none: [ 'invalidrole', 'abstractrole', 'unsupportedrole' ] 11189 12894 }, { 11190 12895 id: 'aria-valid-attr-value', 11191 12896 matches: function matches(node, virtualNode) { @@ -11200,7 +12905,7 @@ module.exports = { 11200 12905 } 11201 12906 return false; 11202 12907 },11203 -1 tags: [ 'cat.aria', 'wcag2a', 'wcag131', 'wcag411', 'wcag412' ],-1 12908 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], 11204 12909 all: [ { 11205 12910 options: [], 11206 12911 id: 'aria-valid-attr-value' @@ -11221,7 +12926,7 @@ module.exports = { 11221 12926 } 11222 12927 return false; 11223 12928 },11224 -1 tags: [ 'cat.aria', 'wcag2a', 'wcag411' ],-1 12929 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], 11225 12930 all: [], 11226 12931 any: [ { 11227 12932 options: [], @@ -11231,12 +12936,50 @@ module.exports = { 11231 12936 }, { 11232 12937 id: 'audio-caption', 11233 12938 selector: 'audio', -1 12939 enabled: false, 11234 12940 excludeHidden: false, 11235 12941 tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a' ], 11236 12942 all: [], 11237 12943 any: [], 11238 12944 none: [ 'caption' ] 11239 12945 }, { -1 12946 id: 'autocomplete-valid', -1 12947 matches: function matches(node, virtualNode) { -1 12948 var _axe$commons = axe.commons, text = _axe$commons.text, aria = _axe$commons.aria, dom = _axe$commons.dom; -1 12949 var autocomplete = node.getAttribute('autocomplete'); -1 12950 if (!autocomplete || text.sanitize(autocomplete) === '') { -1 12951 return false; -1 12952 } -1 12953 var nodeName = node.nodeName.toUpperCase(); -1 12954 if ([ 'TEXTAREA', 'INPUT', 'SELECT' ].includes(nodeName) === false) { -1 12955 return false; -1 12956 } -1 12957 var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ]; -1 12958 if (nodeName === 'INPUT' && excludedInputTypes.includes(node.type)) { -1 12959 return false; -1 12960 } -1 12961 var ariaDisabled = node.getAttribute('aria-disabled') || 'false'; -1 12962 if (node.disabled || ariaDisabled.toLowerCase() === 'true') { -1 12963 return false; -1 12964 } -1 12965 var role = node.getAttribute('role'); -1 12966 var tabIndex = node.getAttribute('tabindex'); -1 12967 if (tabIndex === '-1' && role) { -1 12968 var roleDef = aria.lookupTable.role[role]; -1 12969 if (roleDef === undefined || roleDef.type !== 'widget') { -1 12970 return false; -1 12971 } -1 12972 } -1 12973 if (tabIndex === '-1' && !dom.isVisible(node, false) && !dom.isVisible(node, true)) { -1 12974 return false; -1 12975 } -1 12976 return true; -1 12977 }, -1 12978 tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ], -1 12979 all: [ 'autocomplete-valid', 'autocomplete-appropriate' ], -1 12980 any: [], -1 12981 none: [] -1 12982 }, { 11240 12983 id: 'blink', 11241 12984 selector: 'blink', 11242 12985 excludeHidden: false, @@ -11348,6 +13091,14 @@ module.exports = { 11348 13091 any: [ 'color-contrast' ], 11349 13092 none: [] 11350 13093 }, { -1 13094 id: 'css-orientation-lock', -1 13095 selector: 'html', -1 13096 tags: [ 'cat.structure', 'wcag262', 'wcag21aa', 'experimental' ], -1 13097 all: [ 'css-orientation-lock' ], -1 13098 any: [], -1 13099 none: [], -1 13100 preload: true -1 13101 }, { 11351 13102 id: 'definition-list', 11352 13103 selector: 'dl', 11353 13104 matches: function matches(node, virtualNode) { @@ -11378,8 +13129,43 @@ module.exports = { 11378 13129 any: [ 'doc-has-title' ], 11379 13130 none: [] 11380 13131 }, { -1 13132 id: 'duplicate-id-active', -1 13133 selector: '[id]', -1 13134 matches: function matches(node, virtualNode) { -1 13135 var _axe$commons2 = axe.commons, dom = _axe$commons2.dom, aria = _axe$commons2.aria; -1 13136 var id = node.getAttribute('id').trim(); -1 13137 var idSelector = '*[id="' + axe.utils.escapeSelector(id) + '"]'; -1 13138 var idMatchingElms = Array.from(dom.getRootNode(node).querySelectorAll(idSelector)); -1 13139 return idMatchingElms.some(dom.isFocusable) && !aria.isAccessibleRef(node); -1 13140 }, -1 13141 excludeHidden: false, -1 13142 tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ], -1 13143 all: [], -1 13144 any: [ 'duplicate-id-active' ], -1 13145 none: [] -1 13146 }, { -1 13147 id: 'duplicate-id-aria', -1 13148 selector: '[id]', -1 13149 matches: function matches(node, virtualNode) { -1 13150 return axe.commons.aria.isAccessibleRef(node); -1 13151 }, -1 13152 excludeHidden: false, -1 13153 tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ], -1 13154 all: [], -1 13155 any: [ 'duplicate-id-aria' ], -1 13156 none: [] -1 13157 }, { 11381 13158 id: 'duplicate-id', 11382 13159 selector: '[id]', -1 13160 matches: function matches(node, virtualNode) { -1 13161 var _axe$commons3 = axe.commons, dom = _axe$commons3.dom, aria = _axe$commons3.aria; -1 13162 var id = node.getAttribute('id').trim(); -1 13163 var idSelector = '*[id="' + axe.utils.escapeSelector(id) + '"]'; -1 13164 var idMatchingElms = Array.from(dom.getRootNode(node).querySelectorAll(idSelector)); -1 13165 return idMatchingElms.every(function(elm) { -1 13166 return !dom.isFocusable(elm); -1 13167 }) && !aria.isAccessibleRef(node); -1 13168 }, 11383 13169 excludeHidden: false, 11384 13170 tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ], 11385 13171 all: [], @@ -11490,6 +13276,19 @@ module.exports = { 11490 13276 any: [], 11491 13277 none: [ 'valid-lang' ] 11492 13278 }, { -1 13279 id: 'html-xml-lang-mismatch', -1 13280 selector: 'html[lang][xml\\:lang]', -1 13281 matches: function matches(node, virtualNode) { -1 13282 var getBaseLang = axe.commons.utils.getBaseLang; -1 13283 var primaryLangValue = getBaseLang(node.getAttribute('lang')); -1 13284 var primaryXmlLangValue = getBaseLang(node.getAttribute('xml:lang')); -1 13285 return axe.utils.validLangs().includes(primaryLangValue) && axe.utils.validLangs().includes(primaryXmlLangValue); -1 13286 }, -1 13287 tags: [ 'cat.language', 'wcag2a', 'wcag311' ], -1 13288 all: [ 'xml-lang-mismatch' ], -1 13289 any: [], -1 13290 none: [] -1 13291 }, { 11493 13292 id: 'image-alt', 11494 13293 selector: 'img, [role=\'img\']:not(svg)', 11495 13294 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ], @@ -11537,7 +13336,7 @@ module.exports = { 11537 13336 tags: [ 'cat.forms', 'wcag2a', 'wcag332', 'wcag131', 'section508', 'section508.22.n' ], 11538 13337 all: [], 11539 13338 any: [ 'aria-label', 'aria-labelledby', 'implicit-label', 'explicit-label', 'non-empty-title' ],11540 -1 none: [ 'help-same-as-label', 'multiple-label' ]-1 13339 none: [ 'help-same-as-label', 'multiple-label', 'hidden-explicit-label' ] 11541 13340 }, { 11542 13341 id: 'landmark-banner-is-top-level', 11543 13342 selector: 'header:not([role]), [role=banner]', @@ -11893,12 +13692,12 @@ module.exports = { 11893 13692 } ], 11894 13693 checks: [ { 11895 13694 id: 'abstractrole',11896 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13695 evaluate: function evaluate(node, options, virtualNode, context) { 11897 13696 return axe.commons.aria.getRoleType(node.getAttribute('role')) === 'abstract'; 11898 13697 } 11899 13698 }, { 11900 13699 id: 'aria-allowed-attr',11901 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13700 evaluate: function evaluate(node, options, virtualNode, context) { 11902 13701 options = options || {}; 11903 13702 var invalid = []; 11904 13703 var attr, attrName, allowed, role = node.getAttribute('role'), attrs = node.attributes; @@ -11925,13 +13724,34 @@ module.exports = { 11925 13724 return true; 11926 13725 } 11927 13726 }, { -1 13727 id: 'aria-allowed-role', -1 13728 evaluate: function evaluate(node, options, virtualNode, context) { -1 13729 var _ref = options || {}, _ref$allowImplicit = _ref.allowImplicit, allowImplicit = _ref$allowImplicit === undefined ? true : _ref$allowImplicit, _ref$ignoredTags = _ref.ignoredTags, ignoredTags = _ref$ignoredTags === undefined ? [] : _ref$ignoredTags; -1 13730 var tagName = node.nodeName.toUpperCase(); -1 13731 if (ignoredTags.map(function(t) { -1 13732 return t.toUpperCase(); -1 13733 }).includes(tagName)) { -1 13734 return true; -1 13735 } -1 13736 var unallowedRoles = axe.commons.aria.getElementUnallowedRoles(node, allowImplicit); -1 13737 if (unallowedRoles.length) { -1 13738 this.data(unallowedRoles); -1 13739 return false; -1 13740 } -1 13741 return true; -1 13742 }, -1 13743 options: { -1 13744 allowImplicit: true, -1 13745 ignoredTags: [] -1 13746 } -1 13747 }, { 11928 13748 id: 'aria-hidden-body',11929 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13749 evaluate: function evaluate(node, options, virtualNode, context) { 11930 13750 return node.getAttribute('aria-hidden') !== 'true'; 11931 13751 } 11932 13752 }, { 11933 13753 id: 'aria-errormessage',11934 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13754 evaluate: function evaluate(node, options, virtualNode, context) { 11935 13755 options = Array.isArray(options) ? options : []; 11936 13756 var attr = node.getAttribute('aria-errormessage'), hasAttr = node.hasAttribute('aria-errormessage'); 11937 13757 var doc = axe.commons.dom.getRootNode(node); @@ -11943,7 +13763,7 @@ module.exports = { 11943 13763 } 11944 13764 if (options.indexOf(attr) === -1 && hasAttr) { 11945 13765 if (!validateAttrValue()) {11946 -1 this.data(attr);-1 13766 this.data(axe.utils.tokenList(attr)); 11947 13767 return false; 11948 13768 } 11949 13769 } @@ -11951,7 +13771,7 @@ module.exports = { 11951 13771 } 11952 13772 }, { 11953 13773 id: 'has-widget-role',11954 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13774 evaluate: function evaluate(node, options, virtualNode, context) { 11955 13775 var role = node.getAttribute('role'); 11956 13776 if (role === null) { 11957 13777 return false; @@ -11962,7 +13782,7 @@ module.exports = { 11962 13782 options: [] 11963 13783 }, { 11964 13784 id: 'implicit-role-fallback',11965 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13785 evaluate: function evaluate(node, options, virtualNode, context) { 11966 13786 var role = node.getAttribute('role'); 11967 13787 if (role === null || !axe.commons.aria.isValidRole(role)) { 11968 13788 return true; @@ -11972,12 +13792,14 @@ module.exports = { 11972 13792 } 11973 13793 }, { 11974 13794 id: 'invalidrole',11975 -1 evaluate: function evaluate(node, options, virtualNode) {11976 -1 return !axe.commons.aria.isValidRole(node.getAttribute('role'));-1 13795 evaluate: function evaluate(node, options, virtualNode, context) { -1 13796 return !axe.commons.aria.isValidRole(node.getAttribute('role'), { -1 13797 allowAbstract: true -1 13798 }); 11977 13799 } 11978 13800 }, { 11979 13801 id: 'aria-required-attr',11980 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13802 evaluate: function evaluate(node, options, virtualNode, context) { 11981 13803 options = options || {}; 11982 13804 var missing = []; 11983 13805 if (node.hasAttributes()) { @@ -12002,7 +13824,7 @@ module.exports = { 12002 13824 } 12003 13825 }, { 12004 13826 id: 'aria-required-children',12005 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13827 evaluate: function evaluate(node, options, virtualNode, context) { 12006 13828 var requiredOwned = axe.commons.aria.requiredOwned; 12007 13829 var implicitNodes = axe.commons.aria.implicitNodes; 12008 13830 var matchesSelector = axe.commons.utils.matchesSelector; @@ -12093,7 +13915,7 @@ module.exports = { 12093 13915 } 12094 13916 }, { 12095 13917 id: 'aria-required-parent',12096 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13918 evaluate: function evaluate(node, options, virtualNode, context) { 12097 13919 function getSelector(role) { 12098 13920 var impliedNative = axe.commons.aria.implicitNodes(role) || []; 12099 13921 return impliedNative.concat('[role="' + role + '"]').join(','); @@ -12150,8 +13972,15 @@ module.exports = { 12150 13972 return false; 12151 13973 } 12152 13974 }, { -1 13975 id: 'unsupportedrole', -1 13976 evaluate: function evaluate(node, options, virtualNode, context) { -1 13977 return !axe.commons.aria.isValidRole(node.getAttribute('role'), { -1 13978 flagUnsupported: true -1 13979 }); -1 13980 } -1 13981 }, { 12153 13982 id: 'aria-valid-attr-value',12154 -1 evaluate: function evaluate(node, options, virtualNode) {-1 13983 evaluate: function evaluate(node, options, virtualNode, context) { 12155 13984 options = Array.isArray(options) ? options : []; 12156 13985 var invalid = [], aria = /^aria-/; 12157 13986 var attr, attrName, attrs = node.attributes; @@ -12174,7 +14003,7 @@ module.exports = { 12174 14003 options: [] 12175 14004 }, { 12176 14005 id: 'aria-valid-attr',12177 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14006 evaluate: function evaluate(node, options, virtualNode, context) { 12178 14007 options = Array.isArray(options) ? options : []; 12179 14008 var invalid = [], aria = /^aria-/; 12180 14009 var attr, attrs = node.attributes; @@ -12193,7 +14022,7 @@ module.exports = { 12193 14022 options: [] 12194 14023 }, { 12195 14024 id: 'valid-scrollable-semantics',12196 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14025 evaluate: function evaluate(node, options, virtualNode, context) { 12197 14026 var VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS = { 12198 14027 ARTICLE: true, 12199 14028 ASIDE: true, @@ -12230,26 +14059,31 @@ module.exports = { 12230 14059 options: [] 12231 14060 }, { 12232 14061 id: 'color-contrast',12233 -1 evaluate: function evaluate(node, options, virtualNode) {12234 -1 if (!axe.commons.dom.isVisible(node, false)) {-1 14062 evaluate: function evaluate(node, options, virtualNode, context) { -1 14063 var _axe$commons4 = axe.commons, dom = _axe$commons4.dom, color = _axe$commons4.color, text = _axe$commons4.text; -1 14064 if (!dom.isVisible(node, false)) { 12235 14065 return true; 12236 14066 } 12237 14067 var noScroll = !!(options || {}).noScroll;12238 -1 var bgNodes = [], bgColor = axe.commons.color.getBackgroundColor(node, bgNodes, noScroll), fgColor = axe.commons.color.getForegroundColor(node, noScroll);-1 14068 var bgNodes = []; -1 14069 var bgColor = color.getBackgroundColor(node, bgNodes, noScroll); -1 14070 var fgColor = color.getForegroundColor(node, noScroll); 12239 14071 var nodeStyle = window.getComputedStyle(node); 12240 14072 var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size')); 12241 14073 var fontWeight = nodeStyle.getPropertyValue('font-weight'); 12242 14074 var bold = [ 'bold', 'bolder', '600', '700', '800', '900' ].indexOf(fontWeight) !== -1;12243 -1 var cr = axe.commons.color.hasValidContrastRatio(bgColor, fgColor, fontSize, bold);-1 14075 var cr = color.hasValidContrastRatio(bgColor, fgColor, fontSize, bold); 12244 14076 var truncatedResult = Math.floor(cr.contrastRatio * 100) / 100;12245 -1 var missing;-1 14077 var missing = void 0; 12246 14078 if (bgColor === null) {12247 -1 missing = axe.commons.color.incompleteData.get('bgColor');-1 14079 missing = color.incompleteData.get('bgColor'); 12248 14080 }12249 -1 var equalRatio = false;12250 -1 if (truncatedResult === 1) {12251 -1 equalRatio = true;12252 -1 missing = axe.commons.color.incompleteData.set('bgColor', 'equalRatio');-1 14081 var equalRatio = truncatedResult === 1; -1 14082 var shortTextContent = text.visibleVirtual(virtualNode, false, true).length === 1; -1 14083 if (equalRatio) { -1 14084 missing = color.incompleteData.set('bgColor', 'equalRatio'); -1 14085 } else if (shortTextContent) { -1 14086 missing = 'shortTextContent'; 12253 14087 } 12254 14088 var data = { 12255 14089 fgColor: fgColor ? fgColor.toHexString() : undefined, @@ -12261,20 +14095,21 @@ module.exports = { 12261 14095 expectedContrastRatio: cr.expectedContrastRatio + ':1' 12262 14096 }; 12263 14097 this.data(data);12264 -1 if (fgColor === null || bgColor === null || equalRatio) {-1 14098 if (fgColor === null || bgColor === null || equalRatio || shortTextContent && !cr.isValid) { 12265 14099 missing = null;12266 -1 axe.commons.color.incompleteData.clear();-1 14100 color.incompleteData.clear(); 12267 14101 this.relatedNodes(bgNodes); 12268 14102 return undefined;12269 -1 } else if (!cr.isValid) {-1 14103 } -1 14104 if (!cr.isValid) { 12270 14105 this.relatedNodes(bgNodes); 12271 14106 } 12272 14107 return cr.isValid; 12273 14108 } 12274 14109 }, { 12275 14110 id: 'link-in-text-block',12276 -1 evaluate: function evaluate(node, options, virtualNode) {12277 -1 var _axe$commons = axe.commons, color = _axe$commons.color, dom = _axe$commons.dom;-1 14111 evaluate: function evaluate(node, options, virtualNode, context) { -1 14112 var _axe$commons5 = axe.commons, color = _axe$commons5.color, dom = _axe$commons5.dom; 12278 14113 function getContrast(color1, color2) { 12279 14114 var c1lum = color1.getRelativeLuminance(); 12280 14115 var c2lum = color2.getRelativeLuminance(); @@ -12333,8 +14168,62 @@ module.exports = { 12333 14168 return false; 12334 14169 } 12335 14170 }, { -1 14171 id: 'autocomplete-appropriate', -1 14172 evaluate: function evaluate(node, options, virtualNode, context) { -1 14173 if (node.nodeName.toUpperCase() !== 'INPUT') { -1 14174 return true; -1 14175 } -1 14176 var number = [ 'text', 'search', 'number' ]; -1 14177 var url = [ 'text', 'search', 'url' ]; -1 14178 var allowedTypesMap = { -1 14179 bday: [ 'text', 'search', 'date' ], -1 14180 email: [ 'text', 'search', 'email' ], -1 14181 'cc-exp': [ 'text', 'search', 'month' ], -1 14182 'street-address': [], -1 14183 tel: [ 'text', 'search', 'tel' ], -1 14184 'cc-exp-month': number, -1 14185 'cc-exp-year': number, -1 14186 'transaction-amount': number, -1 14187 'bday-day': number, -1 14188 'bday-month': number, -1 14189 'bday-year': number, -1 14190 'new-password': [ 'text', 'search', 'password' ], -1 14191 'current-password': [ 'text', 'search', 'password' ], -1 14192 url: url, -1 14193 photo: url, -1 14194 impp: url -1 14195 }; -1 14196 if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { -1 14197 Object.keys(options).forEach(function(key) { -1 14198 if (!allowedTypesMap[key]) { -1 14199 allowedTypesMap[key] = []; -1 14200 } -1 14201 allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]); -1 14202 }); -1 14203 } -1 14204 var autocomplete = node.getAttribute('autocomplete'); -1 14205 var autocompleteTerms = autocomplete.split(/\s+/g).map(function(term) { -1 14206 return term.toLowerCase(); -1 14207 }); -1 14208 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1]; -1 14209 if (axe.commons.text.autocomplete.stateTerms.includes(purposeTerm)) { -1 14210 return true; -1 14211 } -1 14212 var allowedTypes = allowedTypesMap[purposeTerm]; -1 14213 if (typeof allowedTypes === 'undefined') { -1 14214 return node.type === 'text'; -1 14215 } -1 14216 return allowedTypes.includes(node.type); -1 14217 } -1 14218 }, { -1 14219 id: 'autocomplete-valid', -1 14220 evaluate: function evaluate(node, options, virtualNode, context) { -1 14221 var autocomplete = node.getAttribute('autocomplete') || ''; -1 14222 return axe.commons.text.isValidAutocomplete(autocomplete, options); -1 14223 } -1 14224 }, { 12336 14225 id: 'fieldset',12337 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14226 evaluate: function evaluate(node, options, virtualNode, context) { 12338 14227 var failureCode, self = this; 12339 14228 function getUnrelatedElements(parent, name) { 12340 14229 return axe.commons.utils.toArray(parent.querySelectorAll('select,textarea,button,input:not([name="' + name + '"]):not([type="hidden"])')); @@ -12438,7 +14327,7 @@ module.exports = { 12438 14327 } 12439 14328 }, { 12440 14329 id: 'group-labelledby',12441 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14330 evaluate: function evaluate(node, options, virtualNode, context) { 12442 14331 this.data({ 12443 14332 name: node.getAttribute('name'), 12444 14333 type: node.getAttribute('type') @@ -12476,7 +14365,7 @@ module.exports = { 12476 14365 } 12477 14366 }, { 12478 14367 id: 'accesskeys',12479 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14368 evaluate: function evaluate(node, options, virtualNode, context) { 12480 14369 if (axe.commons.dom.isVisible(node, false)) { 12481 14370 this.data(node.getAttribute('accesskey')); 12482 14371 this.relatedNodes([ node ]); @@ -12504,7 +14393,7 @@ module.exports = { 12504 14393 } 12505 14394 }, { 12506 14395 id: 'focusable-no-name',12507 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14396 evaluate: function evaluate(node, options, virtualNode, context) { 12508 14397 var tabIndex = node.getAttribute('tabindex'), inFocusOrder = axe.commons.dom.isFocusable(node) && tabIndex > -1; 12509 14398 if (!inFocusOrder) { 12510 14399 return false; @@ -12513,7 +14402,7 @@ module.exports = { 12513 14402 } 12514 14403 }, { 12515 14404 id: 'landmark-is-top-level',12516 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14405 evaluate: function evaluate(node, options, virtualNode, context) { 12517 14406 var landmarks = axe.commons.aria.getRolesByType('landmark'); 12518 14407 var parent = axe.commons.dom.getComposedParent(node); 12519 14408 this.data({ @@ -12533,7 +14422,7 @@ module.exports = { 12533 14422 } 12534 14423 }, { 12535 14424 id: 'page-has-heading-one',12536 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14425 evaluate: function evaluate(node, options, virtualNode, context) { 12537 14426 if (!options || !options.selector || typeof options.selector !== 'string') { 12538 14427 throw new TypeError('visible-in-page requires options.selector to be a string'); 12539 14428 } @@ -12559,7 +14448,7 @@ module.exports = { 12559 14448 } 12560 14449 }, { 12561 14450 id: 'page-has-main',12562 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14451 evaluate: function evaluate(node, options, virtualNode, context) { 12563 14452 if (!options || !options.selector || typeof options.selector !== 'string') { 12564 14453 throw new TypeError('visible-in-page requires options.selector to be a string'); 12565 14454 } @@ -12585,7 +14474,7 @@ module.exports = { 12585 14474 } 12586 14475 }, { 12587 14476 id: 'page-no-duplicate-banner',12588 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14477 evaluate: function evaluate(node, options, virtualNode, context) { 12589 14478 if (!options || !options.selector || typeof options.selector !== 'string') { 12590 14479 throw new TypeError('visible-in-page requires options.selector to be a string'); 12591 14480 } @@ -12606,7 +14495,7 @@ module.exports = { 12606 14495 } 12607 14496 }, { 12608 14497 id: 'page-no-duplicate-contentinfo',12609 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14498 evaluate: function evaluate(node, options, virtualNode, context) { 12610 14499 if (!options || !options.selector || typeof options.selector !== 'string') { 12611 14500 throw new TypeError('visible-in-page requires options.selector to be a string'); 12612 14501 } @@ -12627,7 +14516,7 @@ module.exports = { 12627 14516 } 12628 14517 }, { 12629 14518 id: 'page-no-duplicate-main',12630 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14519 evaluate: function evaluate(node, options, virtualNode, context) { 12631 14520 if (!options || !options.selector || typeof options.selector !== 'string') { 12632 14521 throw new TypeError('visible-in-page requires options.selector to be a string'); 12633 14522 } @@ -12647,18 +14536,18 @@ module.exports = { 12647 14536 } 12648 14537 }, { 12649 14538 id: 'tabindex',12650 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14539 evaluate: function evaluate(node, options, virtualNode, context) { 12651 14540 return node.tabIndex <= 0; 12652 14541 } 12653 14542 }, { 12654 14543 id: 'duplicate-img-label',12655 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14544 evaluate: function evaluate(node, options, virtualNode, context) { 12656 14545 var text = axe.commons.text.visibleVirtual(virtualNode, true).toLowerCase(); 12657 14546 if (text === '') { 12658 14547 return false; 12659 14548 }12660 -1 var images = axe.utils.querySelectorAll(virtualNode, 'img').filter(function(_ref) {12661 -1 var actualNode = _ref.actualNode;-1 14549 var images = axe.utils.querySelectorAll(virtualNode, 'img').filter(function(_ref2) { -1 14550 var actualNode = _ref2.actualNode; 12662 14551 return axe.commons.dom.isVisible(actualNode) && ![ 'none', 'presentation' ].includes(actualNode.getAttribute('role')); 12663 14552 }); 12664 14553 return images.some(function(img) { @@ -12667,20 +14556,24 @@ module.exports = { 12667 14556 } 12668 14557 }, { 12669 14558 id: 'explicit-label',12670 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14559 evaluate: function evaluate(node, options, virtualNode, context) { 12671 14560 if (node.getAttribute('id')) { 12672 14561 var root = axe.commons.dom.getRootNode(node); 12673 14562 var id = axe.commons.utils.escapeSelector(node.getAttribute('id')); 12674 14563 var label = root.querySelector('label[for="' + id + '"]'); 12675 14564 if (label) {12676 -1 return !!axe.commons.text.accessibleText(label);-1 14565 if (!axe.commons.dom.isVisible(label)) { -1 14566 return true; -1 14567 } else { -1 14568 return !!axe.commons.text.accessibleText(label); -1 14569 } 12677 14570 } 12678 14571 } 12679 14572 return false; 12680 14573 } 12681 14574 }, { 12682 14575 id: 'help-same-as-label',12683 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14576 evaluate: function evaluate(node, options, virtualNode, context) { 12684 14577 var labelText = axe.commons.text.labelVirtual(virtualNode), check = node.getAttribute('title'); 12685 14578 if (!labelText) { 12686 14579 return false; @@ -12698,8 +14591,21 @@ module.exports = { 12698 14591 }, 12699 14592 enabled: false 12700 14593 }, { -1 14594 id: 'hidden-explicit-label', -1 14595 evaluate: function evaluate(node, options, virtualNode, context) { -1 14596 if (node.getAttribute('id')) { -1 14597 var root = axe.commons.dom.getRootNode(node); -1 14598 var id = axe.commons.utils.escapeSelector(node.getAttribute('id')); -1 14599 var label = root.querySelector('label[for="' + id + '"]'); -1 14600 if (label && !axe.commons.dom.isVisible(label)) { -1 14601 return true; -1 14602 } -1 14603 } -1 14604 return false; -1 14605 } -1 14606 }, { 12701 14607 id: 'implicit-label',12702 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14608 evaluate: function evaluate(node, options, virtualNode, context) { 12703 14609 var label = axe.commons.dom.findUpVirtual(virtualNode, 'label'); 12704 14610 if (label) { 12705 14611 return !!axe.commons.text.accessibleTextVirtual(label); @@ -12708,7 +14614,7 @@ module.exports = { 12708 14614 } 12709 14615 }, { 12710 14616 id: 'multiple-label',12711 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14617 evaluate: function evaluate(node, options, virtualNode, context) { 12712 14618 var id = axe.commons.utils.escapeSelector(node.getAttribute('id')); 12713 14619 var labels = Array.from(document.querySelectorAll('label[for="' + id + '"]')); 12714 14620 var parent = node.parentNode; @@ -12730,29 +14636,26 @@ module.exports = { 12730 14636 } 12731 14637 }, { 12732 14638 id: 'title-only',12733 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14639 evaluate: function evaluate(node, options, virtualNode, context) { 12734 14640 var labelText = axe.commons.text.labelVirtual(virtualNode); 12735 14641 return !labelText && !!(node.getAttribute('title') || node.getAttribute('aria-describedby')); 12736 14642 } 12737 14643 }, { 12738 14644 id: 'has-lang',12739 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14645 evaluate: function evaluate(node, options, virtualNode, context) { 12740 14646 return !!(node.getAttribute('lang') || node.getAttribute('xml:lang') || '').trim(); 12741 14647 } 12742 14648 }, { 12743 14649 id: 'valid-lang',12744 -1 evaluate: function evaluate(node, options, virtualNode) {12745 -1 function getBaseLang(lang) {12746 -1 return lang.trim().split('-')[0].toLowerCase();12747 -1 }-1 14650 evaluate: function evaluate(node, options, virtualNode, context) { 12748 14651 var langs, invalid;12749 -1 langs = (options ? options : axe.commons.utils.validLangs()).map(getBaseLang);-1 14652 langs = (options ? options : axe.commons.utils.validLangs()).map(axe.commons.utils.getBaseLang); 12750 14653 invalid = [ 'lang', 'xml:lang' ].reduce(function(invalid, langAttr) { 12751 14654 var langVal = node.getAttribute(langAttr); 12752 14655 if (typeof langVal !== 'string') { 12753 14656 return invalid; 12754 14657 }12755 -1 var baselangVal = getBaseLang(langVal);-1 14658 var baselangVal = axe.commons.utils.getBaseLang(langVal); 12756 14659 if (baselangVal !== '' && langs.indexOf(baselangVal) === -1) { 12757 14660 invalid.push(langAttr + '="' + node.getAttribute(langAttr) + '"'); 12758 14661 } @@ -12765,65 +14668,148 @@ module.exports = { 12765 14668 return false; 12766 14669 } 12767 14670 }, { -1 14671 id: 'xml-lang-mismatch', -1 14672 evaluate: function evaluate(node, options, virtualNode, context) { -1 14673 var getBaseLang = axe.commons.utils.getBaseLang; -1 14674 var primaryLangValue = getBaseLang(node.getAttribute('lang')); -1 14675 var primaryXmlLangValue = getBaseLang(node.getAttribute('xml:lang')); -1 14676 return primaryLangValue === primaryXmlLangValue; -1 14677 } -1 14678 }, { 12768 14679 id: 'dlitem',12769 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14680 evaluate: function evaluate(node, options, virtualNode, context) { 12770 14681 var parent = axe.commons.dom.getComposedParent(node);12771 -1 return parent.nodeName.toUpperCase() === 'DL';-1 14682 var parentTagName = parent.nodeName.toUpperCase(); -1 14683 if (parentTagName !== 'DL') { -1 14684 return false; -1 14685 } -1 14686 var parentRole = (parent.getAttribute('role') || '').toLowerCase(); -1 14687 if (!parentRole || !axe.commons.aria.isValidRole(parentRole)) { -1 14688 return true; -1 14689 } -1 14690 if (parentRole === 'list') { -1 14691 return true; -1 14692 } -1 14693 return false; 12772 14694 } 12773 14695 }, { 12774 14696 id: 'has-listitem',12775 -1 evaluate: function evaluate(node, options, virtualNode) {12776 -1 return virtualNode.children.every(function(_ref2) {12777 -1 var actualNode = _ref2.actualNode;-1 14697 evaluate: function evaluate(node, options, virtualNode, context) { -1 14698 return virtualNode.children.every(function(_ref3) { -1 14699 var actualNode = _ref3.actualNode; 12778 14700 return actualNode.nodeName.toUpperCase() !== 'LI'; 12779 14701 }); 12780 14702 } 12781 14703 }, { 12782 14704 id: 'listitem',12783 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14705 evaluate: function evaluate(node, options, virtualNode, context) { 12784 14706 var parent = axe.commons.dom.getComposedParent(node);12785 -1 return [ 'UL', 'OL' ].includes(parent.nodeName.toUpperCase()) || (parent.getAttribute('role') || '').toLowerCase() === 'list';-1 14707 if (!parent) { -1 14708 return undefined; -1 14709 } -1 14710 var parentTagName = parent.nodeName.toUpperCase(); -1 14711 var parentRole = (parent.getAttribute('role') || '').toLowerCase(); -1 14712 if (parentRole === 'list') { -1 14713 return true; -1 14714 } -1 14715 if (parentRole && axe.commons.aria.isValidRole(parentRole)) { -1 14716 return false; -1 14717 } -1 14718 return [ 'UL', 'OL' ].includes(parentTagName); 12786 14719 } 12787 14720 }, { 12788 14721 id: 'only-dlitems',12789 -1 evaluate: function evaluate(node, options, virtualNode) {12790 -1 var bad = [], permitted = [ 'STYLE', 'META', 'LINK', 'MAP', 'AREA', 'SCRIPT', 'DATALIST', 'TEMPLATE' ], hasNonEmptyTextNode = false;12791 -1 virtualNode.children.forEach(function(_ref3) {12792 -1 var actualNode = _ref3.actualNode;12793 -1 var nodeName = actualNode.nodeName.toUpperCase();12794 -1 if (actualNode.nodeType === 1 && nodeName !== 'DT' && nodeName !== 'DD' && permitted.indexOf(nodeName) === -1) {12795 -1 bad.push(actualNode);-1 14722 evaluate: function evaluate(node, options, virtualNode, context) { -1 14723 var _axe$commons6 = axe.commons, dom = _axe$commons6.dom, aria = _axe$commons6.aria; -1 14724 var ALLOWED_ROLES = [ 'definition', 'term', 'list' ]; -1 14725 var base = { -1 14726 badNodes: [], -1 14727 hasNonEmptyTextNode: false -1 14728 }; -1 14729 var content = virtualNode.children.reduce(function(content, child) { -1 14730 var actualNode = child.actualNode; -1 14731 if (actualNode.nodeName.toUpperCase() === 'DIV' && aria.getRole(actualNode) === null) { -1 14732 return content.concat(child.children); -1 14733 } -1 14734 return content.concat(child); -1 14735 }, []); -1 14736 var result = content.reduce(function(out, childNode) { -1 14737 var actualNode = childNode.actualNode; -1 14738 var tagName = actualNode.nodeName.toUpperCase(); -1 14739 if (actualNode.nodeType === 1 && dom.isVisible(actualNode, true, false)) { -1 14740 var explicitRole = aria.getRole(actualNode, { -1 14741 noImplicit: true -1 14742 }); -1 14743 if (tagName !== 'DT' && tagName !== 'DD' || explicitRole) { -1 14744 if (!ALLOWED_ROLES.includes(explicitRole)) { -1 14745 out.badNodes.push(actualNode); -1 14746 } -1 14747 } 12796 14748 } else if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {12797 -1 hasNonEmptyTextNode = true;-1 14749 out.hasNonEmptyTextNode = true; 12798 14750 }12799 -1 });12800 -1 if (bad.length) {12801 -1 this.relatedNodes(bad);-1 14751 return out; -1 14752 }, base); -1 14753 if (result.badNodes.length) { -1 14754 this.relatedNodes(result.badNodes); 12802 14755 }12803 -1 var retVal = !!bad.length || hasNonEmptyTextNode;12804 -1 return retVal;-1 14756 return !!result.badNodes.length || result.hasNonEmptyTextNode; 12805 14757 } 12806 14758 }, { 12807 14759 id: 'only-listitems',12808 -1 evaluate: function evaluate(node, options, virtualNode) {12809 -1 var bad = [], permitted = [ 'STYLE', 'META', 'LINK', 'MAP', 'AREA', 'SCRIPT', 'DATALIST', 'TEMPLATE' ], hasNonEmptyTextNode = false;12810 -1 virtualNode.children.forEach(function(_ref4) {-1 14760 evaluate: function evaluate(node, options, virtualNode, context) { -1 14761 var dom = axe.commons.dom; -1 14762 var getIsListItemRole = function getIsListItemRole(role, tagName) { -1 14763 return role === 'listitem' || tagName === 'LI' && !role; -1 14764 }; -1 14765 var getHasListItem = function getHasListItem(hasListItem, tagName, isListItemRole) { -1 14766 return hasListItem || tagName === 'LI' && isListItemRole || isListItemRole; -1 14767 }; -1 14768 var base = { -1 14769 badNodes: [], -1 14770 isEmpty: true, -1 14771 hasNonEmptyTextNode: false, -1 14772 hasListItem: false, -1 14773 liItemsWithRole: 0 -1 14774 }; -1 14775 var out = virtualNode.children.reduce(function(out, _ref4) { 12811 14776 var actualNode = _ref4.actualNode;12812 -1 var nodeName = actualNode.nodeName.toUpperCase();12813 -1 if (actualNode.nodeType === 1 && nodeName !== 'LI' && permitted.indexOf(nodeName) === -1) {12814 -1 bad.push(actualNode);12815 -1 } else if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {12816 -1 hasNonEmptyTextNode = true;-1 14777 var tagName = actualNode.nodeName.toUpperCase(); -1 14778 if (actualNode.nodeType === 1 && dom.isVisible(actualNode, true, false)) { -1 14779 var role = (actualNode.getAttribute('role') || '').toLowerCase(); -1 14780 var isListItemRole = getIsListItemRole(role, tagName); -1 14781 out.hasListItem = getHasListItem(out.hasListItem, tagName, isListItemRole); -1 14782 if (isListItemRole) { -1 14783 out.isEmpty = false; -1 14784 } -1 14785 if (tagName === 'LI' && !isListItemRole) { -1 14786 out.liItemsWithRole++; -1 14787 } -1 14788 if (tagName !== 'LI' && !isListItemRole) { -1 14789 out.badNodes.push(actualNode); -1 14790 } 12817 14791 } -1 14792 if (actualNode.nodeType === 3) { -1 14793 if (actualNode.nodeValue.trim() !== '') { -1 14794 out.hasNonEmptyTextNode = true; -1 14795 } -1 14796 } -1 14797 return out; -1 14798 }, base); -1 14799 var virtualNodeChildrenOfTypeLi = virtualNode.children.filter(function(_ref5) { -1 14800 var actualNode = _ref5.actualNode; -1 14801 return actualNode.nodeName.toUpperCase() === 'LI'; 12818 14802 });12819 -1 if (bad.length) {12820 -1 this.relatedNodes(bad);-1 14803 var allLiItemsHaveRole = out.liItemsWithRole > 0 && virtualNodeChildrenOfTypeLi.length === out.liItemsWithRole; -1 14804 if (out.badNodes.length) { -1 14805 this.relatedNodes(out.badNodes); 12821 14806 }12822 -1 return !!bad.length || hasNonEmptyTextNode;-1 14807 var isInvalidListItem = !(out.hasListItem || out.isEmpty && !allLiItemsHaveRole); -1 14808 return isInvalidListItem || !!out.badNodes.length || out.hasNonEmptyTextNode; 12823 14809 } 12824 14810 }, { 12825 14811 id: 'structured-dlitems',12826 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14812 evaluate: function evaluate(node, options, virtualNode, context) { 12827 14813 var children = virtualNode.children; 12828 14814 if (!children || !children.length) { 12829 14815 return false; @@ -12845,32 +14831,27 @@ module.exports = { 12845 14831 } 12846 14832 }, { 12847 14833 id: 'caption',12848 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14834 evaluate: function evaluate(node, options, virtualNode, context) { 12849 14835 var tracks = axe.utils.querySelectorAll(virtualNode, 'track');12850 -1 if (tracks.length) {12851 -1 return !tracks.some(function(_ref5) {12852 -1 var actualNode = _ref5.actualNode;12853 -1 return (actualNode.getAttribute('kind') || '').toLowerCase() === 'captions';12854 -1 });12855 -1 }12856 -1 return undefined;-1 14836 var hasCaptions = tracks.some(function(_ref6) { -1 14837 var actualNode = _ref6.actualNode; -1 14838 return (actualNode.getAttribute('kind') || '').toLowerCase() === 'captions'; -1 14839 }); -1 14840 return hasCaptions ? false : undefined; 12857 14841 } 12858 14842 }, { 12859 14843 id: 'description',12860 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14844 evaluate: function evaluate(node, options, virtualNode, context) { 12861 14845 var tracks = axe.utils.querySelectorAll(virtualNode, 'track');12862 -1 if (tracks.length) {12863 -1 var out = !tracks.some(function(_ref6) {12864 -1 var actualNode = _ref6.actualNode;12865 -1 return (actualNode.getAttribute('kind') || '').toLowerCase() === 'descriptions';12866 -1 });12867 -1 return out;12868 -1 }12869 -1 return undefined;-1 14846 var hasDescriptions = tracks.some(function(_ref7) { -1 14847 var actualNode = _ref7.actualNode; -1 14848 return (actualNode.getAttribute('kind') || '').toLowerCase() === 'descriptions'; -1 14849 }); -1 14850 return hasDescriptions ? false : undefined; 12870 14851 } 12871 14852 }, { 12872 14853 id: 'frame-tested',12873 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14854 evaluate: function evaluate(node, options, virtualNode, context) { 12874 14855 var resolve = this.async(); 12875 14856 var _Object$assign = Object.assign({ 12876 14857 isViolation: false, @@ -12893,8 +14874,85 @@ module.exports = { 12893 14874 isViolation: false 12894 14875 } 12895 14876 }, { -1 14877 id: 'css-orientation-lock', -1 14878 evaluate: function evaluate(node, options, virtualNode, context) { -1 14879 var _ref8 = context || {}, _ref8$cssom = _ref8.cssom, cssom = _ref8$cssom === undefined ? undefined : _ref8$cssom; -1 14880 if (!cssom || !cssom.length) { -1 14881 return undefined; -1 14882 } -1 14883 var rulesGroupByDocumentFragment = cssom.reduce(function(out, _ref9) { -1 14884 var sheet = _ref9.sheet, root = _ref9.root, shadowId = _ref9.shadowId; -1 14885 var key = shadowId ? shadowId : 'topDocument'; -1 14886 if (!out[key]) { -1 14887 out[key] = { -1 14888 root: root, -1 14889 rules: [] -1 14890 }; -1 14891 } -1 14892 if (!sheet || !sheet.cssRules) { -1 14893 return out; -1 14894 } -1 14895 var rules = Array.from(sheet.cssRules); -1 14896 out[key].rules = out[key].rules.concat(rules); -1 14897 return out; -1 14898 }, {}); -1 14899 var isLocked = false; -1 14900 var relatedElements = []; -1 14901 Object.keys(rulesGroupByDocumentFragment).forEach(function(key) { -1 14902 var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules; -1 14903 var mediaRules = rules.filter(function(r) { -1 14904 return r.type === 4; -1 14905 }); -1 14906 if (!mediaRules || !mediaRules.length) { -1 14907 return; -1 14908 } -1 14909 var orientationRules = mediaRules.filter(function(r) { -1 14910 var cssText = r.cssText; -1 14911 return /orientation:\s+landscape/i.test(cssText) || /orientation:\s+portrait/i.test(cssText); -1 14912 }); -1 14913 if (!orientationRules || !orientationRules.length) { -1 14914 return; -1 14915 } -1 14916 orientationRules.forEach(function(r) { -1 14917 if (!r.cssRules.length) { -1 14918 return; -1 14919 } -1 14920 Array.from(r.cssRules).forEach(function(cssRule) { -1 14921 if (!cssRule.selectorText) { -1 14922 return; -1 14923 } -1 14924 if (cssRule.style.length <= 0) { -1 14925 return; -1 14926 } -1 14927 var transformStyleValue = cssRule.style.transform || false; -1 14928 if (!transformStyleValue) { -1 14929 return; -1 14930 } -1 14931 var rotate = transformStyleValue.match(/rotate\(([^)]+)deg\)/); -1 14932 var deg = parseInt(rotate && rotate[1] || 0); -1 14933 var locked = deg % 90 === 0 && deg % 180 !== 0; -1 14934 if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') { -1 14935 var selector = cssRule.selectorText; -1 14936 var elms = Array.from(root.querySelectorAll(selector)); -1 14937 if (elms && elms.length) { -1 14938 relatedElements = relatedElements.concat(elms); -1 14939 } -1 14940 } -1 14941 isLocked = locked; -1 14942 }); -1 14943 }); -1 14944 }); -1 14945 if (!isLocked) { -1 14946 return true; -1 14947 } -1 14948 if (relatedElements.length) { -1 14949 this.relatedNodes(relatedElements); -1 14950 } -1 14951 return false; -1 14952 } -1 14953 }, { 12896 14954 id: 'meta-viewport-large',12897 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14955 evaluate: function evaluate(node, options, virtualNode, context) { 12898 14956 options = options || {}; 12899 14957 var params, content = node.getAttribute('content') || '', parsedParams = content.split(/[;,]/), result = {}, minimum = options.scaleMinimum || 2, lowerBound = options.lowerBound || false; 12900 14958 for (var i = 0, l = parsedParams.length; i < l; i++) { @@ -12908,9 +14966,11 @@ module.exports = { 12908 14966 return true; 12909 14967 } 12910 14968 if (!lowerBound && result['user-scalable'] === 'no') { -1 14969 this.data('user-scalable=no'); 12911 14970 return false; 12912 14971 } 12913 14972 if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < minimum) { -1 14973 this.data('maximum-scale'); 12914 14974 return false; 12915 14975 } 12916 14976 return true; @@ -12921,7 +14981,7 @@ module.exports = { 12921 14981 } 12922 14982 }, { 12923 14983 id: 'meta-viewport',12924 -1 evaluate: function evaluate(node, options, virtualNode) {-1 14984 evaluate: function evaluate(node, options, virtualNode, context) { 12925 14985 options = options || {}; 12926 14986 var params, content = node.getAttribute('content') || '', parsedParams = content.split(/[;,]/), result = {}, minimum = options.scaleMinimum || 2, lowerBound = options.lowerBound || false; 12927 14987 for (var i = 0, l = parsedParams.length; i < l; i++) { @@ -12935,9 +14995,11 @@ module.exports = { 12935 14995 return true; 12936 14996 } 12937 14997 if (!lowerBound && result['user-scalable'] === 'no') { -1 14998 this.data('user-scalable=no'); 12938 14999 return false; 12939 15000 } 12940 15001 if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < minimum) { -1 15002 this.data('maximum-scale'); 12941 15003 return false; 12942 15004 } 12943 15005 return true; @@ -12947,12 +15009,12 @@ module.exports = { 12947 15009 } 12948 15010 }, { 12949 15011 id: 'header-present',12950 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15012 evaluate: function evaluate(node, options, virtualNode, context) { 12951 15013 return !!axe.utils.querySelectorAll(virtualNode, 'h1, h2, h3, h4, h5, h6, [role="heading"]')[0]; 12952 15014 } 12953 15015 }, { 12954 15016 id: 'heading-order',12955 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15017 evaluate: function evaluate(node, options, virtualNode, context) { 12956 15018 var ariaHeadingLevel = node.getAttribute('aria-level'); 12957 15019 if (ariaHeadingLevel !== null) { 12958 15020 this.data(parseInt(ariaHeadingLevel, 10)); @@ -12980,7 +15042,7 @@ module.exports = { 12980 15042 } 12981 15043 }, { 12982 15044 id: 'internal-link-present',12983 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15045 evaluate: function evaluate(node, options, virtualNode, context) { 12984 15046 var links = axe.utils.querySelectorAll(virtualNode, 'a[href]'); 12985 15047 return links.some(function(vLink) { 12986 15048 return /^#[^/!]/.test(vLink.actualNode.getAttribute('href')); @@ -12988,18 +15050,18 @@ module.exports = { 12988 15050 } 12989 15051 }, { 12990 15052 id: 'landmark',12991 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15053 evaluate: function evaluate(node, options, virtualNode, context) { 12992 15054 return axe.utils.querySelectorAll(virtualNode, 'main, [role="main"]').length > 0; 12993 15055 } 12994 15056 }, { 12995 15057 id: 'meta-refresh',12996 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15058 evaluate: function evaluate(node, options, virtualNode, context) { 12997 15059 var content = node.getAttribute('content') || '', parsedParams = content.split(/[;,]/); 12998 15060 return content === '' || parsedParams[0] === '0'; 12999 15061 } 13000 15062 }, { 13001 15063 id: 'p-as-heading',13002 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15064 evaluate: function evaluate(node, options, virtualNode, context) { 13003 15065 var siblings = Array.from(node.parentNode.children); 13004 15066 var currentIndex = siblings.indexOf(node); 13005 15067 options = options || {}; @@ -13089,8 +15151,8 @@ module.exports = { 13089 15151 } 13090 15152 }, { 13091 15153 id: 'region',13092 -1 evaluate: function evaluate(node, options, virtualNode) {13093 -1 var _axe$commons2 = axe.commons, dom = _axe$commons2.dom, aria = _axe$commons2.aria;-1 15154 evaluate: function evaluate(node, options, virtualNode, context) { -1 15155 var _axe$commons7 = axe.commons, dom = _axe$commons7.dom, aria = _axe$commons7.aria; 13094 15156 function getSkiplink(virtualNode) { 13095 15157 var firstLink = axe.utils.querySelectorAll(virtualNode, 'a[href]')[0]; 13096 15158 if (firstLink && axe.commons.dom.getElementByReference(firstLink.actualNode, 'href')) { @@ -13107,33 +15169,37 @@ module.exports = { 13107 15169 function isSkipLink(vNode) { 13108 15170 return skipLink && skipLink === vNode.actualNode; 13109 15171 }13110 -1 function isLandmark(virtualNode) {-1 15172 function isRegion(virtualNode) { 13111 15173 var node = virtualNode.actualNode;13112 -1 var explictRole = (node.getAttribute('role') || '').trim().toLowerCase();13113 -1 if (explictRole) {13114 -1 if (explictRole === 'form') {13115 -1 return !!aria.labelVirtual(virtualNode);13116 -1 }13117 -1 return landmarkRoles.includes(explictRole);13118 -1 } else {13119 -1 return implicitLandmarks.some(function(implicitSelector) {13120 -1 var matches = axe.utils.matchesSelector(node, implicitSelector);13121 -1 if (node.tagName.toLowerCase() === 'form') {13122 -1 return matches && !!aria.labelVirtual(virtualNode);13123 -1 }13124 -1 return matches;13125 -1 });-1 15174 var explicitRole = axe.commons.aria.getRole(node, { -1 15175 noImplicit: true -1 15176 }); -1 15177 var ariaLive = (node.getAttribute('aria-live') || '').toLowerCase().trim(); -1 15178 if (explicitRole) { -1 15179 return explicitRole === 'dialog' || landmarkRoles.includes(explicitRole); -1 15180 } -1 15181 if ([ 'assertive', 'polite' ].includes(ariaLive)) { -1 15182 return true; 13126 15183 } -1 15184 return implicitLandmarks.some(function(implicitSelector) { -1 15185 var matches = axe.utils.matchesSelector(node, implicitSelector); -1 15186 if (node.tagName.toLowerCase() === 'form') { -1 15187 var titleAttr = node.getAttribute('title'); -1 15188 var title = titleAttr && titleAttr.trim() !== '' ? axe.commons.text.sanitize(titleAttr) : null; -1 15189 return matches && (!!aria.labelVirtual(virtualNode) || !!title); -1 15190 } -1 15191 return matches; -1 15192 }); 13127 15193 } 13128 15194 function findRegionlessElms(virtualNode) { 13129 15195 var node = virtualNode.actualNode;13130 -1 if (isLandmark(virtualNode) || isSkipLink(virtualNode) || !dom.isVisible(node, true)) {-1 15196 if (isRegion(virtualNode) || isSkipLink(virtualNode) || !dom.isVisible(node, true)) { 13131 15197 return []; 13132 15198 } else if (dom.hasContent(node, true)) { 13133 15199 return [ node ]; 13134 15200 } else {13135 -1 return virtualNode.children.filter(function(_ref7) {13136 -1 var actualNode = _ref7.actualNode;-1 15201 return virtualNode.children.filter(function(_ref10) { -1 15202 var actualNode = _ref10.actualNode; 13137 15203 return actualNode.nodeType === 1; 13138 15204 }).map(findRegionlessElms).reduce(function(a, b) { 13139 15205 return a.concat(b); @@ -13149,7 +15215,7 @@ module.exports = { 13149 15215 } 13150 15216 }, { 13151 15217 id: 'skip-link',13152 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15218 evaluate: function evaluate(node, options, virtualNode, context) { 13153 15219 var target = axe.commons.dom.getElementByReference(node, 'href'); 13154 15220 if (target) { 13155 15221 return axe.commons.dom.isVisible(target, true) || undefined; @@ -13158,7 +15224,7 @@ module.exports = { 13158 15224 } 13159 15225 }, { 13160 15226 id: 'unique-frame-title',13161 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15227 evaluate: function evaluate(node, options, virtualNode, context) { 13162 15228 var title = axe.commons.text.sanitize(node.title).trim().toLowerCase(); 13163 15229 this.data(title); 13164 15230 return true; @@ -13174,42 +15240,62 @@ module.exports = { 13174 15240 return results; 13175 15241 } 13176 15242 }, {13177 -1 id: 'aria-label',13178 -1 evaluate: function evaluate(node, options, virtualNode) {13179 -1 var label = node.getAttribute('aria-label');13180 -1 return !!(label ? axe.commons.text.sanitize(label).trim() : '');13181 -1 }13182 -1 }, {13183 -1 id: 'aria-labelledby',13184 -1 evaluate: function evaluate(node, options, virtualNode) {13185 -1 var getIdRefs = axe.commons.dom.idrefs;13186 -1 return getIdRefs(node, 'aria-labelledby').some(function(elm) {13187 -1 return elm && axe.commons.text.accessibleText(elm, true);-1 15243 id: 'duplicate-id-active', -1 15244 evaluate: function evaluate(node, options, virtualNode, context) { -1 15245 var id = node.getAttribute('id').trim(); -1 15246 if (!id) { -1 15247 return true; -1 15248 } -1 15249 var root = axe.commons.dom.getRootNode(node); -1 15250 var matchingNodes = Array.from(root.querySelectorAll('[id="' + axe.commons.utils.escapeSelector(id) + '"]')).filter(function(foundNode) { -1 15251 return foundNode !== node; 13188 15252 });13189 -1 }13190 -1 }, {13191 -1 id: 'button-has-visible-text',13192 -1 evaluate: function evaluate(node, options, virtualNode) {13193 -1 var nodeName = node.nodeName.toUpperCase();13194 -1 var role = node.getAttribute('role');13195 -1 var label = void 0;13196 -1 if (nodeName === 'BUTTON' || role === 'button' && nodeName !== 'INPUT') {13197 -1 label = axe.commons.text.accessibleTextVirtual(virtualNode);13198 -1 this.data(label);13199 -1 return !!label;13200 -1 } else {13201 -1 return false;-1 15253 if (matchingNodes.length) { -1 15254 this.relatedNodes(matchingNodes); 13202 15255 } -1 15256 this.data(id); -1 15257 return matchingNodes.length === 0; -1 15258 }, -1 15259 after: function after(results, options) { -1 15260 var uniqueIds = []; -1 15261 return results.filter(function(r) { -1 15262 if (uniqueIds.indexOf(r.data) === -1) { -1 15263 uniqueIds.push(r.data); -1 15264 return true; -1 15265 } -1 15266 return false; -1 15267 }); 13203 15268 } 13204 15269 }, {13205 -1 id: 'doc-has-title',13206 -1 evaluate: function evaluate(node, options, virtualNode) {13207 -1 var title = document.title;13208 -1 return !!(title ? axe.commons.text.sanitize(title).trim() : '');-1 15270 id: 'duplicate-id-aria', -1 15271 evaluate: function evaluate(node, options, virtualNode, context) { -1 15272 var id = node.getAttribute('id').trim(); -1 15273 if (!id) { -1 15274 return true; -1 15275 } -1 15276 var root = axe.commons.dom.getRootNode(node); -1 15277 var matchingNodes = Array.from(root.querySelectorAll('[id="' + axe.commons.utils.escapeSelector(id) + '"]')).filter(function(foundNode) { -1 15278 return foundNode !== node; -1 15279 }); -1 15280 if (matchingNodes.length) { -1 15281 this.relatedNodes(matchingNodes); -1 15282 } -1 15283 this.data(id); -1 15284 return matchingNodes.length === 0; -1 15285 }, -1 15286 after: function after(results, options) { -1 15287 var uniqueIds = []; -1 15288 return results.filter(function(r) { -1 15289 if (uniqueIds.indexOf(r.data) === -1) { -1 15290 uniqueIds.push(r.data); -1 15291 return true; -1 15292 } -1 15293 return false; -1 15294 }); 13209 15295 } 13210 15296 }, { 13211 15297 id: 'duplicate-id',13212 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15298 evaluate: function evaluate(node, options, virtualNode, context) { 13213 15299 var id = node.getAttribute('id').trim(); 13214 15300 if (!id) { 13215 15301 return true; @@ -13235,35 +15321,69 @@ module.exports = { 13235 15321 }); 13236 15322 } 13237 15323 }, { -1 15324 id: 'aria-label', -1 15325 evaluate: function evaluate(node, options, virtualNode, context) { -1 15326 var label = node.getAttribute('aria-label'); -1 15327 return !!(label ? axe.commons.text.sanitize(label).trim() : ''); -1 15328 } -1 15329 }, { -1 15330 id: 'aria-labelledby', -1 15331 evaluate: function evaluate(node, options, virtualNode, context) { -1 15332 var getIdRefs = axe.commons.dom.idrefs; -1 15333 return getIdRefs(node, 'aria-labelledby').some(function(elm) { -1 15334 return elm && axe.commons.text.accessibleText(elm, true); -1 15335 }); -1 15336 } -1 15337 }, { -1 15338 id: 'button-has-visible-text', -1 15339 evaluate: function evaluate(node, options, virtualNode, context) { -1 15340 var nodeName = node.nodeName.toUpperCase(); -1 15341 var role = node.getAttribute('role'); -1 15342 var label = void 0; -1 15343 if (nodeName === 'BUTTON' || role === 'button' && nodeName !== 'INPUT') { -1 15344 label = axe.commons.text.accessibleTextVirtual(virtualNode); -1 15345 this.data(label); -1 15346 return !!label; -1 15347 } else { -1 15348 return false; -1 15349 } -1 15350 } -1 15351 }, { -1 15352 id: 'doc-has-title', -1 15353 evaluate: function evaluate(node, options, virtualNode, context) { -1 15354 var title = document.title; -1 15355 return !!(title ? axe.commons.text.sanitize(title).trim() : ''); -1 15356 } -1 15357 }, { 13238 15358 id: 'exists',13239 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15359 evaluate: function evaluate(node, options, virtualNode, context) { 13240 15360 return true; 13241 15361 } 13242 15362 }, { 13243 15363 id: 'has-alt',13244 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15364 evaluate: function evaluate(node, options, virtualNode, context) { 13245 15365 var nn = node.nodeName.toLowerCase(); 13246 15366 return node.hasAttribute('alt') && (nn === 'img' || nn === 'input' || nn === 'area'); 13247 15367 } 13248 15368 }, { 13249 15369 id: 'has-visible-text',13250 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15370 evaluate: function evaluate(node, options, virtualNode, context) { 13251 15371 return axe.commons.text.accessibleTextVirtual(virtualNode).length > 0; 13252 15372 } 13253 15373 }, { 13254 15374 id: 'is-on-screen',13255 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15375 evaluate: function evaluate(node, options, virtualNode, context) { 13256 15376 return axe.commons.dom.isVisible(node, false) && !axe.commons.dom.isOffscreen(node); 13257 15377 } 13258 15378 }, { 13259 15379 id: 'non-empty-alt',13260 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15380 evaluate: function evaluate(node, options, virtualNode, context) { 13261 15381 var label = node.getAttribute('alt'); 13262 15382 return !!(label ? axe.commons.text.sanitize(label).trim() : ''); 13263 15383 } 13264 15384 }, { 13265 15385 id: 'non-empty-if-present',13266 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15386 evaluate: function evaluate(node, options, virtualNode, context) { 13267 15387 var nodeName = node.nodeName.toUpperCase(); 13268 15388 var type = (node.getAttribute('type') || '').toLowerCase(); 13269 15389 var label = node.getAttribute('value'); @@ -13275,29 +15395,29 @@ module.exports = { 13275 15395 } 13276 15396 }, { 13277 15397 id: 'non-empty-title',13278 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15398 evaluate: function evaluate(node, options, virtualNode, context) { 13279 15399 var title = node.getAttribute('title'); 13280 15400 return !!(title ? axe.commons.text.sanitize(title).trim() : ''); 13281 15401 } 13282 15402 }, { 13283 15403 id: 'non-empty-value',13284 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15404 evaluate: function evaluate(node, options, virtualNode, context) { 13285 15405 var label = node.getAttribute('value'); 13286 15406 return !!(label ? axe.commons.text.sanitize(label).trim() : ''); 13287 15407 } 13288 15408 }, { 13289 15409 id: 'role-none',13290 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15410 evaluate: function evaluate(node, options, virtualNode, context) { 13291 15411 return node.getAttribute('role') === 'none'; 13292 15412 } 13293 15413 }, { 13294 15414 id: 'role-presentation',13295 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15415 evaluate: function evaluate(node, options, virtualNode, context) { 13296 15416 return node.getAttribute('role') === 'presentation'; 13297 15417 } 13298 15418 }, { 13299 15419 id: 'caption-faked',13300 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15420 evaluate: function evaluate(node, options, virtualNode, context) { 13301 15421 var table = axe.commons.table.toGrid(node); 13302 15422 var firstRow = table[0]; 13303 15423 if (table.length <= 1 || firstRow.length <= 1 || node.rows.length <= 1) { @@ -13309,17 +15429,17 @@ module.exports = { 13309 15429 } 13310 15430 }, { 13311 15431 id: 'has-caption',13312 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15432 evaluate: function evaluate(node, options, virtualNode, context) { 13313 15433 return !!node.caption; 13314 15434 } 13315 15435 }, { 13316 15436 id: 'has-summary',13317 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15437 evaluate: function evaluate(node, options, virtualNode, context) { 13318 15438 return !!node.summary; 13319 15439 } 13320 15440 }, { 13321 15441 id: 'has-th',13322 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15442 evaluate: function evaluate(node, options, virtualNode, context) { 13323 15443 var row, cell, badCells = []; 13324 15444 for (var rowIndex = 0, rowLength = node.rows.length; rowIndex < rowLength; rowIndex++) { 13325 15445 row = node.rows[rowIndex]; @@ -13338,7 +15458,7 @@ module.exports = { 13338 15458 } 13339 15459 }, { 13340 15460 id: 'html5-scope',13341 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15461 evaluate: function evaluate(node, options, virtualNode, context) { 13342 15462 if (!axe.commons.dom.isHTML5(document)) { 13343 15463 return true; 13344 15464 } @@ -13346,12 +15466,12 @@ module.exports = { 13346 15466 } 13347 15467 }, { 13348 15468 id: 'same-caption-summary',13349 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15469 evaluate: function evaluate(node, options, virtualNode, context) { 13350 15470 return !!(node.summary && node.caption) && node.summary.toLowerCase() === axe.commons.text.accessibleText(node.caption).toLowerCase(); 13351 15471 } 13352 15472 }, { 13353 15473 id: 'scope-value',13354 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15474 evaluate: function evaluate(node, options, virtualNode, context) { 13355 15475 options = options || {}; 13356 15476 var value = node.getAttribute('scope').toLowerCase(); 13357 15477 var validVals = [ 'row', 'col', 'rowgroup', 'colgroup' ] || options.values; @@ -13359,7 +15479,7 @@ module.exports = { 13359 15479 } 13360 15480 }, { 13361 15481 id: 'td-has-header',13362 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15482 evaluate: function evaluate(node, options, virtualNode, context) { 13363 15483 var tableUtils = axe.commons.table; 13364 15484 var badCells = []; 13365 15485 var cells = tableUtils.getAllCells(node); @@ -13381,7 +15501,7 @@ module.exports = { 13381 15501 } 13382 15502 }, { 13383 15503 id: 'td-headers-attr',13384 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15504 evaluate: function evaluate(node, options, virtualNode, context) { 13385 15505 var cells = []; 13386 15506 for (var rowIndex = 0, rowLength = node.rows.length; rowIndex < rowLength; rowIndex++) { 13387 15507 var row = node.rows[rowIndex]; @@ -13426,7 +15546,7 @@ module.exports = { 13426 15546 } 13427 15547 }, { 13428 15548 id: 'th-has-data-cells',13429 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15549 evaluate: function evaluate(node, options, virtualNode, context) { 13430 15550 var tableUtils = axe.commons.table; 13431 15551 var cells = tableUtils.getAllCells(node); 13432 15552 var checkResult = this; @@ -13473,7 +15593,7 @@ module.exports = { 13473 15593 } 13474 15594 }, { 13475 15595 id: 'hidden-content',13476 -1 evaluate: function evaluate(node, options, virtualNode) {-1 15596 evaluate: function evaluate(node, options, virtualNode, context) { 13477 15597 var whitelist = [ 'SCRIPT', 'HEAD', 'TITLE', 'NOSCRIPT', 'STYLE', 'TEMPLATE' ]; 13478 15598 if (!whitelist.includes(node.tagName.toUpperCase()) && axe.commons.dom.hasContentVirtual(virtualNode)) { 13479 15599 var styles = window.getComputedStyle(node); @@ -13573,8 +15693,7 @@ module.exports = { 13573 15693 type: 'string' 13574 15694 }, 13575 15695 'aria-labelledby': {13576 -1 type: 'idrefs',13577 -1 values: [ '' ]-1 15696 type: 'idrefs' 13578 15697 }, 13579 15698 'aria-level': { 13580 15699 type: 'int' @@ -13658,414 +15777,571 @@ module.exports = { 13658 15777 } 13659 15778 }; 13660 15779 lookupTable.globalAttributes = [ 'aria-atomic', 'aria-busy', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-disabled', 'aria-dropeffect', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant' ]; -1 15780 var elementConditions = { -1 15781 CANNOT_HAVE_LIST_ATTRIBUTE: function CANNOT_HAVE_LIST_ATTRIBUTE(node) { -1 15782 var nodeAttrs = Array.from(node.attributes).map(function(a) { -1 15783 return a.name.toUpperCase(); -1 15784 }); -1 15785 if (nodeAttrs.includes('LIST')) { -1 15786 return false; -1 15787 } -1 15788 return true; -1 15789 }, -1 15790 CANNOT_HAVE_HREF_ATTRIBUTE: function CANNOT_HAVE_HREF_ATTRIBUTE(node) { -1 15791 var nodeAttrs = Array.from(node.attributes).map(function(a) { -1 15792 return a.name.toUpperCase(); -1 15793 }); -1 15794 if (nodeAttrs.includes('HREF')) { -1 15795 return false; -1 15796 } -1 15797 return true; -1 15798 }, -1 15799 MUST_HAVE_HREF_ATTRIBUTE: function MUST_HAVE_HREF_ATTRIBUTE(node) { -1 15800 if (!node.href) { -1 15801 return false; -1 15802 } -1 15803 return true; -1 15804 }, -1 15805 MUST_HAVE_SIZE_ATTRIBUTE_WITH_VALUE_GREATER_THAN_1: function MUST_HAVE_SIZE_ATTRIBUTE_WITH_VALUE_GREATER_THAN_1(node) { -1 15806 var attr = 'SIZE'; -1 15807 var nodeAttrs = Array.from(node.attributes).map(function(a) { -1 15808 return a.name.toUpperCase(); -1 15809 }); -1 15810 if (!nodeAttrs.includes(attr)) { -1 15811 return false; -1 15812 } -1 15813 return Number(node.getAttribute(attr)) > 1; -1 15814 }, -1 15815 MUST_HAVE_ALT_ATTRIBUTE: function MUST_HAVE_ALT_ATTRIBUTE(node) { -1 15816 var attr = 'ALT'; -1 15817 var nodeAttrs = Array.from(node.attributes).map(function(a) { -1 15818 return a.name.toUpperCase(); -1 15819 }); -1 15820 if (!nodeAttrs.includes(attr)) { -1 15821 return false; -1 15822 } -1 15823 return true; -1 15824 }, -1 15825 MUST_HAVE_ALT_ATTRIBUTE_WITH_VALUE: function MUST_HAVE_ALT_ATTRIBUTE_WITH_VALUE(node) { -1 15826 var attr = 'ALT'; -1 15827 var nodeAttrs = Array.from(node.attributes).map(function(a) { -1 15828 return a.name.toUpperCase(); -1 15829 }); -1 15830 if (!nodeAttrs.includes(attr)) { -1 15831 return false; -1 15832 } -1 15833 var attrValue = node.getAttribute(attr); -1 15834 return attrValue && attrValue.length > 0; -1 15835 } -1 15836 }; 13661 15837 lookupTable.role = { 13662 15838 alert: { 13663 15839 type: 'widget', 13664 15840 attributes: {13665 -1 allowed: [ 'aria-expanded' ]-1 15841 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13666 15842 }, 13667 15843 owned: null, 13668 15844 nameFrom: [ 'author' ],13669 -1 context: null-1 15845 context: null, -1 15846 unsupported: false, -1 15847 allowedElements: [ 'SECTION' ] 13670 15848 }, 13671 15849 alertdialog: { 13672 15850 type: 'widget', 13673 15851 attributes: {13674 -1 allowed: [ 'aria-expanded', 'aria-modal' ]-1 15852 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ] 13675 15853 }, 13676 15854 owned: null, 13677 15855 nameFrom: [ 'author' ],13678 -1 context: null-1 15856 context: null, -1 15857 unsupported: false, -1 15858 allowedElements: [ 'DIALOG', 'SECTION' ] 13679 15859 }, 13680 15860 application: { 13681 15861 type: 'landmark', 13682 15862 attributes: {13683 -1 allowed: [ 'aria-expanded' ]-1 15863 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13684 15864 }, 13685 15865 owned: null, 13686 15866 nameFrom: [ 'author' ],13687 -1 context: null-1 15867 context: null, -1 15868 unsupported: false, -1 15869 allowedElements: [ 'ARTICLE', 'AUDIO', 'EMBED', 'IFRAME', 'OBJECT', 'SECTION', 'SVG', 'VIDEO' ] 13688 15870 }, 13689 15871 article: { 13690 15872 type: 'structure', 13691 15873 attributes: {13692 -1 allowed: [ 'aria-expanded', 'aria-posinset', 'aria-setsize' ]-1 15874 allowed: [ 'aria-expanded', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] 13693 15875 }, 13694 15876 owned: null, 13695 15877 nameFrom: [ 'author' ], 13696 15878 context: null,13697 -1 implicit: [ 'article' ]-1 15879 implicit: [ 'article' ], -1 15880 unsupported: false 13698 15881 }, 13699 15882 banner: { 13700 15883 type: 'landmark', 13701 15884 attributes: {13702 -1 allowed: [ 'aria-expanded' ]-1 15885 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13703 15886 }, 13704 15887 owned: null, 13705 15888 nameFrom: [ 'author' ], 13706 15889 context: null,13707 -1 implicit: [ 'header' ]-1 15890 implicit: [ 'header' ], -1 15891 unsupported: false, -1 15892 allowedElements: [ 'SECTION' ] 13708 15893 }, 13709 15894 button: { 13710 15895 type: 'widget', 13711 15896 attributes: {13712 -1 allowed: [ 'aria-expanded', 'aria-pressed' ]-1 15897 allowed: [ 'aria-expanded', 'aria-pressed', 'aria-errormessage' ] 13713 15898 }, 13714 15899 owned: null, 13715 15900 nameFrom: [ 'author', 'contents' ], 13716 15901 context: null,13717 -1 implicit: [ 'button', 'input[type="button"]', 'input[type="image"]', 'input[type="reset"]', 'input[type="submit"]', 'summary' ]-1 15902 implicit: [ 'button', 'input[type="button"]', 'input[type="image"]', 'input[type="reset"]', 'input[type="submit"]', 'summary' ], -1 15903 unsupported: false, -1 15904 allowedElements: [ { -1 15905 tagName: 'A', -1 15906 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 15907 } ] 13718 15908 }, 13719 15909 cell: { 13720 15910 type: 'structure', 13721 15911 attributes: {13722 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan' ]-1 15912 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-errormessage' ] 13723 15913 }, 13724 15914 owned: null, 13725 15915 nameFrom: [ 'author', 'contents' ], 13726 15916 context: [ 'row' ],13727 -1 implicit: [ 'td', 'th' ]-1 15917 implicit: [ 'td', 'th' ], -1 15918 unsupported: false 13728 15919 }, 13729 15920 checkbox: { 13730 15921 type: 'widget', 13731 15922 attributes: {13732 -1 allowed: [ 'aria-checked', 'aria-required' ]-1 15923 allowed: [ 'aria-checked', 'aria-required', 'aria-readonly', 'aria-errormessage' ] 13733 15924 }, 13734 15925 owned: null, 13735 15926 nameFrom: [ 'author', 'contents' ], 13736 15927 context: null,13737 -1 implicit: [ 'input[type="checkbox"]' ]-1 15928 implicit: [ 'input[type="checkbox"]' ], -1 15929 unsupported: false, -1 15930 allowedElements: [ 'BUTTON' ] 13738 15931 }, 13739 15932 columnheader: { 13740 15933 type: 'structure', 13741 15934 attributes: {13742 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort' ]-1 15935 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ] 13743 15936 }, 13744 15937 owned: null, 13745 15938 nameFrom: [ 'author', 'contents' ], 13746 15939 context: [ 'row' ],13747 -1 implicit: [ 'th' ]-1 15940 implicit: [ 'th' ], -1 15941 unsupported: false 13748 15942 }, 13749 15943 combobox: { 13750 15944 type: 'composite', 13751 15945 attributes: {13752 -1 allowed: [ 'aria-expanded', 'aria-autocomplete', 'aria-required', 'aria-activedescendant', 'aria-orientation' ]-1 15946 allowed: [ 'aria-autocomplete', 'aria-required', 'aria-activedescendant', 'aria-orientation', 'aria-errormessage' ], -1 15947 required: [ 'aria-expanded' ] 13753 15948 }, 13754 15949 owned: { 13755 15950 all: [ 'listbox', 'textbox' ] 13756 15951 }, 13757 15952 nameFrom: [ 'author' ],13758 -1 context: null-1 15953 context: null, -1 15954 unsupported: false, -1 15955 allowedElements: [ { -1 15956 tagName: 'INPUT', -1 15957 attributes: { -1 15958 TYPE: 'TEXT' -1 15959 } -1 15960 } ] 13759 15961 }, 13760 15962 command: { 13761 15963 nameFrom: [ 'author' ],13762 -1 type: 'abstract'-1 15964 type: 'abstract', -1 15965 unsupported: false 13763 15966 }, 13764 15967 complementary: { 13765 15968 type: 'landmark', 13766 15969 attributes: {13767 -1 allowed: [ 'aria-expanded' ]-1 15970 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13768 15971 }, 13769 15972 owned: null, 13770 15973 nameFrom: [ 'author' ], 13771 15974 context: null,13772 -1 implicit: [ 'aside' ]-1 15975 implicit: [ 'aside' ], -1 15976 unsupported: false, -1 15977 allowedElements: [ 'SECTION' ] 13773 15978 }, 13774 15979 composite: { 13775 15980 nameFrom: [ 'author' ],13776 -1 type: 'abstract'-1 15981 type: 'abstract', -1 15982 unsupported: false 13777 15983 }, 13778 15984 contentinfo: { 13779 15985 type: 'landmark', 13780 15986 attributes: {13781 -1 allowed: [ 'aria-expanded' ]-1 15987 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13782 15988 }, 13783 15989 owned: null, 13784 15990 nameFrom: [ 'author' ], 13785 15991 context: null,13786 -1 implicit: [ 'footer' ]-1 15992 implicit: [ 'footer' ], -1 15993 unsupported: false, -1 15994 allowedElements: [ 'SECTION' ] 13787 15995 }, 13788 15996 definition: { 13789 15997 type: 'structure', 13790 15998 attributes: {13791 -1 allowed: [ 'aria-expanded' ]-1 15999 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13792 16000 }, 13793 16001 owned: null, 13794 16002 nameFrom: [ 'author' ], 13795 16003 context: null,13796 -1 implicit: [ 'dd', 'dfn' ]-1 16004 implicit: [ 'dd', 'dfn' ], -1 16005 unsupported: false 13797 16006 }, 13798 16007 dialog: { 13799 16008 type: 'widget', 13800 16009 attributes: {13801 -1 allowed: [ 'aria-expanded', 'aria-modal' ]-1 16010 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ] 13802 16011 }, 13803 16012 owned: null, 13804 16013 nameFrom: [ 'author' ], 13805 16014 context: null,13806 -1 implicit: [ 'dialog' ]-1 16015 implicit: [ 'dialog' ], -1 16016 unsupported: false, -1 16017 allowedElements: [ 'SECTION' ] 13807 16018 }, 13808 16019 directory: { 13809 16020 type: 'structure', 13810 16021 attributes: {13811 -1 allowed: [ 'aria-expanded' ]-1 16022 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13812 16023 }, 13813 16024 owned: null, 13814 16025 nameFrom: [ 'author', 'contents' ],13815 -1 context: null-1 16026 context: null, -1 16027 unsupported: false, -1 16028 allowedElements: [ 'OL', 'UL' ] 13816 16029 }, 13817 16030 document: { 13818 16031 type: 'structure', 13819 16032 attributes: {13820 -1 allowed: [ 'aria-expanded' ]-1 16033 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13821 16034 }, 13822 16035 owned: null, 13823 16036 nameFrom: [ 'author' ], 13824 16037 context: null,13825 -1 implicit: [ 'body' ]-1 16038 implicit: [ 'body' ], -1 16039 unsupported: false, -1 16040 allowedElements: [ 'ARTICLE', 'EMBED', 'IFRAME', 'SECTION', 'SVG', 'OBJECT' ] 13826 16041 }, 13827 16042 'doc-abstract': { 13828 16043 type: 'section', 13829 16044 attributes: {13830 -1 allowed: [ 'aria-expanded' ]-1 16045 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13831 16046 }, 13832 16047 owned: null, 13833 16048 nameFrom: [ 'author' ],13834 -1 context: null-1 16049 context: null, -1 16050 unsupported: false, -1 16051 allowedElements: [ 'SECTION' ] 13835 16052 }, 13836 16053 'doc-acknowledgments': { 13837 16054 type: 'landmark', 13838 16055 attributes: {13839 -1 allowed: [ 'aria-expanded' ]-1 16056 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13840 16057 }, 13841 16058 owned: null, 13842 16059 nameFrom: [ 'author' ],13843 -1 context: null-1 16060 context: null, -1 16061 unsupported: false, -1 16062 allowedElements: [ 'SECTION' ] 13844 16063 }, 13845 16064 'doc-afterword': { 13846 16065 type: 'landmark', 13847 16066 attributes: {13848 -1 allowed: [ 'aria-expanded' ]-1 16067 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13849 16068 }, 13850 16069 owned: null, 13851 16070 nameFrom: [ 'author' ],13852 -1 context: null-1 16071 context: null, -1 16072 unsupported: false, -1 16073 allowedElements: [ 'SECTION' ] 13853 16074 }, 13854 16075 'doc-appendix': { 13855 16076 type: 'landmark', 13856 16077 attributes: {13857 -1 allowed: [ 'aria-expanded' ]-1 16078 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13858 16079 }, 13859 16080 owned: null, 13860 16081 nameFrom: [ 'author' ],13861 -1 context: null-1 16082 context: null, -1 16083 unsupported: false, -1 16084 allowedElements: [ 'SECTION' ] 13862 16085 }, 13863 16086 'doc-backlink': { 13864 16087 type: 'link', 13865 16088 attributes: {13866 -1 allowed: [ 'aria-expanded' ]-1 16089 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13867 16090 }, 13868 16091 owned: null, 13869 16092 nameFrom: [ 'author', 'contents' ],13870 -1 context: null-1 16093 context: null, -1 16094 unsupported: false, -1 16095 allowedElements: [ { -1 16096 tagName: 'A', -1 16097 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16098 } ] 13871 16099 }, 13872 16100 'doc-biblioentry': { 13873 16101 type: 'listitem', 13874 16102 attributes: {13875 -1 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ]-1 16103 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] 13876 16104 }, 13877 16105 owned: null, 13878 16106 nameFrom: [ 'author' ],13879 -1 context: [ 'doc-bibliography' ]-1 16107 context: [ 'doc-bibliography' ], -1 16108 unsupported: false, -1 16109 allowedElements: [ 'LI' ] 13880 16110 }, 13881 16111 'doc-bibliography': { 13882 16112 type: 'landmark', 13883 16113 attributes: {13884 -1 allowed: [ 'aria-expanded' ]-1 16114 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13885 16115 }, 13886 16116 owned: null, 13887 16117 nameFrom: [ 'author' ],13888 -1 context: null-1 16118 context: null, -1 16119 unsupported: false, -1 16120 allowedElements: [ 'SECTION' ] 13889 16121 }, 13890 16122 'doc-biblioref': { 13891 16123 type: 'link', 13892 16124 attributes: {13893 -1 allowed: [ 'aria-expanded' ]-1 16125 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13894 16126 }, 13895 16127 owned: null, 13896 16128 nameFrom: [ 'author', 'contents' ],13897 -1 context: null-1 16129 context: null, -1 16130 unsupported: false, -1 16131 allowedElements: [ { -1 16132 tagName: 'A', -1 16133 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16134 } ] 13898 16135 }, 13899 16136 'doc-chapter': { 13900 16137 type: 'landmark', 13901 16138 attributes: {13902 -1 allowed: [ 'aria-expanded' ]-1 16139 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13903 16140 }, 13904 16141 owned: null, 13905 16142 namefrom: [ 'author' ],13906 -1 context: null-1 16143 context: null, -1 16144 unsupported: false, -1 16145 allowedElements: [ 'SECTION' ] 13907 16146 }, 13908 16147 'doc-colophon': { 13909 16148 type: 'section', 13910 16149 attributes: {13911 -1 allowed: [ 'aria-expanded' ]-1 16150 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13912 16151 }, 13913 16152 owned: null, 13914 16153 namefrom: [ 'author' ],13915 -1 context: null-1 16154 context: null, -1 16155 unsupported: false, -1 16156 allowedElements: [ 'SECTION' ] 13916 16157 }, 13917 16158 'doc-conclusion': { 13918 16159 type: 'landmark', 13919 16160 attributes: {13920 -1 allowed: [ 'aria-expanded' ]-1 16161 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13921 16162 }, 13922 16163 owned: null, 13923 16164 namefrom: [ 'author' ],13924 -1 context: null-1 16165 context: null, -1 16166 unsupported: false, -1 16167 allowedElements: [ 'SECTION' ] 13925 16168 }, 13926 16169 'doc-cover': { 13927 16170 type: 'img', 13928 16171 attributes: {13929 -1 allowed: [ 'aria-expanded' ]-1 16172 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13930 16173 }, 13931 16174 owned: null, 13932 16175 namefrom: [ 'author' ],13933 -1 context: null-1 16176 context: null, -1 16177 unsupported: false 13934 16178 }, 13935 16179 'doc-credit': { 13936 16180 type: 'section', 13937 16181 attributes: {13938 -1 allowed: [ 'aria-expanded' ]-1 16182 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13939 16183 }, 13940 16184 owned: null, 13941 16185 namefrom: [ 'author' ],13942 -1 context: null-1 16186 context: null, -1 16187 unsupported: false, -1 16188 allowedElements: [ 'SECTION' ] 13943 16189 }, 13944 16190 'doc-credits': { 13945 16191 type: 'landmark', 13946 16192 attributes: {13947 -1 allowed: [ 'aria-expanded' ]-1 16193 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13948 16194 }, 13949 16195 owned: null, 13950 16196 namefrom: [ 'author' ],13951 -1 context: null-1 16197 context: null, -1 16198 unsupported: false, -1 16199 allowedElements: [ 'SECTION' ] 13952 16200 }, 13953 16201 'doc-dedication': { 13954 16202 type: 'section', 13955 16203 attributes: {13956 -1 allowed: [ 'aria-expanded' ]-1 16204 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13957 16205 }, 13958 16206 owned: null, 13959 16207 namefrom: [ 'author' ],13960 -1 context: null-1 16208 context: null, -1 16209 unsupported: false, -1 16210 allowedElements: [ 'SECTION' ] 13961 16211 }, 13962 16212 'doc-endnote': { 13963 16213 type: 'listitem', 13964 16214 attributes: {13965 -1 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ]-1 16215 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] 13966 16216 }, 13967 16217 owned: null, 13968 16218 namefrom: [ 'author' ],13969 -1 context: [ 'doc-endnotes' ]-1 16219 context: [ 'doc-endnotes' ], -1 16220 unsupported: false, -1 16221 allowedElements: [ 'LI' ] 13970 16222 }, 13971 16223 'doc-endnotes': { 13972 16224 type: 'landmark', 13973 16225 attributes: {13974 -1 allowed: [ 'aria-expanded' ]-1 16226 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13975 16227 }, 13976 16228 owned: [ 'doc-endnote' ], 13977 16229 namefrom: [ 'author' ],13978 -1 context: null-1 16230 context: null, -1 16231 unsupported: false, -1 16232 allowedElements: [ 'SECTION' ] 13979 16233 }, 13980 16234 'doc-epigraph': { 13981 16235 type: 'section', 13982 16236 attributes: {13983 -1 allowed: [ 'aria-expanded' ]-1 16237 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13984 16238 }, 13985 16239 owned: null, 13986 16240 namefrom: [ 'author' ],13987 -1 context: null-1 16241 context: null, -1 16242 unsupported: false 13988 16243 }, 13989 16244 'doc-epilogue': { 13990 16245 type: 'landmark', 13991 16246 attributes: {13992 -1 allowed: [ 'aria-expanded' ]-1 16247 allowed: [ 'aria-expanded', 'aria-errormessage' ] 13993 16248 }, 13994 16249 owned: null, 13995 16250 namefrom: [ 'author' ],13996 -1 context: null-1 16251 context: null, -1 16252 unsupported: false, -1 16253 allowedElements: [ 'SECTION' ] 13997 16254 }, 13998 16255 'doc-errata': { 13999 16256 type: 'landmark', 14000 16257 attributes: {14001 -1 allowed: [ 'aria-expanded' ]-1 16258 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14002 16259 }, 14003 16260 owned: null, 14004 16261 namefrom: [ 'author' ],14005 -1 context: null-1 16262 context: null, -1 16263 unsupported: false, -1 16264 allowedElements: [ 'SECTION' ] 14006 16265 }, 14007 16266 'doc-example': { 14008 16267 type: 'section', 14009 16268 attributes: {14010 -1 allowed: [ 'aria-expanded' ]-1 16269 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14011 16270 }, 14012 16271 owned: null, 14013 16272 namefrom: [ 'author' ],14014 -1 context: null-1 16273 context: null, -1 16274 unsupported: false, -1 16275 allowedElements: [ 'ASIDE', 'SECTION' ] 14015 16276 }, 14016 16277 'doc-footnote': { 14017 16278 type: 'section', 14018 16279 attributes: {14019 -1 allowed: [ 'aria-expanded' ]-1 16280 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14020 16281 }, 14021 16282 owned: null, 14022 16283 namefrom: [ 'author' ],14023 -1 context: null-1 16284 context: null, -1 16285 unsupported: false, -1 16286 allowedElements: [ 'ASIDE', 'FOOTER', 'HEADER' ] 14024 16287 }, 14025 16288 'doc-foreword': { 14026 16289 type: 'landmark', 14027 16290 attributes: {14028 -1 allowed: [ 'aria-expanded' ]-1 16291 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14029 16292 }, 14030 16293 owned: null, 14031 16294 namefrom: [ 'author' ],14032 -1 context: null-1 16295 context: null, -1 16296 unsupported: false, -1 16297 allowedElements: [ 'SECTION' ] 14033 16298 }, 14034 16299 'doc-glossary': { 14035 16300 type: 'landmark', 14036 16301 attributes: {14037 -1 allowed: [ 'aria-expanded' ]-1 16302 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14038 16303 }, 14039 16304 owned: [ 'term', 'definition' ], 14040 16305 namefrom: [ 'author' ],14041 -1 context: null-1 16306 context: null, -1 16307 unsupported: false, -1 16308 allowedElements: [ 'DL' ] 14042 16309 }, 14043 16310 'doc-glossref': { 14044 16311 type: 'link', 14045 16312 attributes: {14046 -1 allowed: [ 'aria-expanded' ]-1 16313 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14047 16314 }, 14048 16315 owned: null, 14049 16316 namefrom: [ 'author', 'contents' ],14050 -1 context: null-1 16317 context: null, -1 16318 unsupported: false, -1 16319 allowedElements: [ { -1 16320 tagName: 'A', -1 16321 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16322 } ] 14051 16323 }, 14052 16324 'doc-index': { 14053 16325 type: 'navigation', 14054 16326 attributes: {14055 -1 allowed: [ 'aria-expanded' ]-1 16327 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14056 16328 }, 14057 16329 owned: null, 14058 16330 namefrom: [ 'author' ],14059 -1 context: null-1 16331 context: null, -1 16332 unsupported: false, -1 16333 allowedElements: [ 'NAV', 'SECTION' ] 14060 16334 }, 14061 16335 'doc-introduction': { 14062 16336 type: 'landmark', 14063 16337 attributes: {14064 -1 allowed: [ 'aria-expanded' ]-1 16338 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14065 16339 }, 14066 16340 owned: null, 14067 16341 namefrom: [ 'author' ],14068 -1 context: null-1 16342 context: null, -1 16343 unsupported: false, -1 16344 allowedElements: [ 'SECTION' ] 14069 16345 }, 14070 16346 'doc-noteref': { 14071 16347 type: 'link', @@ -14074,7 +16350,12 @@ module.exports = { 14074 16350 }, 14075 16351 owned: null, 14076 16352 namefrom: [ 'author', 'contents' ],14077 -1 context: null-1 16353 context: null, -1 16354 unsupported: false, -1 16355 allowedElements: [ { -1 16356 tagName: 'A', -1 16357 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16358 } ] 14078 16359 }, 14079 16360 'doc-notice': { 14080 16361 type: 'note', @@ -14083,7 +16364,9 @@ module.exports = { 14083 16364 }, 14084 16365 owned: null, 14085 16366 namefrom: [ 'author' ],14086 -1 context: null-1 16367 context: null, -1 16368 unsupported: false, -1 16369 allowedElements: [ 'SECTION' ] 14087 16370 }, 14088 16371 'doc-pagebreak': { 14089 16372 type: 'separator', @@ -14092,7 +16375,9 @@ module.exports = { 14092 16375 }, 14093 16376 owned: null, 14094 16377 namefrom: [ 'author' ],14095 -1 context: null-1 16378 context: null, -1 16379 unsupported: false, -1 16380 allowedElements: [ 'HR' ] 14096 16381 }, 14097 16382 'doc-pagelist': { 14098 16383 type: 'navigation', @@ -14101,7 +16386,9 @@ module.exports = { 14101 16386 }, 14102 16387 owned: null, 14103 16388 namefrom: [ 'author' ],14104 -1 context: null-1 16389 context: null, -1 16390 unsupported: false, -1 16391 allowedElements: [ 'NAV', 'SECTION' ] 14105 16392 }, 14106 16393 'doc-part': { 14107 16394 type: 'landmark', @@ -14110,7 +16397,9 @@ module.exports = { 14110 16397 }, 14111 16398 owned: null, 14112 16399 namefrom: [ 'author' ],14113 -1 context: null-1 16400 context: null, -1 16401 unsupported: false, -1 16402 allowedElements: [ 'SECTION' ] 14114 16403 }, 14115 16404 'doc-preface': { 14116 16405 type: 'landmark', @@ -14119,16 +16408,20 @@ module.exports = { 14119 16408 }, 14120 16409 owned: null, 14121 16410 namefrom: [ 'author' ],14122 -1 context: null-1 16411 context: null, -1 16412 unsupported: false, -1 16413 allowedElements: [ 'SECTION' ] 14123 16414 }, 14124 16415 'doc-prologue': { 14125 16416 type: 'landmark', 14126 16417 attributes: {14127 -1 allowed: [ 'aria-expanded' ]-1 16418 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14128 16419 }, 14129 16420 owned: null, 14130 16421 namefrom: [ 'author' ],14131 -1 context: null-1 16422 context: null, -1 16423 unsupported: false, -1 16424 allowedElements: [ 'SECTION' ] 14132 16425 }, 14133 16426 'doc-pullquote': { 14134 16427 type: 'none', @@ -14137,7 +16430,9 @@ module.exports = { 14137 16430 }, 14138 16431 owned: null, 14139 16432 namefrom: [ 'author' ],14140 -1 context: null-1 16433 context: null, -1 16434 unsupported: false, -1 16435 allowedElements: [ 'ASIDE', 'SECTION' ] 14141 16436 }, 14142 16437 'doc-qna': { 14143 16438 type: 'section', @@ -14146,7 +16441,9 @@ module.exports = { 14146 16441 }, 14147 16442 owned: null, 14148 16443 namefrom: [ 'author' ],14149 -1 context: null-1 16444 context: null, -1 16445 unsupported: false, -1 16446 allowedElements: [ 'SECTION' ] 14150 16447 }, 14151 16448 'doc-subtitle': { 14152 16449 type: 'sectionhead', @@ -14155,7 +16452,9 @@ module.exports = { 14155 16452 }, 14156 16453 owned: null, 14157 16454 namefrom: [ 'author' ],14158 -1 context: null-1 16455 context: null, -1 16456 unsupported: false, -1 16457 allowedElements: [ 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ] 14159 16458 }, 14160 16459 'doc-tip': { 14161 16460 type: 'note', @@ -14164,584 +16463,1021 @@ module.exports = { 14164 16463 }, 14165 16464 owned: null, 14166 16465 namefrom: [ 'author' ],14167 -1 context: null-1 16466 context: null, -1 16467 unsupported: false, -1 16468 allowedElements: [ 'ASIDE' ] 14168 16469 }, 14169 16470 'doc-toc': { 14170 16471 type: 'navigation', 14171 16472 attributes: {14172 -1 allowed: [ 'aria-expanded' ]-1 16473 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14173 16474 }, 14174 16475 owned: null, 14175 16476 namefrom: [ 'author' ],14176 -1 context: null-1 16477 context: null, -1 16478 unsupported: false, -1 16479 allowedElements: [ 'NAV', 'SECTION' ] 14177 16480 }, 14178 16481 feed: { 14179 16482 type: 'structure', 14180 16483 attributes: {14181 -1 allowed: [ 'aria-expanded' ]-1 16484 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14182 16485 }, 14183 16486 owned: { 14184 16487 one: [ 'article' ] 14185 16488 }, 14186 16489 nameFrom: [ 'author' ],14187 -1 context: null-1 16490 context: null, -1 16491 unsupported: false, -1 16492 allowedElements: [ 'ARTICLE', 'ASIDE', 'SECTION' ] -1 16493 }, -1 16494 figure: { -1 16495 type: 'structure', -1 16496 unsupported: true 14188 16497 }, 14189 16498 form: { 14190 16499 type: 'landmark', 14191 16500 attributes: {14192 -1 allowed: [ 'aria-expanded' ]-1 16501 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14193 16502 }, 14194 16503 owned: null, 14195 16504 nameFrom: [ 'author' ], 14196 16505 context: null,14197 -1 implicit: [ 'form' ]-1 16506 implicit: [ 'form' ], -1 16507 unsupported: false 14198 16508 }, 14199 16509 grid: { 14200 16510 type: 'composite', 14201 16511 attributes: {14202 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-rowcount' ]-1 16512 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-rowcount', 'aria-errormessage' ] 14203 16513 }, 14204 16514 owned: { 14205 16515 one: [ 'rowgroup', 'row' ] 14206 16516 }, 14207 16517 nameFrom: [ 'author' ], 14208 16518 context: null,14209 -1 implicit: [ 'table' ]-1 16519 implicit: [ 'table' ], -1 16520 unsupported: false 14210 16521 }, 14211 16522 gridcell: { 14212 16523 type: 'widget', 14213 16524 attributes: {14214 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required' ]-1 16525 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required', 'aria-errormessage' ] 14215 16526 }, 14216 16527 owned: null, 14217 16528 nameFrom: [ 'author', 'contents' ], 14218 16529 context: [ 'row' ],14219 -1 implicit: [ 'td', 'th' ]-1 16530 implicit: [ 'td', 'th' ], -1 16531 unsupported: false 14220 16532 }, 14221 16533 group: { 14222 16534 type: 'structure', 14223 16535 attributes: {14224 -1 allowed: [ 'aria-activedescendant', 'aria-expanded' ]-1 16536 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ] 14225 16537 }, 14226 16538 owned: null, 14227 16539 nameFrom: [ 'author' ], 14228 16540 context: null,14229 -1 implicit: [ 'details', 'optgroup' ]-1 16541 implicit: [ 'details', 'optgroup' ], -1 16542 unsupported: false, -1 16543 allowedElements: [ 'DL', 'FIGCAPTION', 'FIELDSET', 'FIGURE', 'FOOTER', 'HEADER', 'OL', 'UL' ] 14230 16544 }, 14231 16545 heading: { 14232 16546 type: 'structure', 14233 16547 attributes: { 14234 16548 required: [ 'aria-level' ],14235 -1 allowed: [ 'aria-expanded' ]-1 16549 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14236 16550 }, 14237 16551 owned: null, 14238 16552 nameFrom: [ 'author', 'contents' ], 14239 16553 context: null,14240 -1 implicit: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ]-1 16554 implicit: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ], -1 16555 unsupported: false 14241 16556 }, 14242 16557 img: { 14243 16558 type: 'structure', 14244 16559 attributes: {14245 -1 allowed: [ 'aria-expanded' ]-1 16560 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14246 16561 }, 14247 16562 owned: null, 14248 16563 nameFrom: [ 'author' ], 14249 16564 context: null,14250 -1 implicit: [ 'img' ]-1 16565 implicit: [ 'img' ], -1 16566 unsupported: false, -1 16567 allowedElements: [ 'EMBED', 'IFRAME', 'OBJECT', 'SVG' ] 14251 16568 }, 14252 16569 input: { 14253 16570 nameFrom: [ 'author' ],14254 -1 type: 'abstract'-1 16571 type: 'abstract', -1 16572 unsupported: false 14255 16573 }, 14256 16574 landmark: { 14257 16575 nameFrom: [ 'author' ],14258 -1 type: 'abstract'-1 16576 type: 'abstract', -1 16577 unsupported: false 14259 16578 }, 14260 16579 link: { 14261 16580 type: 'widget', 14262 16581 attributes: {14263 -1 allowed: [ 'aria-expanded' ]-1 16582 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14264 16583 }, 14265 16584 owned: null, 14266 16585 nameFrom: [ 'author', 'contents' ], 14267 16586 context: null,14268 -1 implicit: [ 'a[href]' ]-1 16587 implicit: [ 'a[href]' ], -1 16588 unsupported: false, -1 16589 allowedElements: [ 'BUTTON', { -1 16590 tagName: 'INPUT', -1 16591 attributes: { -1 16592 TYPE: 'IMAGE' -1 16593 } -1 16594 }, { -1 16595 tagName: 'INPUT', -1 16596 attributes: { -1 16597 TYPE: 'IMAGE' -1 16598 } -1 16599 } ] 14269 16600 }, 14270 16601 list: { 14271 16602 type: 'structure', 14272 16603 attributes: {14273 -1 allowed: [ 'aria-expanded' ]-1 16604 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14274 16605 }, 14275 16606 owned: { 14276 16607 all: [ 'listitem' ] 14277 16608 }, 14278 16609 nameFrom: [ 'author' ], 14279 16610 context: null,14280 -1 implicit: [ 'ol', 'ul', 'dl' ]-1 16611 implicit: [ 'ol', 'ul', 'dl' ], -1 16612 unsupported: false 14281 16613 }, 14282 16614 listbox: { 14283 16615 type: 'composite', 14284 16616 attributes: {14285 -1 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation' ]-1 16617 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] 14286 16618 }, 14287 16619 owned: { 14288 16620 all: [ 'option' ] 14289 16621 }, 14290 16622 nameFrom: [ 'author' ], 14291 16623 context: null,14292 -1 implicit: [ 'select' ]-1 16624 implicit: [ 'select' ], -1 16625 unsupported: false, -1 16626 allowedElements: [ 'OL', 'UL' ] 14293 16627 }, 14294 16628 listitem: { 14295 16629 type: 'structure', 14296 16630 attributes: {14297 -1 allowed: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded' ]-1 16631 allowed: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ] 14298 16632 }, 14299 16633 owned: null, 14300 16634 nameFrom: [ 'author', 'contents' ], 14301 16635 context: [ 'list' ],14302 -1 implicit: [ 'li', 'dt' ]-1 16636 implicit: [ 'li', 'dt' ], -1 16637 unsupported: false 14303 16638 }, 14304 16639 log: { 14305 16640 type: 'widget', 14306 16641 attributes: {14307 -1 allowed: [ 'aria-expanded' ]-1 16642 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14308 16643 }, 14309 16644 owned: null, 14310 16645 nameFrom: [ 'author' ],14311 -1 context: null-1 16646 context: null, -1 16647 unsupported: false, -1 16648 allowedElements: [ 'SECTION' ] 14312 16649 }, 14313 16650 main: { 14314 16651 type: 'landmark', 14315 16652 attributes: {14316 -1 allowed: [ 'aria-expanded' ]-1 16653 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14317 16654 }, 14318 16655 owned: null, 14319 16656 nameFrom: [ 'author' ], 14320 16657 context: null,14321 -1 implicit: [ 'main' ]-1 16658 implicit: [ 'main' ], -1 16659 unsupported: false, -1 16660 allowedElements: [ 'ARTICLE', 'SECTION' ] 14322 16661 }, 14323 16662 marquee: { 14324 16663 type: 'widget', 14325 16664 attributes: {14326 -1 allowed: [ 'aria-expanded' ]-1 16665 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14327 16666 }, 14328 16667 owned: null, 14329 16668 nameFrom: [ 'author' ],14330 -1 context: null-1 16669 context: null, -1 16670 unsupported: false, -1 16671 allowedElements: [ 'SECTION' ] 14331 16672 }, 14332 16673 math: { 14333 16674 type: 'structure', 14334 16675 attributes: {14335 -1 allowed: [ 'aria-expanded' ]-1 16676 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14336 16677 }, 14337 16678 owned: null, 14338 16679 nameFrom: [ 'author' ], 14339 16680 context: null,14340 -1 implicit: [ 'math' ]-1 16681 implicit: [ 'math' ], -1 16682 unsupported: false 14341 16683 }, 14342 16684 menu: { 14343 16685 type: 'composite', 14344 16686 attributes: {14345 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ]-1 16687 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] 14346 16688 }, 14347 16689 owned: { 14348 16690 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ] 14349 16691 }, 14350 16692 nameFrom: [ 'author' ], 14351 16693 context: null,14352 -1 implicit: [ 'menu[type="context"]' ]-1 16694 implicit: [ 'menu[type="context"]' ], -1 16695 unsupported: false, -1 16696 allowedElements: [ 'OL', 'UL' ] 14353 16697 }, 14354 16698 menubar: { 14355 16699 type: 'composite', 14356 16700 attributes: {14357 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ]-1 16701 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] 14358 16702 }, 14359 16703 owned: null, 14360 16704 nameFrom: [ 'author' ],14361 -1 context: null-1 16705 context: null, -1 16706 unsupported: false, -1 16707 allowedElements: [ 'OL', 'UL' ] 14362 16708 }, 14363 16709 menuitem: { 14364 16710 type: 'widget', 14365 16711 attributes: {14366 -1 allowed: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ]-1 16712 allowed: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ] 14367 16713 }, 14368 16714 owned: null, 14369 16715 nameFrom: [ 'author', 'contents' ], 14370 16716 context: [ 'menu', 'menubar' ],14371 -1 implicit: [ 'menuitem[type="command"]' ]-1 16717 implicit: [ 'menuitem[type="command"]' ], -1 16718 unsupported: false, -1 16719 allowedElements: [ 'BUTTON', 'LI', { -1 16720 tagName: 'INPUT', -1 16721 attributes: { -1 16722 TYPE: 'IMAGE' -1 16723 } -1 16724 }, { -1 16725 tagName: 'INPUT', -1 16726 attributes: { -1 16727 TYPE: 'BUTTON' -1 16728 } -1 16729 }, { -1 16730 tagName: 'A', -1 16731 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16732 } ] 14372 16733 }, 14373 16734 menuitemcheckbox: { 14374 16735 type: 'widget', 14375 16736 attributes: {14376 -1 allowed: [ 'aria-checked', 'aria-posinset', 'aria-setsize' ]-1 16737 allowed: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] 14377 16738 }, 14378 16739 owned: null, 14379 16740 nameFrom: [ 'author', 'contents' ], 14380 16741 context: [ 'menu', 'menubar' ],14381 -1 implicit: [ 'menuitem[type="checkbox"]' ]-1 16742 implicit: [ 'menuitem[type="checkbox"]' ], -1 16743 unsupported: false, -1 16744 allowedElements: [ 'BUTTON', 'LI', { -1 16745 tagName: 'INPUT', -1 16746 attributes: { -1 16747 TYPE: 'CHECKBOX' -1 16748 } -1 16749 }, { -1 16750 tagName: 'INPUT', -1 16751 attributes: { -1 16752 TYPE: 'IMAGE' -1 16753 } -1 16754 }, { -1 16755 tagName: 'INPUT', -1 16756 attributes: { -1 16757 TYPE: 'BUTTON' -1 16758 } -1 16759 }, { -1 16760 tagName: 'A', -1 16761 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16762 } ] 14382 16763 }, 14383 16764 menuitemradio: { 14384 16765 type: 'widget', 14385 16766 attributes: {14386 -1 allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize' ]-1 16767 allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] 14387 16768 }, 14388 16769 owned: null, 14389 16770 nameFrom: [ 'author', 'contents' ], 14390 16771 context: [ 'menu', 'menubar' ],14391 -1 implicit: [ 'menuitem[type="radio"]' ]-1 16772 implicit: [ 'menuitem[type="radio"]' ], -1 16773 unsupported: false, -1 16774 allowedElements: [ 'BUTTON', 'LI', { -1 16775 tagName: 'INPUT', -1 16776 attributes: { -1 16777 TYPE: 'IMAGE' -1 16778 } -1 16779 }, { -1 16780 tagName: 'INPUT', -1 16781 attributes: { -1 16782 TYPE: 'BUTTON' -1 16783 } -1 16784 }, { -1 16785 tagName: 'A', -1 16786 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16787 } ] 14392 16788 }, 14393 16789 navigation: { 14394 16790 type: 'landmark', 14395 16791 attributes: {14396 -1 allowed: [ 'aria-expanded' ]-1 16792 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14397 16793 }, 14398 16794 owned: null, 14399 16795 nameFrom: [ 'author' ], 14400 16796 context: null,14401 -1 implicit: [ 'nav' ]-1 16797 implicit: [ 'nav' ], -1 16798 unsupported: false, -1 16799 allowedElements: [ 'SECTION' ] 14402 16800 }, 14403 16801 none: { 14404 16802 type: 'structure', 14405 16803 attributes: null, 14406 16804 owned: null, 14407 16805 nameFrom: [ 'author' ],14408 -1 context: null-1 16806 context: null, -1 16807 unsupported: false, -1 16808 allowedElements: [ 'ARTICLE', 'ASIDE', 'DL', 'EMBED', 'FIGCAPTION', 'FIELDSET', 'FIGURE', 'FOOTER', 'FORM', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEADER', 'LI', 'SECTION', 'OL', { -1 16809 tagName: 'IMG', -1 16810 condition: elementConditions.MUST_HAVE_ALT_ATTRIBUTE -1 16811 } ] 14409 16812 }, 14410 16813 note: { 14411 16814 type: 'structure', 14412 16815 attributes: {14413 -1 allowed: [ 'aria-expanded' ]-1 16816 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14414 16817 }, 14415 16818 owned: null, 14416 16819 nameFrom: [ 'author' ],14417 -1 context: null-1 16820 context: null, -1 16821 unsupported: false, -1 16822 allowedElements: [ 'ASIDE' ] 14418 16823 }, 14419 16824 option: { 14420 16825 type: 'widget', 14421 16826 attributes: {14422 -1 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-checked' ]-1 16827 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-checked', 'aria-errormessage' ] 14423 16828 }, 14424 16829 owned: null, 14425 16830 nameFrom: [ 'author', 'contents' ], 14426 16831 context: [ 'listbox' ],14427 -1 implicit: [ 'option' ]-1 16832 implicit: [ 'option' ], -1 16833 unsupported: false, -1 16834 allowedElements: [ 'BUTTON', 'LI', { -1 16835 tagName: 'INPUT', -1 16836 attributes: { -1 16837 TYPE: 'CHECKBOX' -1 16838 } -1 16839 }, { -1 16840 tagName: 'INPUT', -1 16841 attributes: { -1 16842 TYPE: 'BUTTON' -1 16843 } -1 16844 }, { -1 16845 tagName: 'A', -1 16846 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 16847 } ] 14428 16848 }, 14429 16849 presentation: { 14430 16850 type: 'structure', 14431 16851 attributes: null, 14432 16852 owned: null, 14433 16853 nameFrom: [ 'author' ],14434 -1 context: null-1 16854 context: null, -1 16855 unsupported: false, -1 16856 allowedElements: [ 'ARTICLE', 'ASIDE', 'DL', 'EMBED', 'FIGCAPTION', 'FIELDSET', 'FIGURE', 'FOOTER', 'FORM', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEADER', 'HR', 'LI', 'OL', 'SECTION', 'UL', { -1 16857 tagName: 'IMG', -1 16858 condition: elementConditions.MUST_HAVE_ALT_ATTRIBUTE -1 16859 } ] 14435 16860 }, 14436 16861 progressbar: { 14437 16862 type: 'widget', 14438 16863 attributes: {14439 -1 allowed: [ 'aria-valuetext', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin' ]-1 16864 allowed: [ 'aria-valuetext', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-expanded', 'aria-errormessage' ] 14440 16865 }, 14441 16866 owned: null, 14442 16867 nameFrom: [ 'author' ], 14443 16868 context: null,14444 -1 implicit: [ 'progress' ]-1 16869 implicit: [ 'progress' ], -1 16870 unsupported: false 14445 16871 }, 14446 16872 radio: { 14447 16873 type: 'widget', 14448 16874 attributes: {14449 -1 allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required' ]-1 16875 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage' ], -1 16876 required: [ 'aria-checked' ] 14450 16877 }, 14451 16878 owned: null, 14452 16879 nameFrom: [ 'author', 'contents' ], 14453 16880 context: null,14454 -1 implicit: [ 'input[type="radio"]' ]-1 16881 implicit: [ 'input[type="radio"]' ], -1 16882 unsupported: false, -1 16883 allowedElements: [ 'BUTTON', 'LI', { -1 16884 tagName: 'INPUT', -1 16885 attributes: { -1 16886 TYPE: 'IMAGE' -1 16887 } -1 16888 }, { -1 16889 tagName: 'INPUT', -1 16890 attributes: { -1 16891 TYPE: 'BUTTON' -1 16892 } -1 16893 } ] 14455 16894 }, 14456 16895 radiogroup: { 14457 16896 type: 'composite', 14458 16897 attributes: {14459 -1 allowed: [ 'aria-activedescendant', 'aria-required', 'aria-expanded' ]-1 16898 allowed: [ 'aria-activedescendant', 'aria-required', 'aria-expanded', 'aria-readonly', 'aria-errormessage' ] 14460 16899 }, 14461 16900 owned: { 14462 16901 all: [ 'radio' ] 14463 16902 }, 14464 16903 nameFrom: [ 'author' ],14465 -1 context: null-1 16904 context: null, -1 16905 unsupported: false, -1 16906 allowedElements: [ 'OL', 'UL' ] 14466 16907 }, 14467 16908 range: { 14468 16909 nameFrom: [ 'author' ],14469 -1 type: 'abstract'-1 16910 type: 'abstract', -1 16911 unsupported: false 14470 16912 }, 14471 16913 region: { 14472 16914 type: 'landmark', 14473 16915 attributes: {14474 -1 allowed: [ 'aria-expanded' ]-1 16916 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14475 16917 }, 14476 16918 owned: null, 14477 16919 nameFrom: [ 'author' ], 14478 16920 context: null,14479 -1 implicit: [ 'section[aria-label]', 'section[aria-labelledby]', 'section[title]' ]-1 16921 implicit: [ 'section[aria-label]', 'section[aria-labelledby]', 'section[title]' ], -1 16922 unsupported: false, -1 16923 allowedElements: [ 'ARTICLE', 'ASIDE' ] 14480 16924 }, 14481 16925 roletype: {14482 -1 type: 'abstract'-1 16926 type: 'abstract', -1 16927 unsupported: false 14483 16928 }, 14484 16929 row: { 14485 16930 type: 'structure', 14486 16931 attributes: {14487 -1 allowed: [ 'aria-activedescendant', 'aria-colindex', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowindex' ]-1 16932 allowed: [ 'aria-activedescendant', 'aria-colindex', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowindex', 'aria-errormessage' ] 14488 16933 }, 14489 16934 owned: { 14490 16935 one: [ 'cell', 'columnheader', 'rowheader', 'gridcell' ] 14491 16936 }, 14492 16937 nameFrom: [ 'author', 'contents' ], 14493 16938 context: [ 'rowgroup', 'grid', 'treegrid', 'table' ],14494 -1 implicit: [ 'tr' ]-1 16939 implicit: [ 'tr' ], -1 16940 unsupported: false 14495 16941 }, 14496 16942 rowgroup: { 14497 16943 type: 'structure', 14498 16944 attributes: {14499 -1 allowed: [ 'aria-activedescendant', 'aria-expanded' ]-1 16945 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ] 14500 16946 }, 14501 16947 owned: { 14502 16948 all: [ 'row' ] 14503 16949 }, 14504 16950 nameFrom: [ 'author', 'contents' ], 14505 16951 context: [ 'grid', 'table' ],14506 -1 implicit: [ 'tbody', 'thead', 'tfoot' ]-1 16952 implicit: [ 'tbody', 'thead', 'tfoot' ], -1 16953 unsupported: false 14507 16954 }, 14508 16955 rowheader: { 14509 16956 type: 'structure', 14510 16957 attributes: {14511 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort' ]-1 16958 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ] 14512 16959 }, 14513 16960 owned: null, 14514 16961 nameFrom: [ 'author', 'contents' ], 14515 16962 context: [ 'row' ],14516 -1 implicit: [ 'th' ]-1 16963 implicit: [ 'th' ], -1 16964 unsupported: false 14517 16965 }, 14518 16966 scrollbar: { 14519 16967 type: 'widget', 14520 16968 attributes: { 14521 16969 required: [ 'aria-controls', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin' ],14522 -1 allowed: [ 'aria-valuetext', 'aria-orientation' ]-1 16970 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage' ] 14523 16971 }, 14524 16972 owned: null, 14525 16973 nameFrom: [ 'author' ],14526 -1 context: null-1 16974 context: null, -1 16975 unsupported: false 14527 16976 }, 14528 16977 search: { 14529 16978 type: 'landmark', 14530 16979 attributes: {14531 -1 allowed: [ 'aria-expanded' ]-1 16980 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14532 16981 }, 14533 16982 owned: null, 14534 16983 nameFrom: [ 'author' ],14535 -1 context: null-1 16984 context: null, -1 16985 unsupported: false, -1 16986 allowedElements: [ 'ASIDE', 'FORM', 'SECTION' ] 14536 16987 }, 14537 16988 searchbox: { 14538 16989 type: 'widget', 14539 16990 attributes: {14540 -1 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder' ]-1 16991 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ] 14541 16992 }, 14542 16993 owned: null, 14543 16994 nameFrom: [ 'author' ], 14544 16995 context: null,14545 -1 implicit: [ 'input[type="search"]' ]-1 16996 implicit: [ 'input[type="search"]' ], -1 16997 unsupported: false, -1 16998 allowedElements: [ { -1 16999 tagName: 'INPUT', -1 17000 attributes: { -1 17001 TYPE: 'TEXT' -1 17002 } -1 17003 } ] 14546 17004 }, 14547 17005 section: { 14548 17006 nameFrom: [ 'author', 'contents' ],14549 -1 type: 'abstract'-1 17007 type: 'abstract', -1 17008 unsupported: false 14550 17009 }, 14551 17010 sectionhead: { 14552 17011 nameFrom: [ 'author', 'contents' ],14553 -1 type: 'abstract'-1 17012 type: 'abstract', -1 17013 unsupported: false 14554 17014 }, 14555 17015 select: { 14556 17016 nameFrom: [ 'author' ],14557 -1 type: 'abstract'-1 17017 type: 'abstract', -1 17018 unsupported: false 14558 17019 }, 14559 17020 separator: { 14560 17021 type: 'structure', 14561 17022 attributes: {14562 -1 allowed: [ 'aria-expanded', 'aria-orientation' ]-1 17023 allowed: [ 'aria-expanded', 'aria-orientation', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext', 'aria-errormessage' ] 14563 17024 }, 14564 17025 owned: null, 14565 17026 nameFrom: [ 'author' ], 14566 17027 context: null,14567 -1 implicit: [ 'hr' ]-1 17028 implicit: [ 'hr' ], -1 17029 unsupported: false, -1 17030 allowedElements: [ 'LI' ] 14568 17031 }, 14569 17032 slider: { 14570 17033 type: 'widget', 14571 17034 attributes: {14572 -1 allowed: [ 'aria-valuetext', 'aria-orientation' ],-1 17035 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage' ], 14573 17036 required: [ 'aria-valuenow', 'aria-valuemax', 'aria-valuemin' ] 14574 17037 }, 14575 17038 owned: null, 14576 17039 nameFrom: [ 'author' ], 14577 17040 context: null,14578 -1 implicit: [ 'input[type="range"]' ]-1 17041 implicit: [ 'input[type="range"]' ], -1 17042 unsupported: false 14579 17043 }, 14580 17044 spinbutton: { 14581 17045 type: 'widget', 14582 17046 attributes: {14583 -1 allowed: [ 'aria-valuetext', 'aria-required' ],-1 17047 allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage' ], 14584 17048 required: [ 'aria-valuenow', 'aria-valuemax', 'aria-valuemin' ] 14585 17049 }, 14586 17050 owned: null, 14587 17051 nameFrom: [ 'author' ], 14588 17052 context: null,14589 -1 implicit: [ 'input[type="number"]' ]-1 17053 implicit: [ 'input[type="number"]' ], -1 17054 unsupported: false, -1 17055 allowedElements: [ { -1 17056 tagName: 'INPUT', -1 17057 attributes: { -1 17058 TYPE: 'TEXT' -1 17059 } -1 17060 } ] 14590 17061 }, 14591 17062 status: { 14592 17063 type: 'widget', 14593 17064 attributes: {14594 -1 allowed: [ 'aria-expanded' ]-1 17065 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14595 17066 }, 14596 17067 owned: null, 14597 17068 nameFrom: [ 'author' ], 14598 17069 context: null,14599 -1 implicit: [ 'output' ]-1 17070 implicit: [ 'output' ], -1 17071 unsupported: false, -1 17072 allowedElements: [ 'SECTION' ] 14600 17073 }, 14601 17074 structure: {14602 -1 type: 'abstract'-1 17075 type: 'abstract', -1 17076 unsupported: false 14603 17077 }, 14604 17078 switch: { 14605 17079 type: 'widget', 14606 17080 attributes: { -1 17081 allowed: [ 'aria-errormessage' ], 14607 17082 required: [ 'aria-checked' ] 14608 17083 }, 14609 17084 owned: null, 14610 17085 nameFrom: [ 'author', 'contents' ],14611 -1 context: null-1 17086 context: null, -1 17087 unsupported: false, -1 17088 allowedElements: [ 'BUTTON', { -1 17089 tagName: 'INPUT', -1 17090 attributes: { -1 17091 TYPE: 'CHECKBOX' -1 17092 } -1 17093 }, { -1 17094 tagName: 'INPUT', -1 17095 attributes: { -1 17096 TYPE: 'IMAGE' -1 17097 } -1 17098 }, { -1 17099 tagName: 'INPUT', -1 17100 attributes: { -1 17101 TYPE: 'BUTTON' -1 17102 } -1 17103 }, { -1 17104 tagName: 'A', -1 17105 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 17106 } ] 14612 17107 }, 14613 17108 tab: { 14614 17109 type: 'widget', 14615 17110 attributes: {14616 -1 allowed: [ 'aria-selected', 'aria-expanded', 'aria-setsize', 'aria-posinset' ]-1 17111 allowed: [ 'aria-selected', 'aria-expanded', 'aria-setsize', 'aria-posinset', 'aria-errormessage' ] 14617 17112 }, 14618 17113 owned: null, 14619 17114 nameFrom: [ 'author', 'contents' ],14620 -1 context: [ 'tablist' ]-1 17115 context: [ 'tablist' ], -1 17116 unsupported: false, -1 17117 allowedElements: [ 'BUTTON', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', { -1 17118 tagName: 'INPUT', -1 17119 attributes: { -1 17120 TYPE: 'BUTTON' -1 17121 } -1 17122 }, { -1 17123 tagName: 'A', -1 17124 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 17125 } ] 14621 17126 }, 14622 17127 table: { 14623 17128 type: 'structure', 14624 17129 attributes: {14625 -1 allowed: [ 'aria-colcount', 'aria-rowcount' ]-1 17130 allowed: [ 'aria-colcount', 'aria-rowcount', 'aria-errormessage' ] 14626 17131 }, 14627 17132 owned: { 14628 17133 one: [ 'rowgroup', 'row' ] 14629 17134 }, 14630 17135 nameFrom: [ 'author' ], 14631 17136 context: null,14632 -1 implicit: [ 'table' ]-1 17137 implicit: [ 'table' ], -1 17138 unsupported: false 14633 17139 }, 14634 17140 tablist: { 14635 17141 type: 'composite', 14636 17142 attributes: {14637 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation' ]-1 17143 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-errormessage' ] 14638 17144 }, 14639 17145 owned: { 14640 17146 all: [ 'tab' ] 14641 17147 }, 14642 17148 nameFrom: [ 'author' ],14643 -1 context: null-1 17149 context: null, -1 17150 unsupported: false, -1 17151 allowedElements: [ 'OL', 'UL' ] 14644 17152 }, 14645 17153 tabpanel: { 14646 17154 type: 'widget', 14647 17155 attributes: {14648 -1 allowed: [ 'aria-expanded' ]-1 17156 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14649 17157 }, 14650 17158 owned: null, 14651 17159 nameFrom: [ 'author' ],14652 -1 context: null-1 17160 context: null, -1 17161 unsupported: false, -1 17162 allowedElements: [ 'SECTION' ] 14653 17163 }, 14654 17164 term: { 14655 17165 type: 'structure', 14656 17166 attributes: {14657 -1 allowed: [ 'aria-expanded' ]-1 17167 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 17168 }, -1 17169 owned: null, -1 17170 nameFrom: [ 'author', 'contents' ], -1 17171 context: null, -1 17172 implicit: [ 'dt' ], -1 17173 unsupported: false -1 17174 }, -1 17175 textbox: { -1 17176 type: 'widget', -1 17177 attributes: { -1 17178 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ] -1 17179 }, -1 17180 owned: null, -1 17181 nameFrom: [ 'author' ], -1 17182 context: null, -1 17183 implicit: [ 'input[type="text"]', 'input[type="email"]', 'input[type="password"]', 'input[type="tel"]', 'input[type="url"]', 'input:not([type])', 'textarea' ], -1 17184 unsupported: false -1 17185 }, -1 17186 timer: { -1 17187 type: 'widget', -1 17188 attributes: { -1 17189 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 17190 }, -1 17191 owned: null, -1 17192 nameFrom: [ 'author' ], -1 17193 context: null, -1 17194 unsupported: false -1 17195 }, -1 17196 toolbar: { -1 17197 type: 'structure', -1 17198 attributes: { -1 17199 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] -1 17200 }, -1 17201 owned: null, -1 17202 nameFrom: [ 'author' ], -1 17203 context: null, -1 17204 implicit: [ 'menu[type="toolbar"]' ], -1 17205 unsupported: false, -1 17206 allowedElements: [ 'OL', 'UL' ] -1 17207 }, -1 17208 tooltip: { -1 17209 type: 'widget', -1 17210 attributes: { -1 17211 allowed: [ 'aria-expanded', 'aria-errormessage' ] 14658 17212 }, 14659 17213 owned: null, 14660 17214 nameFrom: [ 'author', 'contents' ], 14661 17215 context: null,14662 -1 implicit: [ 'dt' ]-1 17216 unsupported: false -1 17217 }, -1 17218 tree: { -1 17219 type: 'composite', -1 17220 attributes: { -1 17221 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] -1 17222 }, -1 17223 owned: { -1 17224 all: [ 'treeitem' ] -1 17225 }, -1 17226 nameFrom: [ 'author' ], -1 17227 context: null, -1 17228 unsupported: false, -1 17229 allowedElements: [ 'OL', 'UL' ] -1 17230 }, -1 17231 treegrid: { -1 17232 type: 'composite', -1 17233 attributes: { -1 17234 allowed: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-rowcount', 'aria-orientation', 'aria-errormessage' ] -1 17235 }, -1 17236 owned: { -1 17237 one: [ 'rowgroup', 'row' ] -1 17238 }, -1 17239 nameFrom: [ 'author' ], -1 17240 context: null, -1 17241 unsupported: false -1 17242 }, -1 17243 treeitem: { -1 17244 type: 'widget', -1 17245 attributes: { -1 17246 allowed: [ 'aria-checked', 'aria-selected', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] -1 17247 }, -1 17248 owned: null, -1 17249 nameFrom: [ 'author', 'contents' ], -1 17250 context: [ 'group', 'tree' ], -1 17251 unsupported: false, -1 17252 allowedElements: [ 'LI', { -1 17253 tagName: 'A', -1 17254 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 17255 } ] -1 17256 }, -1 17257 widget: { -1 17258 type: 'abstract', -1 17259 unsupported: false -1 17260 }, -1 17261 window: { -1 17262 nameFrom: [ 'author' ], -1 17263 type: 'abstract', -1 17264 unsupported: false -1 17265 } -1 17266 }; -1 17267 lookupTable.elementsAllowedNoRole = [ { -1 17268 tagName: 'AREA', -1 17269 condition: elementConditions.MUST_HAVE_HREF_ATTRIBUTE -1 17270 }, 'BASE', 'BODY', 'CAPTION', 'COL', 'COLGROUP', 'DATALIST', 'DD', 'DETAILS', 'DT', 'HEAD', 'HTML', { -1 17271 tagName: 'INPUT', -1 17272 attributes: { -1 17273 TYPE: 'COLOR' -1 17274 } -1 17275 }, { -1 17276 tagName: 'INPUT', -1 17277 attributes: { -1 17278 TYPE: 'DATE' -1 17279 } -1 17280 }, { -1 17281 tagName: 'INPUT', -1 17282 attributes: { -1 17283 TYPE: 'DATETIME' -1 17284 } -1 17285 }, { -1 17286 tagName: 'INPUT', -1 17287 condition: elementConditions.CANNOT_HAVE_LIST_ATTRIBUTE, -1 17288 attributes: { -1 17289 TYPE: 'EMAIL' -1 17290 } -1 17291 }, { -1 17292 tagName: 'INPUT', -1 17293 attributes: { -1 17294 TYPE: 'FILE' -1 17295 } -1 17296 }, { -1 17297 tagName: 'INPUT', -1 17298 attributes: { -1 17299 TYPE: 'HIDDEN' -1 17300 } -1 17301 }, { -1 17302 tagName: 'INPUT', -1 17303 attributes: { -1 17304 TYPE: 'MONTH' -1 17305 } -1 17306 }, { -1 17307 tagName: 'INPUT', -1 17308 attributes: { -1 17309 TYPE: 'NUMBER' -1 17310 } -1 17311 }, { -1 17312 tagName: 'INPUT', -1 17313 attributes: { -1 17314 TYPE: 'PASSWORD' -1 17315 } -1 17316 }, { -1 17317 tagName: 'INPUT', -1 17318 attributes: { -1 17319 TYPE: 'RANGE' -1 17320 } -1 17321 }, { -1 17322 tagName: 'INPUT', -1 17323 attributes: { -1 17324 TYPE: 'RESET' -1 17325 } -1 17326 }, { -1 17327 tagName: 'INPUT', -1 17328 condition: elementConditions.CANNOT_HAVE_LIST_ATTRIBUTE, -1 17329 attributes: { -1 17330 TYPE: 'SEARCH' -1 17331 } -1 17332 }, { -1 17333 tagName: 'INPUT', -1 17334 attributes: { -1 17335 TYPE: 'SUBMIT' -1 17336 } -1 17337 }, { -1 17338 tagName: 'INPUT', -1 17339 condition: elementConditions.CANNOT_HAVE_LIST_ATTRIBUTE, -1 17340 attributes: { -1 17341 TYPE: 'TEL' -1 17342 } -1 17343 }, { -1 17344 tagName: 'INPUT', -1 17345 attributes: { -1 17346 TYPE: 'TIME' -1 17347 } -1 17348 }, { -1 17349 tagName: 'INPUT', -1 17350 condition: elementConditions.CANNOT_HAVE_LIST_ATTRIBUTE, -1 17351 attributes: { -1 17352 TYPE: 'URL' -1 17353 } -1 17354 }, { -1 17355 tagName: 'INPUT', -1 17356 attributes: { -1 17357 TYPE: 'WEEK' -1 17358 } -1 17359 }, 'KEYGEN', 'LABEL', 'LEGEND', { -1 17360 tagName: 'LINK', -1 17361 attributes: { -1 17362 TYPE: 'HREF' -1 17363 } -1 17364 }, 'MAIN', 'MAP', 'MATH', { -1 17365 tagName: 'MENU', -1 17366 attributes: { -1 17367 TYPE: 'CONTEXT' -1 17368 } -1 17369 }, { -1 17370 tagName: 'MENUITEM', -1 17371 attributes: { -1 17372 TYPE: 'COMMAND' -1 17373 } -1 17374 }, { -1 17375 tagName: 'MENUITEM', -1 17376 attributes: { -1 17377 TYPE: 'CHECKBOX' -1 17378 } -1 17379 }, { -1 17380 tagName: 'MENUITEM', -1 17381 attributes: { -1 17382 TYPE: 'RADIO' -1 17383 } -1 17384 }, 'META', 'METER', 'NOSCRIPT', 'OPTGROUP', 'PARAM', 'PICTURE', 'PROGRESS', 'SCRIPT', { -1 17385 tagName: 'SELECT', -1 17386 condition: elementConditions.MUST_HAVE_SIZE_ATTRIBUTE_WITH_VALUE_GREATER_THAN_1, -1 17387 attributes: { -1 17388 TYPE: 'MULTIPLE' -1 17389 } -1 17390 }, 'SOURCE', 'STYLE', 'TEMPLATE', 'TEXTAREA', 'TITLE', 'TRACK', 'CLIPPATH', 'CURSOR', 'DEFS', 'DESC', 'FEBLEND', 'FECOLORMATRIX', 'FECOMPONENTTRANSFER', 'FECOMPOSITE', 'FECONVOLVEMATRIX', 'FEDIFFUSELIGHTING', 'FEDISPLACEMENTMAP', 'FEDISTANTLIGHT', 'FEDROPSHADOW', 'FEFLOOD', 'FEFUNCA', 'FEFUNCB', 'FEFUNCG', 'FEFUNCR', 'FEGAUSSIANBLUR', 'FEIMAGE', 'FEMERGE', 'FEMERGENODE', 'FEMORPHOLOGY', 'FEOFFSET', 'FEPOINTLIGHT', 'FESPECULARLIGHTING', 'FESPOTLIGHT', 'FETILE', 'FETURBULENCE', 'FILTER', 'HATCH', 'HATCHPATH', 'LINEARGRADIENT', 'MARKER', 'MASK', 'MESHGRADIENT', 'MESHPATCH', 'MESHROW', 'METADATA', 'MPATH', 'PATTERN', 'RADIALGRADIENT', 'SOLIDCOLOR', 'STOP', 'SWITCH', 'VIEW' ]; -1 17391 lookupTable.elementsAllowedAnyRole = [ { -1 17392 tagName: 'A', -1 17393 condition: elementConditions.CANNOT_HAVE_HREF_ATTRIBUTE -1 17394 }, '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' ]; -1 17395 lookupTable.evaluateRoleForElement = { -1 17396 A: function A(_ref11) { -1 17397 var node = _ref11.node, out = _ref11.out; -1 17398 if (node.namespaceURI === 'http://www.w3.org/2000/svg') { -1 17399 return true; -1 17400 } -1 17401 if (node.href.length) { -1 17402 return out; -1 17403 } -1 17404 return true; 14663 17405 },14664 -1 text: {14665 -1 type: 'structure',14666 -1 owned: null,14667 -1 nameFrom: [ 'author', 'contents' ],14668 -1 context: null-1 17406 AREA: function AREA(_ref12) { -1 17407 var node = _ref12.node; -1 17408 return !node.href; 14669 17409 },14670 -1 textbox: {14671 -1 type: 'widget',14672 -1 attributes: {14673 -1 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder' ]14674 -1 },14675 -1 owned: null,14676 -1 nameFrom: [ 'author' ],14677 -1 context: null,14678 -1 implicit: [ 'input[type="text"]', 'input[type="email"]', 'input[type="password"]', 'input[type="tel"]', 'input[type="url"]', 'input:not([type])', 'textarea' ]-1 17410 BUTTON: function BUTTON(_ref13) { -1 17411 var node = _ref13.node, role = _ref13.role, out = _ref13.out; -1 17412 if (node.getAttribute('type') === 'menu') { -1 17413 return role === 'menuitem'; -1 17414 } -1 17415 return out; 14679 17416 },14680 -1 timer: {14681 -1 type: 'widget',14682 -1 attributes: {14683 -1 allowed: [ 'aria-expanded' ]14684 -1 },14685 -1 owned: null,14686 -1 nameFrom: [ 'author' ],14687 -1 context: null-1 17417 IMG: function IMG(_ref14) { -1 17418 var node = _ref14.node, out = _ref14.out; -1 17419 if (node.alt) { -1 17420 return !out; -1 17421 } -1 17422 return out; 14688 17423 },14689 -1 toolbar: {14690 -1 type: 'structure',14691 -1 attributes: {14692 -1 allowed: [ 'aria-activedescendant', 'aria-expanded' ]14693 -1 },14694 -1 owned: null,14695 -1 nameFrom: [ 'author' ],14696 -1 context: null,14697 -1 implicit: [ 'menu[type="toolbar"]' ]-1 17424 INPUT: function INPUT(_ref15) { -1 17425 var node = _ref15.node, role = _ref15.role, out = _ref15.out; -1 17426 switch (node.type) { -1 17427 case 'button': -1 17428 case 'image': -1 17429 return out; -1 17430 -1 17431 case 'checkbox': -1 17432 if (role === 'button' && node.hasAttribute('aria-pressed')) { -1 17433 return true; -1 17434 } -1 17435 return out; -1 17436 -1 17437 case 'radio': -1 17438 return role === 'menuitemradio'; -1 17439 -1 17440 case 'text': -1 17441 return role === 'combobox' || role === 'searchbox' || role === 'spinbutton'; -1 17442 -1 17443 default: -1 17444 return false; -1 17445 } 14698 17446 },14699 -1 tooltip: {14700 -1 type: 'widget',14701 -1 attributes: {14702 -1 allowed: [ 'aria-expanded' ]14703 -1 },14704 -1 owned: null,14705 -1 nameFrom: [ 'author', 'contents' ],14706 -1 context: null-1 17447 LI: function LI(_ref16) { -1 17448 var node = _ref16.node, out = _ref16.out; -1 17449 var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li'); -1 17450 if (hasImplicitListitemRole) { -1 17451 return out; -1 17452 } -1 17453 return true; 14707 17454 },14708 -1 tree: {14709 -1 type: 'composite',14710 -1 attributes: {14711 -1 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation' ]14712 -1 },14713 -1 owned: {14714 -1 all: [ 'treeitem' ]14715 -1 },14716 -1 nameFrom: [ 'author' ],14717 -1 context: null-1 17455 LINK: function LINK(_ref17) { -1 17456 var node = _ref17.node; -1 17457 return !node.href; 14718 17458 },14719 -1 treegrid: {14720 -1 type: 'composite',14721 -1 attributes: {14722 -1 allowed: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-rowcount', 'aria-orientation' ]14723 -1 },14724 -1 owned: {14725 -1 one: [ 'rowgroup', 'row' ]14726 -1 },14727 -1 nameFrom: [ 'author' ],14728 -1 context: null-1 17459 MENU: function MENU(_ref18) { -1 17460 var node = _ref18.node; -1 17461 if (node.getAttribute('type') === 'context') { -1 17462 return false; -1 17463 } -1 17464 return true; 14729 17465 },14730 -1 treeitem: {14731 -1 type: 'widget',14732 -1 attributes: {14733 -1 allowed: [ 'aria-checked', 'aria-selected', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ]14734 -1 },14735 -1 owned: null,14736 -1 nameFrom: [ 'author', 'contents' ],14737 -1 context: [ 'group', 'tree' ]-1 17466 OPTION: function OPTION(_ref19) { -1 17467 var node = _ref19.node; -1 17468 var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option'); -1 17469 return !withinOptionList; 14738 17470 },14739 -1 widget: {14740 -1 type: 'abstract'-1 17471 SELECT: function SELECT(_ref20) { -1 17472 var node = _ref20.node, role = _ref20.role; -1 17473 return !node.multiple && node.size <= 1 && role === 'menu'; 14741 17474 },14742 -1 window: {14743 -1 nameFrom: [ 'author' ],14744 -1 type: 'abstract'-1 17475 SVG: function SVG(_ref21) { -1 17476 var node = _ref21.node, out = _ref21.out; -1 17477 if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') { -1 17478 return true; -1 17479 } -1 17480 return out; 14745 17481 } 14746 17482 }; 14747 17483 var color = {}; @@ -14766,7 +17502,7 @@ module.exports = { 14766 17502 'use strict'; 14767 17503 return !!aria.lookupTable.attributes[att]; 14768 17504 };14769 -1 aria.validateAttrValue = function(node, attr) {-1 17505 aria.validateAttrValue = function validateAttrValue(node, attr) { 14770 17506 'use strict'; 14771 17507 var matches, list, value = node.getAttribute(attr), attrInfo = aria.lookupTable.attributes[attr]; 14772 17508 var doc = dom.getRootNode(node); @@ -14776,19 +17512,22 @@ module.exports = { 14776 17512 switch (attrInfo.type) { 14777 17513 case 'boolean': 14778 17514 case 'nmtoken':14779 -1 return typeof value === 'string' && attrInfo.values.indexOf(value.toLowerCase()) !== -1;-1 17515 return typeof value === 'string' && attrInfo.values.includes(value.toLowerCase()); 14780 17516 14781 17517 case 'nmtokens': 14782 17518 list = axe.utils.tokenList(value); 14783 17519 return list.reduce(function(result, token) {14784 -1 return result && attrInfo.values.indexOf(token) !== -1;-1 17520 return result && attrInfo.values.includes(token); 14785 17521 }, list.length !== 0); 14786 17522 14787 17523 case 'idref': -1 17524 if (value.trim().length === 0) { -1 17525 return true; -1 17526 } 14788 17527 return !!(value && doc.getElementById(value)); 14789 17528 14790 17529 case 'idrefs':14791 -1 if (attrInfo.values && attrInfo.values.indexOf('') !== -1 && value.trim().length === 0) {-1 17530 if (value.trim().length === 0) { 14792 17531 return true; 14793 17532 } 14794 17533 list = axe.utils.tokenList(value); @@ -14807,8 +17546,133 @@ module.exports = { 14807 17546 return /^[-+]?[0-9]+$/.test(value); 14808 17547 } 14809 17548 };14810 -1 aria.labelVirtual = function(_ref8) {14811 -1 var actualNode = _ref8.actualNode;-1 17549 function getRoleSegments(node) { -1 17550 var roles = []; -1 17551 if (!node) { -1 17552 return roles; -1 17553 } -1 17554 if (node.hasAttribute('role')) { -1 17555 var nodeRoles = axe.utils.tokenList(node.getAttribute('role').toLowerCase()); -1 17556 roles = roles.concat(nodeRoles); -1 17557 } -1 17558 if (node.hasAttributeNS('http://www.idpf.org/2007/ops', 'type')) { -1 17559 var epubRoles = axe.utils.tokenList(node.getAttributeNS('http://www.idpf.org/2007/ops', 'type').toLowerCase()).map(function(role) { -1 17560 return 'doc-' + role; -1 17561 }); -1 17562 roles = roles.concat(epubRoles); -1 17563 } -1 17564 roles = roles.filter(function(role) { -1 17565 return axe.commons.aria.isValidRole(role); -1 17566 }); -1 17567 return roles; -1 17568 } -1 17569 aria.getElementUnallowedRoles = function getElementUnallowedRoles(node) { -1 17570 var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; -1 17571 var tagName = node.nodeName.toUpperCase(); -1 17572 if (!axe.utils.isHtmlElement(node)) { -1 17573 return []; -1 17574 } -1 17575 var roleSegments = getRoleSegments(node); -1 17576 var implicitRole = axe.commons.aria.implicitRole(node); -1 17577 var unallowedRoles = roleSegments.filter(function(role) { -1 17578 if (allowImplicit && role === implicitRole) { -1 17579 return false; -1 17580 } -1 17581 if (!allowImplicit && !(role === 'row' && tagName === 'TR' && axe.utils.matchesSelector(node, 'table[role="grid"] > tr'))) { -1 17582 return true; -1 17583 } -1 17584 if (!aria.isAriaRoleAllowedOnElement(node, role)) { -1 17585 return true; -1 17586 } -1 17587 }); -1 17588 return unallowedRoles; -1 17589 }; -1 17590 aria.getRole = function getRole(node) { -1 17591 var _ref22 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, noImplicit = _ref22.noImplicit, fallback = _ref22.fallback, abstracts = _ref22.abstracts, dpub = _ref22.dpub; -1 17592 var roleAttr = (node.getAttribute('role') || '').trim().toLowerCase(); -1 17593 var roleList = fallback ? axe.utils.tokenList(roleAttr) : [ roleAttr ]; -1 17594 var validRoles = roleList.filter(function(role) { -1 17595 if (!dpub && role.substr(0, 4) === 'doc-') { -1 17596 return false; -1 17597 } -1 17598 return aria.isValidRole(role, { -1 17599 allowAbstract: abstracts -1 17600 }); -1 17601 }); -1 17602 var explicitRole = validRoles[0]; -1 17603 if (!explicitRole && !noImplicit) { -1 17604 return aria.implicitRole(node); -1 17605 } -1 17606 return explicitRole || null; -1 17607 }; -1 17608 function findDomNode(node, functor) { -1 17609 if (functor(node)) { -1 17610 return node; -1 17611 } -1 17612 for (var i = 0; i < node.children.length; i++) { -1 17613 var out = findDomNode(node.children[i], functor); -1 17614 if (out) { -1 17615 return out; -1 17616 } -1 17617 } -1 17618 } -1 17619 aria.isAccessibleRef = function isAccessibleRef(node) { -1 17620 node = node.actualNode || node; -1 17621 var root = dom.getRootNode(node); -1 17622 root = root.documentElement || root; -1 17623 var id = node.id; -1 17624 var refAttrs = Object.keys(aria.lookupTable.attributes).filter(function(attr) { -1 17625 var type = aria.lookupTable.attributes[attr].type; -1 17626 return /^idrefs?$/.test(type); -1 17627 }); -1 17628 var refElm = findDomNode(root, function(elm) { -1 17629 if (elm.nodeType !== 1) { -1 17630 return; -1 17631 } -1 17632 if (elm.nodeName.toUpperCase() === 'LABEL' && elm.getAttribute('for') === id) { -1 17633 return true; -1 17634 } -1 17635 return refAttrs.filter(function(attr) { -1 17636 return elm.hasAttribute(attr); -1 17637 }).some(function(attr) { -1 17638 var attrValue = elm.getAttribute(attr); -1 17639 if (aria.lookupTable.attributes[attr].type === 'idref') { -1 17640 return attrValue === id; -1 17641 } -1 17642 return axe.utils.tokenList(attrValue).includes(id); -1 17643 }); -1 17644 }); -1 17645 return typeof refElm !== 'undefined'; -1 17646 }; -1 17647 aria.isAriaRoleAllowedOnElement = function isAriaRoleAllowedOnElement(node, role) { -1 17648 var tagName = node.nodeName.toUpperCase(); -1 17649 var lookupTable = axe.commons.aria.lookupTable; -1 17650 if (aria.validateNodeAndAttributes(node, lookupTable.elementsAllowedNoRole)) { -1 17651 return false; -1 17652 } -1 17653 if (aria.validateNodeAndAttributes(node, lookupTable.elementsAllowedAnyRole)) { -1 17654 return true; -1 17655 } -1 17656 var roleValue = lookupTable.role[role]; -1 17657 if (!roleValue) { -1 17658 return false; -1 17659 } -1 17660 if (!(roleValue.allowedElements && Array.isArray(roleValue.allowedElements) && roleValue.allowedElements.length)) { -1 17661 return false; -1 17662 } -1 17663 var out = false; -1 17664 out = aria.validateNodeAndAttributes(node, roleValue.allowedElements); -1 17665 if (Object.keys(lookupTable.evaluateRoleForElement).includes(tagName)) { -1 17666 out = lookupTable.evaluateRoleForElement[tagName]({ -1 17667 node: node, -1 17668 role: role, -1 17669 out: out -1 17670 }); -1 17671 } -1 17672 return out; -1 17673 }; -1 17674 aria.labelVirtual = function(_ref23) { -1 17675 var actualNode = _ref23.actualNode; 14812 17676 var ref = void 0, candidate = void 0; 14813 17677 if (actualNode.getAttribute('aria-labelledby')) { 14814 17678 ref = dom.idrefs(actualNode, 'aria-labelledby'); @@ -14834,11 +17698,13 @@ module.exports = { 14834 17698 return aria.labelVirtual(node); 14835 17699 }; 14836 17700 aria.isValidRole = function(role) {14837 -1 'use strict';14838 -1 if (aria.lookupTable.role[role]) {14839 -1 return true;-1 17701 var _ref24 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref24.allowAbstract, _ref24$flagUnsupporte = _ref24.flagUnsupported, flagUnsupported = _ref24$flagUnsupporte === undefined ? false : _ref24$flagUnsupporte; -1 17702 var roleDefinition = aria.lookupTable.role[role]; -1 17703 var isRoleUnsupported = roleDefinition ? roleDefinition.unsupported : false; -1 17704 if (!roleDefinition || flagUnsupported && isRoleUnsupported) { -1 17705 return false; 14840 17706 }14841 -1 return false;-1 17707 return allowAbstract ? true : roleDefinition.type !== 'abstract'; 14842 17708 }; 14843 17709 aria.getRolesWithNameFromContents = function() { 14844 17710 return Object.keys(aria.lookupTable.role).filter(function(r) { @@ -14930,6 +17796,56 @@ module.exports = { 14930 17796 } 14931 17797 return sortRolesByOptimalAriaContext(availableImplicitRoles, ariaAttributes).shift(); 14932 17798 }; -1 17799 aria.validateNodeAndAttributes = function validateNodeAndAttributes(node, constraintsArray) { -1 17800 var tagName = node.nodeName.toUpperCase(); -1 17801 var stringConstraints = constraintsArray.filter(function(c) { -1 17802 return typeof c === 'string'; -1 17803 }); -1 17804 if (stringConstraints.includes(tagName)) { -1 17805 return true; -1 17806 } -1 17807 var objectConstraints = constraintsArray.filter(function(c) { -1 17808 return (typeof c === 'undefined' ? 'undefined' : _typeof(c)) === 'object'; -1 17809 }).filter(function(c) { -1 17810 return c.tagName === tagName; -1 17811 }); -1 17812 var nodeAttrs = Array.from(node.attributes).map(function(a) { -1 17813 return a.name.toUpperCase(); -1 17814 }); -1 17815 var validConstraints = objectConstraints.filter(function(c) { -1 17816 if (!c.attributes) { -1 17817 if (c.condition) { -1 17818 return true; -1 17819 } -1 17820 return false; -1 17821 } -1 17822 var keys = Object.keys(c.attributes); -1 17823 if (!keys.length) { -1 17824 return false; -1 17825 } -1 17826 var keepConstraint = false; -1 17827 keys.forEach(function(k) { -1 17828 if (!nodeAttrs.includes(k)) { -1 17829 return; -1 17830 } -1 17831 var attrValue = node.getAttribute(k).trim().toUpperCase(); -1 17832 if (attrValue === c.attributes[k]) { -1 17833 keepConstraint = true; -1 17834 } -1 17835 }); -1 17836 return keepConstraint; -1 17837 }); -1 17838 if (!validConstraints.length) { -1 17839 return false; -1 17840 } -1 17841 var out = true; -1 17842 validConstraints.forEach(function(c) { -1 17843 if (c.condition && typeof c.condition === 'function') { -1 17844 out = c.condition(node); -1 17845 } -1 17846 }); -1 17847 return out; -1 17848 }; 14933 17849 color.Color = function(red, green, blue, alpha) { 14934 17850 this.red = red; 14935 17851 this.green = green; @@ -15307,8 +18223,8 @@ module.exports = { 15307 18223 } 15308 18224 return finalElements; 15309 18225 };15310 -1 dom.findElmsInContext = function(_ref9) {15311 -1 var context = _ref9.context, value = _ref9.value, attr = _ref9.attr, _ref9$elm = _ref9.elm, elm = _ref9$elm === undefined ? '' : _ref9$elm;-1 18226 dom.findElmsInContext = function(_ref25) { -1 18227 var context = _ref25.context, value = _ref25.value, attr = _ref25.attr, _ref25$elm = _ref25.elm, elm = _ref25$elm === undefined ? '' : _ref25$elm; 15312 18228 var root = void 0; 15313 18229 var escapedValue = axe.utils.escapeSelector(value); 15314 18230 if (context.nodeType === 9 || context.nodeType === 11) { @@ -15382,13 +18298,7 @@ module.exports = { 15382 18298 height: coords.bottom - coords.top 15383 18299 }; 15384 18300 };15385 -1 dom.getRootNode = function(node) {15386 -1 var doc = node.getRootNode && node.getRootNode() || document;15387 -1 if (doc === node) {15388 -1 doc = document;15389 -1 }15390 -1 return doc;15391 -1 };-1 18301 dom.getRootNode = axe.utils.getRootNode; 15392 18302 dom.getScrollOffset = function(element) { 15393 18303 'use strict'; 15394 18304 if (!element.nodeType && element.document) { @@ -15430,8 +18340,8 @@ module.exports = { 15430 18340 var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ]; 15431 18341 function hasChildTextNodes(elm) { 15432 18342 if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {15433 -1 return elm.children.some(function(_ref10) {15434 -1 var actualNode = _ref10.actualNode;-1 18343 return elm.children.some(function(_ref26) { -1 18344 var actualNode = _ref26.actualNode; 15435 18345 return actualNode.nodeType === 3 && actualNode.nodeValue.trim(); 15436 18346 }); 15437 18347 } @@ -16040,30 +18950,31 @@ module.exports = { 16040 18950 value: virtualNode.actualNode.id, 16041 18951 context: virtualNode.actualNode 16042 18952 })[0];16043 -1 } else {-1 18953 } -1 18954 if (!label) { 16044 18955 label = dom.findUpVirtual(virtualNode, 'label'); 16045 18956 } 16046 18957 return axe.utils.getNodeFromTree(axe._tree[0], label); 16047 18958 }16048 -1 function isButton(_ref11) {16049 -1 var actualNode = _ref11.actualNode;-1 18959 function isButton(_ref27) { -1 18960 var actualNode = _ref27.actualNode; 16050 18961 return [ 'button', 'reset', 'submit' ].includes(actualNode.type.toLowerCase()); 16051 18962 }16052 -1 function isInput(_ref12) {16053 -1 var actualNode = _ref12.actualNode;-1 18963 function isInput(_ref28) { -1 18964 var actualNode = _ref28.actualNode; 16054 18965 var nodeName = actualNode.nodeName.toUpperCase(); 16055 18966 return nodeName === 'TEXTAREA' || nodeName === 'SELECT' || nodeName === 'INPUT' && actualNode.type.toLowerCase() !== 'hidden'; 16056 18967 }16057 -1 function shouldCheckSubtree(_ref13) {16058 -1 var actualNode = _ref13.actualNode;-1 18968 function shouldCheckSubtree(_ref29) { -1 18969 var actualNode = _ref29.actualNode; 16059 18970 return [ 'BUTTON', 'SUMMARY', 'A' ].includes(actualNode.nodeName.toUpperCase()); 16060 18971 }16061 -1 function shouldNeverCheckSubtree(_ref14) {16062 -1 var actualNode = _ref14.actualNode;-1 18972 function shouldNeverCheckSubtree(_ref30) { -1 18973 var actualNode = _ref30.actualNode; 16063 18974 return [ 'TABLE', 'FIGURE', 'SELECT' ].includes(actualNode.nodeName.toUpperCase()); 16064 18975 }16065 -1 function formValueText(_ref15, inLabelledByContext) {16066 -1 var actualNode = _ref15.actualNode;-1 18976 function formValueText(_ref31, inLabelledByContext) { -1 18977 var actualNode = _ref31.actualNode; 16067 18978 var nodeName = actualNode.nodeName.toUpperCase(); 16068 18979 if (nodeName === 'INPUT') { 16069 18980 if (!actualNode.hasAttribute('type') || inputTypes.includes(actualNode.type.toLowerCase())) { @@ -16089,8 +19000,8 @@ module.exports = { 16089 19000 } 16090 19001 return ''; 16091 19002 }16092 -1 function checkDescendant(_ref16, nodeName) {16093 -1 var actualNode = _ref16.actualNode;-1 19003 function checkDescendant(_ref32, nodeName) { -1 19004 var actualNode = _ref32.actualNode; 16094 19005 var candidate = actualNode.querySelector(nodeName.toLowerCase()); 16095 19006 if (candidate) { 16096 19007 return text.accessibleText(candidate); @@ -16114,8 +19025,8 @@ module.exports = { 16114 19025 return false; 16115 19026 } 16116 19027 }16117 -1 function shouldCheckAlt(_ref17) {16118 -1 var actualNode = _ref17.actualNode;-1 19028 function shouldCheckAlt(_ref33) { -1 19029 var actualNode = _ref33.actualNode; 16119 19030 var nodeName = actualNode.nodeName.toUpperCase(); 16120 19031 return [ 'IMG', 'APPLET', 'AREA' ].includes(nodeName) || nodeName === 'INPUT' && actualNode.type.toLowerCase() === 'image'; 16121 19032 } @@ -16251,6 +19162,44 @@ module.exports = { 16251 19162 }; 16252 19163 return text.sanitize(accessibleNameComputation(element, inLabelledByContext)); 16253 19164 }; -1 19165 var autocomplete = { -1 19166 stateTerms: [ 'on', 'off' ], -1 19167 standaloneTerms: [ 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'username', 'new-password', 'current-password', 'organization-title', 'organization', 'street-address', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'url', 'photo' ], -1 19168 qualifiers: [ 'home', 'work', 'mobile', 'fax', 'pager' ], -1 19169 qualifiedTerms: [ 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-local-prefix', 'tel-local-suffix', 'tel-extension', 'email', 'impp' ], -1 19170 locations: [ 'billing', 'shipping' ] -1 19171 }; -1 19172 text.autocomplete = autocomplete; -1 19173 text.isValidAutocomplete = function isValidAutocomplete(autocomplete) { -1 19174 var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$looseTyped = _ref34.looseTyped, looseTyped = _ref34$looseTyped === undefined ? false : _ref34$looseTyped, _ref34$stateTerms = _ref34.stateTerms, stateTerms = _ref34$stateTerms === undefined ? [] : _ref34$stateTerms, _ref34$locations = _ref34.locations, locations = _ref34$locations === undefined ? [] : _ref34$locations, _ref34$qualifiers = _ref34.qualifiers, qualifiers = _ref34$qualifiers === undefined ? [] : _ref34$qualifiers, _ref34$standaloneTerm = _ref34.standaloneTerms, standaloneTerms = _ref34$standaloneTerm === undefined ? [] : _ref34$standaloneTerm, _ref34$qualifiedTerms = _ref34.qualifiedTerms, qualifiedTerms = _ref34$qualifiedTerms === undefined ? [] : _ref34$qualifiedTerms; -1 19175 autocomplete = autocomplete.toLowerCase().trim(); -1 19176 stateTerms = stateTerms.concat(text.autocomplete.stateTerms); -1 19177 if (stateTerms.includes(autocomplete) || autocomplete === '') { -1 19178 return true; -1 19179 } -1 19180 qualifiers = qualifiers.concat(text.autocomplete.qualifiers); -1 19181 locations = locations.concat(text.autocomplete.locations); -1 19182 standaloneTerms = standaloneTerms.concat(text.autocomplete.standaloneTerms); -1 19183 qualifiedTerms = qualifiedTerms.concat(text.autocomplete.qualifiedTerms); -1 19184 var autocompleteTerms = autocomplete.split(/\s+/g); -1 19185 if (!looseTyped) { -1 19186 if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') { -1 19187 autocompleteTerms.shift(); -1 19188 } -1 19189 if (locations.includes(autocompleteTerms[0])) { -1 19190 autocompleteTerms.shift(); -1 19191 } -1 19192 if (qualifiers.includes(autocompleteTerms[0])) { -1 19193 autocompleteTerms.shift(); -1 19194 standaloneTerms = []; -1 19195 } -1 19196 if (autocompleteTerms.length !== 1) { -1 19197 return false; -1 19198 } -1 19199 } -1 19200 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1]; -1 19201 return standaloneTerms.includes(purposeTerm) || qualifiedTerms.includes(purposeTerm); -1 19202 }; 16254 19203 text.labelVirtual = function(node) { 16255 19204 var ref, candidate, doc; 16256 19205 candidate = aria.labelVirtual(node); @@ -16298,6 +19247,17 @@ module.exports = { 16298 19247 element = axe.utils.getNodeFromTree(axe._tree[0], element); 16299 19248 return text.visibleVirtual(element, screenReader, noRecursing); 16300 19249 }; -1 19250 axe.utils.getBaseLang = function getBaseLang(lang) { -1 19251 if (!lang) { -1 19252 return ''; -1 19253 } -1 19254 return lang.trim().split('-')[0].toLowerCase(); -1 19255 }; -1 19256 var htmlTags = [ 'a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'math', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'slot', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr' ]; -1 19257 axe.utils.isHtmlElement = function isHtmlElement(node) { -1 19258 var tagName = node.nodeName.toLowerCase(); -1 19259 return htmlTags.includes(tagName) && node.namespaceURI !== 'http://www.w3.org/2000/svg'; -1 19260 }; 16301 19261 axe.utils.tokenList = function(str) { 16302 19262 'use strict'; 16303 19263 return str.trim().replace(/\s{2,}/g, ' ').split(' '); @@ -16311,8 +19271,9 @@ module.exports = { 16311 19271 }() 16312 19272 }); 16313 19273 })(typeof window === 'object' ? window : this);16314 -1 },{}],13:[function(require,module,exports){16315 -1 var currentVersion = '2.13';-1 19274 }).call(this,require('_process')) -1 19275 },{"_process":1}],14:[function(require,module,exports){ -1 19276 var currentVersion = "2.17"; 16316 19277 16317 19278 /*! 16318 19279 CalcNames: The AccName Computation Prototype, compute the Name and Description property values for a DOM node @@ -16326,763 +19287,1187 @@ Distributed under the terms of the Open Source Initiative OSI - MIT License 16326 19287 16327 19288 // AccName Computation Prototype 16328 19289 var calcNames = function(node, fnc, preventVisualARIASelfCSSRef) { -1 19290 var props = { name: "", desc: "" }; -1 19291 if (!node || node.nodeType !== 1) { -1 19292 return props; -1 19293 } -1 19294 var rootNode = node; -1 19295 -1 19296 // Track nodes to prevent duplicate node reference parsing. -1 19297 var nodes = []; -1 19298 // Track aria-owns references to prevent duplicate parsing. -1 19299 var owns = []; -1 19300 -1 19301 // Recursively process a DOM node to compute an accessible name in accordance with the spec -1 19302 var walk = function( -1 19303 refNode, -1 19304 stop, -1 19305 skip, -1 19306 nodesToIgnoreValues, -1 19307 skipAbort, -1 19308 ownedBy -1 19309 ) { -1 19310 var fullResult = { -1 19311 name: "", -1 19312 title: "" -1 19313 }; 16329 1931416330 -1 var props = {name: '', desc: ''};16331 -1 if (!node || node.nodeType !== 1) {16332 -1 return props;16333 -1 }16334 -1 var topNode = node;16335 -116336 -1 // Track nodes to prevent duplicate node reference parsing.16337 -1 var nodes = [];16338 -1 // Track aria-owns references to prevent duplicate parsing.16339 -1 var owns = [];16340 -116341 -1 // Recursively process a DOM node to compute an accessible name in accordance with the spec16342 -1 var walk = function(refNode, stop, skip, nodesToIgnoreValues, skipAbort, ownedBy) {16343 -1 var fullResult = {16344 -1 name: '',16345 -1 title: ''16346 -1 };16347 -116348 -1 /*16349 -1 ARIA Role Exception Rule Set 1.116350 -1 The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.16351 -1 https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html16352 -1 */16353 -1 var isException = function(node, refNode) {16354 -1 if (!refNode || !node || refNode.nodeType !== 1 || node.nodeType !== 1) {16355 -1 return false;16356 -1 }16357 -116358 -1 var inList = function(node, list) {16359 -1 var role = getRole(node);16360 -1 var tag = node.nodeName.toLowerCase();16361 -1 return (role && list.roles.indexOf(role) >= 0) || (!role && list.tags.indexOf(tag) >= 0);16362 -1 };16363 -116364 -1 // The list3 overrides must be checked first.16365 -1 if (inList(node, list3)) {16366 -1 if (node === refNode && !(node.id && ownedBy[node.id] && ownedBy[node.id].node)) {16367 -1 return !isFocusable(node);16368 -1 } else {16369 -1 // Note: the inParent checker needs to be present to allow for embedded roles matching list3 when the referenced parent is referenced using aria-labelledby, aria-describedby, or aria-owns.16370 -1 return !((inParent(node, ownedBy.top) && node.nodeName.toLowerCase() != 'select') || inList(refNode, list1));16371 -1 }16372 -1 }16373 -1 // Otherwise process list2 to identify roles to ignore processing name from content.16374 -1 else if (inList(node, list2) || (node === topNode && !inList(node, list1))) {16375 -1 return true;16376 -1 }16377 -1 else {16378 -1 return false;16379 -1 }16380 -1 };16381 -116382 -1 var inParent = function(node, parent) {16383 -1 var trackNodes = [];16384 -1 while (node) {16385 -1 if (node.id && ownedBy[node.id] && ownedBy[node.id].node && trackNodes.indexOf(node) === -1) {16386 -1 trackNodes.push(node);16387 -1 node = ownedBy[node.id].node;16388 -1 } else {16389 -1 node = node.parentNode;16390 -1 }16391 -1 if (node && node === parent) {16392 -1 return true;16393 -1 }16394 -1 else if ((!node || node === ownedBy.top) || node === document.body) {16395 -1 return false;16396 -1 }16397 -1 }16398 -1 return false;16399 -1 };16400 -116401 -1 // Placeholder for storing CSS before and after pseudo element text values for the top level node16402 -1 var cssOP = {16403 -1 before: '',16404 -1 after: ''16405 -1 };16406 -116407 -1 if (ownedBy.ref) {16408 -1 if (isParentHidden(refNode, document.body, true, true)) {16409 -1 // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden.16410 -1 return fullResult;16411 -1 }16412 -1 else if (isHidden(refNode, document.body)) {16413 -1 // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states.16414 -1 var ignoreHidden = true;16415 -1 }16416 -1 }-1 19315 /* -1 19316 ARIA Role Exception Rule Set 1.1 -1 19317 The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders. -1 19318 https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html -1 19319 */ -1 19320 var isException = function(node, refNode) { -1 19321 if (!refNode || !node || refNode.nodeType !== 1 || node.nodeType !== 1) { -1 19322 return false; -1 19323 } 16417 1932416418 -1 if (nodes.indexOf(refNode) === -1) {16419 -1 // Store the before and after pseudo element 'content' values for the top level DOM node16420 -1 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.16421 -1 cssOP = getCSSText(refNode, null);-1 19325 var inList = function(node, list) { -1 19326 var role = getRole(node); -1 19327 var tag = node.nodeName.toLowerCase(); -1 19328 return ( -1 19329 (role && list.roles.indexOf(role) >= 0) || -1 19330 (!role && list.tags.indexOf(tag) >= 0) -1 19331 ); -1 19332 }; 16422 1933316423 -1 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips16424 -1 if (preventVisualARIASelfCSSRef) {16425 -1 if (cssOP.before.indexOf(' [ARIA] ') !== -1 || cssOP.before.indexOf(' aria-') !== -1 || cssOP.before.indexOf(' accName: ') !== -1) cssOP.before = '';16426 -1 if (cssOP.after.indexOf(' [ARIA] ') !== -1 || cssOP.after.indexOf(' aria-') !== -1 || cssOP.after.indexOf(' accDescription: ') !== -1) cssOP.after = '';16427 -1 }16428 -1 }-1 19334 // The list3 overrides must be checked first. -1 19335 if (inList(node, list3)) { -1 19336 if ( -1 19337 node === refNode && -1 19338 !(node.id && ownedBy[node.id] && ownedBy[node.id].node) -1 19339 ) { -1 19340 return !isFocusable(node); -1 19341 } else { -1 19342 // Note: the inParent checker needs to be present to allow for embedded roles matching list3 when the referenced parent is referenced using aria-labelledby, aria-describedby, or aria-owns. -1 19343 return !( -1 19344 (inParent(node, ownedBy.top) && -1 19345 node.nodeName.toLowerCase() !== "select") || -1 19346 inList(refNode, list1) -1 19347 ); -1 19348 } -1 19349 } -1 19350 // Otherwise process list2 to identify roles to ignore processing name from content. -1 19351 else if ( -1 19352 inList(node, list2) || -1 19353 (node === rootNode && !inList(node, list1)) -1 19354 ) { -1 19355 return true; -1 19356 } else { -1 19357 return false; -1 19358 } -1 19359 }; 16429 1936016430 -1 // Recursively apply the same naming computation to all nodes within the referenced structure16431 -1 var walkDOM = function(node, fn, refNode) {16432 -1 var res = {16433 -1 name: '',16434 -1 title: ''16435 -1 };16436 -1 if (!node) {16437 -1 return res;16438 -1 }16439 -1 var nodeIsBlock = node && node.nodeType === 1 && isBlockLevelElement(node) ? true : false;16440 -1 var fResult = fn(node) || {};16441 -1 if (fResult.name && fResult.name.length) {16442 -1 res.name += fResult.name;16443 -1 }16444 -1 if (!isException(node, ownedBy.top, ownedBy)) {16445 -1 node = node.firstChild;16446 -1 while (node) {16447 -1 res.name += walkDOM(node, fn, refNode).name;16448 -1 node = node.nextSibling;16449 -1 }16450 -1 }16451 -1 res.name += fResult.owns || '';16452 -1 if (!trim(res.name) && trim(fResult.title)) {16453 -1 res.name = addSpacing(fResult.title);16454 -1 } else {16455 -1 res.title = addSpacing(fResult.title);16456 -1 }16457 -1 if (trim(fResult.desc)) {16458 -1 res.title = addSpacing(fResult.desc);16459 -1 }16460 -1 if (nodeIsBlock || fResult.isWidget) {16461 -1 res.name = addSpacing(res.name);16462 -1 }16463 -1 return res;16464 -1 };-1 19361 var inParent = function(node, parent) { -1 19362 var trackNodes = []; -1 19363 while (node) { -1 19364 if ( -1 19365 node.id && -1 19366 ownedBy[node.id] && -1 19367 ownedBy[node.id].node && -1 19368 trackNodes.indexOf(node) === -1 -1 19369 ) { -1 19370 trackNodes.push(node); -1 19371 node = ownedBy[node.id].node; -1 19372 } else { -1 19373 node = node.parentNode; -1 19374 } -1 19375 if (node && node === parent) { -1 19376 return true; -1 19377 } else if (!node || node === ownedBy.top || node === document.body) { -1 19378 return false; -1 19379 } -1 19380 } -1 19381 return false; -1 19382 }; 16465 1938316466 -1 fullResult = walkDOM(refNode, function(node) {16467 -1 var result = {16468 -1 name: '',16469 -1 title: '',16470 -1 owns: ''16471 -1 };16472 -1 var isEmbeddedNode = node && node.nodeType === 1 && nodesToIgnoreValues && nodesToIgnoreValues.length && nodesToIgnoreValues.indexOf(node) !== -1 && node === topNode && node !== refNode ? true : false;16473 -116474 -1 if ((skip || !node || nodes.indexOf(node) !== -1 || (!ignoreHidden && isHidden(node, ownedBy.top))) && !skipAbort && !isEmbeddedNode) {16475 -1 // Abort if algorithm step is already completed, or if node is a hidden child of refNode, or if this node has already been processed, or skip abort if aria-labelledby self references same node.16476 -1 return result;16477 -1 }-1 19384 // Placeholder for storing CSS before and after pseudo element text values for the top level node -1 19385 var cssOP = { -1 19386 before: "", -1 19387 after: "" -1 19388 }; 16478 1938916479 -1 if (nodes.indexOf(node) === -1) {16480 -1 nodes.push(node);16481 -1 }-1 19390 if (ownedBy.ref) { -1 19391 if (isParentHidden(refNode, document.body, true, true)) { -1 19392 // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden. -1 19393 return fullResult; -1 19394 } else if (isHidden(refNode, document.body)) { -1 19395 // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states. -1 19396 var ignoreHidden = true; -1 19397 } -1 19398 } 16482 1939916483 -1 // Store name for the current node.16484 -1 var name = '';16485 -1 // Store name from aria-owns references if detected.16486 -1 var ariaO = '';16487 -1 // Placeholder for storing CSS before and after pseudo element text values for the current node container element16488 -1 var cssO = {16489 -1 before: '',16490 -1 after: ''16491 -1 };16492 -116493 -1 var parent = refNode === node ? node : node.parentNode;16494 -1 if (nodes.indexOf(parent) === -1) {16495 -1 nodes.push(parent);16496 -1 // Store the before and after pseudo element 'content' values for the current node container element16497 -1 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.16498 -1 cssO = getCSSText(parent, refNode);16499 -116500 -1 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips16501 -1 if (preventVisualARIASelfCSSRef) {16502 -1 if (cssO.before.indexOf(' [ARIA] ') !== -1 || cssO.before.indexOf(' aria-') !== -1 || cssO.before.indexOf(' accName: ') !== -1) cssO.before = '';16503 -1 if (cssO.after.indexOf(' [ARIA] ') !== -1 || cssO.after.indexOf(' aria-') !== -1 || cssO.after.indexOf(' accDescription: ') !== -1) cssO.after = '';16504 -1 }-1 19400 if (nodes.indexOf(refNode) === -1) { -1 19401 // Store the before and after pseudo element 'content' values for the top level DOM node -1 19402 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added. -1 19403 cssOP = getCSSText(refNode, null); -1 19404 -1 19405 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips -1 19406 if (preventVisualARIASelfCSSRef) { -1 19407 if ( -1 19408 cssOP.before.indexOf(" [ARIA] ") !== -1 || -1 19409 cssOP.before.indexOf(" aria-") !== -1 || -1 19410 cssOP.before.indexOf(" accName: ") !== -1 -1 19411 ) -1 19412 cssOP.before = ""; -1 19413 if ( -1 19414 cssOP.after.indexOf(" [ARIA] ") !== -1 || -1 19415 cssOP.after.indexOf(" aria-") !== -1 || -1 19416 cssOP.after.indexOf(" accDescription: ") !== -1 -1 19417 ) -1 19418 cssOP.after = ""; -1 19419 } -1 19420 } 16505 1942116506 -1 }-1 19422 // Recursively apply the same naming computation to all nodes within the referenced structure -1 19423 var walkDOM = function(node, fn, refNode) { -1 19424 var res = { -1 19425 name: "", -1 19426 title: "" -1 19427 }; -1 19428 if (!node) { -1 19429 return res; -1 19430 } -1 19431 var nodeIsBlock = -1 19432 node && node.nodeType === 1 && isBlockLevelElement(node) ? true : false; -1 19433 var fResult = fn(node) || {}; -1 19434 if (fResult.name && fResult.name.length) { -1 19435 res.name += fResult.name; -1 19436 } -1 19437 if (!isException(node, ownedBy.top, ownedBy)) { -1 19438 node = node.firstChild; -1 19439 while (node) { -1 19440 res.name += walkDOM(node, fn, refNode).name; -1 19441 node = node.nextSibling; -1 19442 } -1 19443 } -1 19444 res.name += fResult.owns || ""; -1 19445 if (rootNode === node && !trim(res.name) && trim(fResult.title)) { -1 19446 res.name = addSpacing(fResult.title); -1 19447 } else if (refNode === node && rootNode === node) { -1 19448 res.title = addSpacing(fResult.title); -1 19449 } -1 19450 if (trim(fResult.desc)) { -1 19451 res.title = addSpacing(fResult.desc); -1 19452 } -1 19453 if (nodeIsBlock || fResult.isWidget) { -1 19454 res.name = addSpacing(res.name); -1 19455 } -1 19456 return res; -1 19457 }; 16507 1945816508 -1 // Process standard DOM element node16509 -1 if (node.nodeType === 1) {16510 -116511 -1 var aLabelledby = node.getAttribute('aria-labelledby') || '';16512 -1 var aDescribedby = node.getAttribute('aria-describedby') || '';16513 -1 var aLabel = node.getAttribute('aria-label') || '';16514 -1 var nTitle = node.getAttribute('title') || '';16515 -1 var nTag = node.nodeName.toLowerCase();16516 -1 var nRole = getRole(node);16517 -116518 -1 var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1;16519 -1 var isRangeWidgetRole = rangeWidgetRoles.indexOf(nRole) !== -1;16520 -1 var isEditWidgetRole = editWidgetRoles.indexOf(nRole) !== -1;16521 -1 var isSelectWidgetRole = selectWidgetRoles.indexOf(nRole) !== -1;16522 -1 var isSimulatedFormField = isRangeWidgetRole || isEditWidgetRole || isSelectWidgetRole || nRole == 'combobox';16523 -1 var isWidgetRole = (isSimulatedFormField || otherWidgetRoles.indexOf(nRole) !== -1) && nRole != 'link';16524 -1 result.isWidget = isNativeFormField || isWidgetRole;16525 -116526 -1 var hasName = false;16527 -1 var aOwns = node.getAttribute('aria-owns') || '';16528 -1 var isSeparatChildFormField = (!isEmbeddedNode && ((node !== refNode && (isNativeFormField || isSimulatedFormField)) || (node.id && ownedBy[node.id] && ownedBy[node.id].target && ownedBy[node.id].target === node))) ? true : false;16529 -116530 -1 if (!stop && node === refNode) {16531 -116532 -1 // Check for non-empty value of aria-labelledby if current node equals reference node, follow each ID ref, then stop and process no deeper.16533 -1 if (aLabelledby) {16534 -1 var ids = aLabelledby.split(/\s+/);16535 -1 var parts = [];16536 -1 for (var i = 0; i < ids.length; i++) {16537 -1 var element = document.getElementById(ids[i]);16538 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label16539 -1 parts.push(walk(element, true, skip, [node], element === refNode, {ref: ownedBy, top: element}).name);16540 -1 }16541 -1 // Check for blank value, since whitespace chars alone are not valid as a name16542 -1 name = trim(parts.join(' '));16543 -116544 -1 if (trim(name)) {16545 -1 hasName = true;16546 -1 // Abort further recursion if name is valid.16547 -1 skip = true;16548 -1 }16549 -1 }-1 19459 fullResult = walkDOM( -1 19460 refNode, -1 19461 function(node) { -1 19462 var i = 0; -1 19463 var element = null; -1 19464 var ids = []; -1 19465 var parts = []; -1 19466 var result = { -1 19467 name: "", -1 19468 title: "", -1 19469 owns: "" -1 19470 }; -1 19471 var isEmbeddedNode = -1 19472 node && -1 19473 node.nodeType === 1 && -1 19474 nodesToIgnoreValues && -1 19475 nodesToIgnoreValues.length && -1 19476 nodesToIgnoreValues.indexOf(node) !== -1 && -1 19477 node === rootNode && -1 19478 node !== refNode -1 19479 ? true -1 19480 : false; -1 19481 -1 19482 if ( -1 19483 (skip || -1 19484 !node || -1 19485 nodes.indexOf(node) !== -1 || -1 19486 (!ignoreHidden && isHidden(node, ownedBy.top))) && -1 19487 !skipAbort && -1 19488 !isEmbeddedNode -1 19489 ) { -1 19490 // Abort if algorithm step is already completed, or if node is a hidden child of refNode, or if this node has already been processed, or skip abort if aria-labelledby self references same node. -1 19491 return result; -1 19492 } 16550 1949316551 -1 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.16552 -1 if (aDescribedby) {16553 -1 var desc = '';16554 -1 ids = aDescribedby.split(/\s+/);16555 -1 var parts = [];16556 -1 for (var i = 0; i < ids.length; i++) {16557 -1 var element = document.getElementById(ids[i]);16558 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label16559 -1 parts.push(walk(element, true, false, [node], false, {ref: ownedBy, top: element}).name);16560 -1 }16561 -1 // Check for blank value, since whitespace chars alone are not valid as a name16562 -1 desc = trim(parts.join(' '));16563 -116564 -1 if (trim(desc)) {16565 -1 result.desc = desc;16566 -1 }16567 -1 }-1 19494 if (nodes.indexOf(node) === -1) { -1 19495 nodes.push(node); -1 19496 } 16568 1949716569 -1 }-1 19498 // Store name for the current node. -1 19499 var name = ""; -1 19500 // Store name from aria-owns references if detected. -1 19501 var ariaO = ""; -1 19502 // Placeholder for storing CSS before and after pseudo element text values for the current node container element -1 19503 var cssO = { -1 19504 before: "", -1 19505 after: "" -1 19506 }; 16570 1950716571 -1 // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch.16572 -1 if (isSeparatChildFormField) {16573 -116574 -1 // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus.16575 -1 if (!(nodesToIgnoreValues && nodesToIgnoreValues.length && nodesToIgnoreValues.indexOf(node) !== -1)) {16576 -116577 -1 if (isRangeWidgetRole) {16578 -1 // For range widgets, append aria-valuetext if non-empty, or aria-valuenow if non-empty, or node.value if applicable.16579 -1 name = getObjectValue(nRole, node, true);16580 -1 }16581 -1 else if (isEditWidgetRole || (nRole == 'combobox' && isNativeFormField)) {16582 -1 // For simulated edit widgets, append text from content if applicable, or node.value if applicable.16583 -1 name = getObjectValue(nRole, node, false, true);16584 -1 }16585 -1 else if (isSelectWidgetRole) {16586 -1 // For simulated select widgets, append same naming computation algorithm for all child nodes including aria-selected="true" separated by a space when multiple.16587 -1 // Also filter nodes so that only valid child roles of relevant parent role that include aria-selected="true" are included.16588 -1 name = getObjectValue(nRole, node, false, false, true);16589 -1 }16590 -1 else if (isNativeFormField && ['input', 'textarea'].indexOf(nTag) !== -1 && (!isWidgetRole || isEditWidgetRole)) {16591 -1 // For native edit fields, append node.value when applicable.16592 -1 name = getObjectValue(nRole, node, false, false, false, true);16593 -1 }16594 -1 else if (isNativeFormField && nTag === 'select' && (!isWidgetRole || nRole == 'combobox')) {16595 -1 // For native select fields, get text from content for all options with selected attribute separated by a space when multiple, but don't process if another widget role is present unless it matches role="combobox".16596 -1 // Reference: https://github.com/WhatSock/w3c-alternative-text-computation/issues/716597 -1 name = getObjectValue(nRole, node, false, false, true, true);16598 -1 }16599 -116600 -1 // Check for blank value, since whitespace chars alone are not valid as a name16601 -1 name = trim(name);-1 19508 var parent = refNode === node ? node : node.parentNode; -1 19509 if (nodes.indexOf(parent) === -1) { -1 19510 nodes.push(parent); -1 19511 // Store the before and after pseudo element 'content' values for the current node container element -1 19512 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added. -1 19513 cssO = getCSSText(parent, refNode); -1 19514 -1 19515 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips -1 19516 if (preventVisualARIASelfCSSRef) { -1 19517 if ( -1 19518 cssO.before.indexOf(" [ARIA] ") !== -1 || -1 19519 cssO.before.indexOf(" aria-") !== -1 || -1 19520 cssO.before.indexOf(" accName: ") !== -1 -1 19521 ) -1 19522 cssO.before = ""; -1 19523 if ( -1 19524 cssO.after.indexOf(" [ARIA] ") !== -1 || -1 19525 cssO.after.indexOf(" aria-") !== -1 || -1 19526 cssO.after.indexOf(" accDescription: ") !== -1 -1 19527 ) -1 19528 cssO.after = ""; -1 19529 } -1 19530 } -1 19531 -1 19532 // Process standard DOM element node -1 19533 if (node.nodeType === 1) { -1 19534 var aLabelledby = node.getAttribute("aria-labelledby") || ""; -1 19535 var aDescribedby = node.getAttribute("aria-describedby") || ""; -1 19536 var aLabel = node.getAttribute("aria-label") || ""; -1 19537 var nTitle = node.getAttribute("title") || ""; -1 19538 var nTag = node.nodeName.toLowerCase(); -1 19539 var nRole = getRole(node); -1 19540 -1 19541 var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1; -1 19542 var isNativeButton = ["input"].indexOf(nTag) !== -1; -1 19543 var isRangeWidgetRole = rangeWidgetRoles.indexOf(nRole) !== -1; -1 19544 var isEditWidgetRole = editWidgetRoles.indexOf(nRole) !== -1; -1 19545 var isSelectWidgetRole = selectWidgetRoles.indexOf(nRole) !== -1; -1 19546 var isSimulatedFormField = -1 19547 isRangeWidgetRole || -1 19548 isEditWidgetRole || -1 19549 isSelectWidgetRole || -1 19550 nRole === "combobox"; -1 19551 var isWidgetRole = -1 19552 (isSimulatedFormField || otherWidgetRoles.indexOf(nRole) !== -1) && -1 19553 nRole !== "link"; -1 19554 result.isWidget = isNativeFormField || isWidgetRole; -1 19555 -1 19556 var hasName = false; -1 19557 var aOwns = node.getAttribute("aria-owns") || ""; -1 19558 var isSeparatChildFormField = -1 19559 !isEmbeddedNode && -1 19560 ((node !== refNode && -1 19561 (isNativeFormField || isSimulatedFormField)) || -1 19562 (node.id && -1 19563 ownedBy[node.id] && -1 19564 ownedBy[node.id].target && -1 19565 ownedBy[node.id].target === node)) -1 19566 ? true -1 19567 : false; -1 19568 -1 19569 if (!stop && node === refNode) { -1 19570 // Check for non-empty value of aria-labelledby if current node equals reference node, follow each ID ref, then stop and process no deeper. -1 19571 if (aLabelledby) { -1 19572 ids = aLabelledby.split(/\s+/); -1 19573 parts = []; -1 19574 for (i = 0; i < ids.length; i++) { -1 19575 element = document.getElementById(ids[i]); -1 19576 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label -1 19577 parts.push( -1 19578 walk(element, true, skip, [node], element === refNode, { -1 19579 ref: ownedBy, -1 19580 top: element -1 19581 }).name -1 19582 ); -1 19583 } -1 19584 // Check for blank value, since whitespace chars alone are not valid as a name -1 19585 name = trim(parts.join(" ")); 16602 1958616603 -1 }-1 19587 if (trim(name)) { -1 19588 hasName = true; -1 19589 // Abort further recursion if name is valid. -1 19590 skip = true; -1 19591 } -1 19592 } 16604 1959316605 -1 if (trim(name)) {16606 -1 hasName = true;16607 -1 }16608 -1 }-1 19594 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper. -1 19595 if (aDescribedby) { -1 19596 var desc = ""; -1 19597 ids = aDescribedby.split(/\s+/); -1 19598 parts = []; -1 19599 for (i = 0; i < ids.length; i++) { -1 19600 element = document.getElementById(ids[i]); -1 19601 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label -1 19602 parts.push( -1 19603 walk(element, true, false, [node], false, { -1 19604 ref: ownedBy, -1 19605 top: element -1 19606 }).name -1 19607 ); -1 19608 } -1 19609 // Check for blank value, since whitespace chars alone are not valid as a name -1 19610 desc = trim(parts.join(" ")); 16609 1961116610 -1 // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.16611 -1 if (!hasName && trim(aLabel) && !isSeparatChildFormField) {16612 -1 name = aLabel;16613 -116614 -1 // Check for blank value, since whitespace chars alone are not valid as a name16615 -1 if (trim(name)) {16616 -1 hasName = true;16617 -1 if (node === refNode) {16618 -1 // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.16619 -1 skip = true;16620 -1 }16621 -1 }16622 -1 }-1 19612 if (trim(desc)) { -1 19613 result.desc = desc; -1 19614 } -1 19615 } -1 19616 } 16623 1961716624 -1 // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.16625 -1 if (!hasName && node === refNode && isNativeFormField) {16626 -116627 -1 // Logic modified to match issue16628 -1 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */16629 -1 var labels = document.querySelectorAll('label');16630 -1 var implicitLabel = getParent(node, 'label') || false;16631 -1 var explicitLabel = node.id && document.querySelectorAll('label[for="' + node.id + '"]').length ? document.querySelector('label[for="' + node.id + '"]') : false;16632 -1 var implicitI = 0;16633 -1 var explicitI = 0;16634 -1 for (var i = 0; i < labels.length; i++) {16635 -1 if (labels[i] === implicitLabel) {16636 -1 implicitI = i;16637 -1 }16638 -1 else if (labels[i] === explicitLabel) {16639 -1 explicitI = i;16640 -1 }16641 -1 }16642 -1 var isImplicitFirst = implicitLabel && implicitLabel.nodeType === 1 && explicitLabel && explicitLabel.nodeType === 1 && implicitI < explicitI ? true : false;-1 19618 // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch. -1 19619 if (isSeparatChildFormField) { -1 19620 // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus. -1 19621 if ( -1 19622 !( -1 19623 nodesToIgnoreValues && -1 19624 nodesToIgnoreValues.length && -1 19625 nodesToIgnoreValues.indexOf(node) !== -1 -1 19626 ) -1 19627 ) { -1 19628 if (isRangeWidgetRole) { -1 19629 // For range widgets, append aria-valuetext if non-empty, or aria-valuenow if non-empty, or node.value if applicable. -1 19630 name = getObjectValue(nRole, node, true); -1 19631 } else if ( -1 19632 isEditWidgetRole || -1 19633 (nRole === "combobox" && isNativeFormField) -1 19634 ) { -1 19635 // For simulated edit widgets, append text from content if applicable, or node.value if applicable. -1 19636 name = getObjectValue(nRole, node, false, true); -1 19637 } else if (isSelectWidgetRole) { -1 19638 // For simulated select widgets, append same naming computation algorithm for all child nodes including aria-selected="true" separated by a space when multiple. -1 19639 // Also filter nodes so that only valid child roles of relevant parent role that include aria-selected="true" are included. -1 19640 name = getObjectValue(nRole, node, false, false, true); -1 19641 } else if ( -1 19642 isNativeFormField && -1 19643 ["input", "textarea"].indexOf(nTag) !== -1 && -1 19644 (!isWidgetRole || isEditWidgetRole) -1 19645 ) { -1 19646 // For native edit fields, append node.value when applicable. -1 19647 name = getObjectValue(nRole, node, false, false, false, true); -1 19648 } else if ( -1 19649 isNativeFormField && -1 19650 nTag === "select" && -1 19651 (!isWidgetRole || nRole === "combobox") -1 19652 ) { -1 19653 // For native select fields, get text from content for all options with selected attribute separated by a space when multiple, but don't process if another widget role is present unless it matches role="combobox". -1 19654 // Reference: https://github.com/WhatSock/w3c-alternative-text-computation/issues/7 -1 19655 name = getObjectValue(nRole, node, false, false, true, true); -1 19656 } 16643 1965716644 -1 if (implicitLabel && explicitLabel && isImplicitFirst) {16645 -1 // Check for blank value, since whitespace chars alone are not valid as a name16646 -1 name = trim(walk(implicitLabel, true, skip, [node], false, {ref: ownedBy, top: implicitLabel}).name + ' ' + walk(explicitLabel, true, skip, [node], false, {ref: ownedBy, top: explicitLabel}).name);16647 -1 }16648 -1 else if (explicitLabel && implicitLabel) {16649 -1 // Check for blank value, since whitespace chars alone are not valid as a name16650 -1 name = trim(walk(explicitLabel, true, skip, [node], false, {ref: ownedBy, top: explicitLabel}).name + ' ' + walk(implicitLabel, true, skip, [node], false, {ref: ownedBy, top: implicitLabel}).name);16651 -1 }16652 -1 else if (explicitLabel) {16653 -1 // Check for blank value, since whitespace chars alone are not valid as a name16654 -1 name = trim(walk(explicitLabel, true, skip, [node], false, {ref: ownedBy, top: explicitLabel}).name);16655 -1 }16656 -1 else if (implicitLabel) {16657 -1 // Check for blank value, since whitespace chars alone are not valid as a name16658 -1 name = trim(walk(implicitLabel, true, skip, [node], false, {ref: ownedBy, top: implicitLabel}).name);16659 -1 }-1 19658 // Check for blank value, since whitespace chars alone are not valid as a name -1 19659 name = trim(name); -1 19660 } 16660 1966116661 -1 if (trim(name)) {16662 -1 hasName = true;16663 -1 }16664 -1 }-1 19662 if (trim(name)) { -1 19663 hasName = true; -1 19664 } -1 19665 } 16665 1966616666 -1 var rolePresentation = !hasName && nRole && presentationRoles.indexOf(nRole) !== -1 && !isFocusable(node) && !hasGlobalAttr(node) ? true : false;16667 -1 var nAlt = rolePresentation ? '' : trim(node.getAttribute('alt'));-1 19667 // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch. -1 19668 if (!hasName && trim(aLabel) && !isSeparatChildFormField) { -1 19669 name = aLabel; 16668 1967016669 -1 // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name.16670 -1 if (!hasName && !rolePresentation && (nTag == 'img' || (nTag == 'input' && node.getAttribute('type') == 'image')) && nAlt) {16671 -1 // Check for blank value, since whitespace chars alone are not valid as a name16672 -1 name = trim(nAlt);16673 -1 if (trim(name)) {16674 -1 hasName = true;16675 -1 }16676 -1 }-1 19671 // Check for blank value, since whitespace chars alone are not valid as a name -1 19672 if (trim(name)) { -1 19673 hasName = true; -1 19674 if (node === refNode) { -1 19675 // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch. -1 19676 skip = true; -1 19677 } -1 19678 } -1 19679 } 16677 1968016678 -1 // Otherwise, if current node is non-presentational and includes a non-empty title attribute and is not a separate embedded form field, store title attribute value as the accessible name if name is still empty, or the description if not.16679 -1 if (!rolePresentation && trim(nTitle) && !isSeparatChildFormField) {16680 -1 // Check for blank value, since whitespace chars alone are not valid as a name16681 -1 result.title = trim(nTitle);16682 -1 }-1 19681 // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm. -1 19682 if (!hasName && node === refNode && isNativeFormField) { -1 19683 // Logic modified to match issue -1 19684 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */ -1 19685 var labels = document.querySelectorAll("label"); -1 19686 var implicitLabel = getParent(node, "label") || false; -1 19687 var explicitLabel = -1 19688 node.id && -1 19689 document.querySelectorAll('label[for="' + node.id + '"]').length -1 19690 ? document.querySelector('label[for="' + node.id + '"]') -1 19691 : false; -1 19692 var implicitI = 0; -1 19693 var explicitI = 0; -1 19694 for (i = 0; i < labels.length; i++) { -1 19695 if (labels[i] === implicitLabel) { -1 19696 implicitI = i; -1 19697 } else if (labels[i] === explicitLabel) { -1 19698 explicitI = i; -1 19699 } -1 19700 } -1 19701 var isImplicitFirst = -1 19702 implicitLabel && -1 19703 implicitLabel.nodeType === 1 && -1 19704 explicitLabel && -1 19705 explicitLabel.nodeType === 1 && -1 19706 implicitI < explicitI -1 19707 ? true -1 19708 : false; -1 19709 -1 19710 if (explicitLabel) { -1 19711 var eLblName = trim( -1 19712 walk(explicitLabel, true, skip, [node], false, { -1 19713 ref: ownedBy, -1 19714 top: explicitLabel -1 19715 }).name -1 19716 ); -1 19717 } -1 19718 if (implicitLabel && implicitLabel !== explicitLabel) { -1 19719 var iLblName = trim( -1 19720 walk(implicitLabel, true, skip, [node], false, { -1 19721 ref: ownedBy, -1 19722 top: implicitLabel -1 19723 }).name -1 19724 ); -1 19725 } 16683 1972616684 -1 // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation.16685 -1 // Also abort aria-owns processing if contained on an element that does not support child elements.16686 -1 if (aOwns && !isNativeFormField && nTag != 'img') {16687 -1 var ids = aOwns.split(/\s+/);16688 -1 var parts = [];16689 -1 for (var i = 0; i < ids.length; i++) {16690 -1 var element = document.getElementById(ids[i]);16691 -1 // Abort processing if the referenced node has already been traversed16692 -1 if (element && owns.indexOf(ids[i]) === -1) {16693 -1 owns.push(ids[i]);16694 -1 var oBy = {ref: ownedBy, top: ownedBy.top};16695 -1 oBy[ids[i]] = {16696 -1 refNode: refNode,16697 -1 node: node,16698 -1 target: element16699 -1 };16700 -1 if (!isParentHidden(element, document.body, true)) {16701 -1 parts.push(walk(element, true, skip, [], false, oBy).name);16702 -1 }16703 -1 }16704 -1 }16705 -1 // Join without adding whitespace since this is already handled by parsing individual nodes within the algorithm steps.16706 -1 ariaO = parts.join('');16707 -1 }-1 19727 if (iLblName && eLblName && isImplicitFirst) { -1 19728 name = iLblName + " " + eLblName; -1 19729 } else if (eLblName && iLblName) { -1 19730 name = eLblName + " " + iLblName; -1 19731 } else if (eLblName) { -1 19732 name = eLblName; -1 19733 } else if (iLblName) { -1 19734 name = iLblName; -1 19735 } 16708 1973616709 -1 }-1 19737 if (trim(name)) { -1 19738 hasName = true; -1 19739 } -1 19740 } 16710 1974116711 -1 // Otherwise, process text node16712 -1 else if (node.nodeType === 3) {16713 -1 name = node.data;16714 -1 }-1 19742 // Process native form field buttons in accordance with the HTML AAM -1 19743 // https://w3c.github.io/html-aam/#accessible-name-and-description-computation -1 19744 var btnType = (isNativeButton && node.getAttribute("type")) || false; -1 19745 var btnValue = (btnType && trim(node.getAttribute("value"))) || false; -1 19746 -1 19747 var rolePresentation = -1 19748 !hasName && -1 19749 nRole && -1 19750 presentationRoles.indexOf(nRole) !== -1 && -1 19751 !isFocusable(node) && -1 19752 !hasGlobalAttr(node) -1 19753 ? true -1 19754 : false; -1 19755 var nAlt = rolePresentation ? "" : trim(node.getAttribute("alt")); -1 19756 -1 19757 // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name. -1 19758 if ( -1 19759 !hasName && -1 19760 !rolePresentation && -1 19761 (nTag === "img" || btnType === "image") && -1 19762 nAlt -1 19763 ) { -1 19764 // Check for blank value, since whitespace chars alone are not valid as a name -1 19765 name = trim(nAlt); -1 19766 if (trim(name)) { -1 19767 hasName = true; -1 19768 } -1 19769 } 16715 1977016716 -1 // Prepend and append the current CSS pseudo element text, plus normalize all whitespace such as newline characters and others into flat spaces.16717 -1 name = cssO.before + name.replace(/\s+/g, ' ') + cssO.after;-1 19771 if ( -1 19772 !hasName && -1 19773 node === refNode && -1 19774 btnType && -1 19775 ["button", "image", "submit", "reset"].indexOf(btnType) !== -1 -1 19776 ) { -1 19777 if (btnValue) { -1 19778 name = btnValue; -1 19779 } else { -1 19780 switch (btnType) { -1 19781 case "submit": -1 19782 case "image": -1 19783 name = "Submit Query"; -1 19784 break; -1 19785 case "reset": -1 19786 name = "Reset"; -1 19787 break; -1 19788 default: -1 19789 name = ""; -1 19790 } -1 19791 } -1 19792 if (trim(name)) { -1 19793 hasName = true; -1 19794 } -1 19795 } 16718 1979616719 -1 if (name.length && !hasParentLabelOrHidden(node, ownedBy.top, ownedBy, ignoreHidden)) {16720 -1 result.name = name;16721 -1 }-1 19797 if ( -1 19798 hasName && -1 19799 node === refNode && -1 19800 btnType && -1 19801 ["button", "submit", "reset"].indexOf(btnType) !== -1 && -1 19802 btnValue && -1 19803 btnValue !== name && -1 19804 !result.desc -1 19805 ) { -1 19806 result.desc = btnValue; -1 19807 } -1 19808 -1 19809 // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute and is not a separate embedded form field, store title attribute value as the accessible name if name is still empty, or the description if not. -1 19810 if ( -1 19811 node === rootNode && -1 19812 !rolePresentation && -1 19813 trim(nTitle) && -1 19814 !isSeparatChildFormField -1 19815 ) { -1 19816 result.title = trim(nTitle); -1 19817 } -1 19818 -1 19819 // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation. -1 19820 // Also abort aria-owns processing if contained on an element that does not support child elements. -1 19821 if (aOwns && !isNativeFormField && nTag !== "img") { -1 19822 ids = aOwns.split(/\s+/); -1 19823 parts = []; -1 19824 for (i = 0; i < ids.length; i++) { -1 19825 element = document.getElementById(ids[i]); -1 19826 // Abort processing if the referenced node has already been traversed -1 19827 if (element && owns.indexOf(ids[i]) === -1) { -1 19828 owns.push(ids[i]); -1 19829 var oBy = { ref: ownedBy, top: ownedBy.top }; -1 19830 oBy[ids[i]] = { -1 19831 refNode: refNode, -1 19832 node: node, -1 19833 target: element -1 19834 }; -1 19835 if (!isParentHidden(element, document.body, true)) { -1 19836 parts.push(walk(element, true, skip, [], false, oBy).name); -1 19837 } -1 19838 } -1 19839 } -1 19840 // Join without adding whitespace since this is already handled by parsing individual nodes within the algorithm steps. -1 19841 ariaO = parts.join(""); -1 19842 } -1 19843 } 16722 1984416723 -1 result.owns = ariaO;-1 19845 // Otherwise, process text node -1 19846 else if (node.nodeType === 3) { -1 19847 name = node.data; -1 19848 } 16724 1984916725 -1 return result;16726 -1 }, refNode);-1 19850 // Prepend and append the current CSS pseudo element text, plus normalize all whitespace such as newline characters and others into flat spaces. -1 19851 name = cssO.before + name.replace(/\s+/g, " ") + cssO.after; 16727 1985216728 -1 // Prepend and append the refObj CSS pseudo element text, plus normalize whitespace chars into flat spaces.16729 -1 fullResult.name = cssOP.before + fullResult.name.replace(/\s+/g, ' ') + cssOP.after;-1 19853 if ( -1 19854 name.length && -1 19855 !hasParentLabelOrHidden(node, ownedBy.top, ownedBy, ignoreHidden) -1 19856 ) { -1 19857 result.name = name; -1 19858 } 16730 1985916731 -1 return fullResult;16732 -1 };-1 19860 result.owns = ariaO; 16733 1986116734 -1 var getRole = function(node) {16735 -1 var role = node && node.getAttribute ? node.getAttribute('role') : '';16736 -1 if (!trim(role)) {16737 -1 return '';16738 -1 }16739 -1 var inList = function(list) {16740 -1 return trim(role).length > 0 && list.roles.indexOf(role) >= 0;16741 -1 };16742 -1 var roles = role.split(/\s+/);16743 -1 for (var i = 0; i < roles.length; i++) {16744 -1 role = roles[i];16745 -1 if (inList(list1) || inList(list2) || inList(list3) || presentationRoles.indexOf(role) !== -1) {16746 -1 return role;16747 -1 }16748 -1 }16749 -1 return '';16750 -1 };-1 19862 return result; -1 19863 }, -1 19864 refNode -1 19865 ); 16751 1986616752 -1 var isFocusable = function(node) {16753 -1 var nodeName = node.nodeName.toLowerCase();16754 -1 if (node.getAttribute('tabindex')) {16755 -1 return true;16756 -1 }16757 -1 if (nodeName === 'a' && node.getAttribute('href')) {16758 -1 return true;16759 -1 }16760 -1 if (['button', 'input', 'select'].indexOf(nodeName) !== -1 && node.getAttribute('type') !== 'hidden') {16761 -1 return true;16762 -1 }16763 -1 return false;16764 -1 };-1 19867 // Prepend and append the refObj CSS pseudo element text, plus normalize whitespace chars into flat spaces. -1 19868 fullResult.name = -1 19869 cssOP.before + fullResult.name.replace(/\s+/g, " ") + cssOP.after; 16765 1987016766 -1 // ARIA Role Exception Rule Set 1.116767 -1 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.16768 -1 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html-1 19871 return fullResult; -1 19872 }; 16769 1987316770 -1 // Always include name from content when the referenced node matches list1, as well as when child nodes match those within list316771 -1 // Note: gridcell was added to list1 to account for focusable gridcells that match the ARIA 1.0 paradigm for interactive grids.16772 -1 var list1 = {16773 -1 roles: ['button', 'checkbox', 'link', 'option', 'radio', 'switch', 'tab', 'treeitem', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'cell', 'gridcell', 'columnheader', 'rowheader', 'tooltip', 'heading'],16774 -1 tags: ['a', 'button', 'summary', 'input', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'menuitem', 'option', 'td', 'th']16775 -1 };16776 -1 // Never include name from content when current node matches list216777 -1 var list2 = {16778 -1 roles: ['application', 'alert', 'log', 'marquee', 'timer', 'alertdialog', 'dialog', 'banner', 'complementary', 'form', 'main', 'navigation', 'region', 'search', 'article', 'document', 'feed', 'figure', 'img', 'math', 'toolbar', 'menu', 'menubar', 'grid', 'listbox', 'radiogroup', 'textbox', 'searchbox', 'spinbutton', 'scrollbar', 'slider', 'tablist', 'tabpanel', 'tree', 'treegrid', 'separator'],16779 -1 tags: ['article', 'aside', 'body', 'select', 'datalist', 'optgroup', 'dialog', 'figure', 'footer', 'form', 'header', 'hr', 'img', 'textarea', 'input', 'main', 'math', 'menu', 'nav', 'section']16780 -1 };16781 -1 // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node matches list1.16782 -1 var list3 = {16783 -1 roles: ['term', 'definition', 'directory', 'list', 'group', 'note', 'status', 'table', 'rowgroup', 'row', 'contentinfo'],16784 -1 tags: ['dl', 'ul', 'ol', 'dd', 'details', 'output', 'table', 'thead', 'tbody', 'tfoot', 'tr']16785 -1 };-1 19874 var getRole = function(node) { -1 19875 var role = node && node.getAttribute ? node.getAttribute("role") : ""; -1 19876 if (!trim(role)) { -1 19877 return ""; -1 19878 } -1 19879 var inList = function(list) { -1 19880 return trim(role).length > 0 && list.roles.indexOf(role) >= 0; -1 19881 }; -1 19882 var roles = role.split(/\s+/); -1 19883 for (var i = 0; i < roles.length; i++) { -1 19884 role = roles[i]; -1 19885 if ( -1 19886 inList(list1) || -1 19887 inList(list2) || -1 19888 inList(list3) || -1 19889 presentationRoles.indexOf(role) !== -1 -1 19890 ) { -1 19891 return role; -1 19892 } -1 19893 } -1 19894 return ""; -1 19895 }; 16786 1989616787 -1 var nativeFormFields = ['button', 'input', 'select', 'textarea'];16788 -1 var rangeWidgetRoles = ['scrollbar', 'slider', 'spinbutton'];16789 -1 var editWidgetRoles = ['searchbox', 'textbox'];16790 -1 var selectWidgetRoles = ['grid', 'listbox', 'tablist', 'tree', 'treegrid'];16791 -1 var otherWidgetRoles = ['button', 'checkbox', 'link', 'switch', 'option', 'menu', 'menubar', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'radio', 'tab', 'treeitem', 'gridcell'];16792 -1 var presentationRoles = ['presentation', 'none'];16793 -116794 -1 var hasGlobalAttr = function(node) {16795 -1 var globalPropsAndStates = ['busy', 'controls', 'current', 'describedby', 'details', 'disabled', 'dropeffect', 'errormessage', 'flowto', 'grabbed', 'haspopup', 'invalid', 'keyshortcuts', 'live', 'owns', 'roledescription'];16796 -1 for (var i = 0; i < globalPropsAndStates.length; i++) {16797 -1 var a = trim(node.getAttribute('aria-' + globalPropsAndStates[i]));16798 -1 if (a) {16799 -1 return true;16800 -1 }16801 -1 }16802 -1 return false;16803 -1 };-1 19897 var isFocusable = function(node) { -1 19898 var nodeName = node.nodeName.toLowerCase(); -1 19899 if (node.getAttribute("tabindex")) { -1 19900 return true; -1 19901 } -1 19902 if (nodeName === "a" && node.getAttribute("href")) { -1 19903 return true; -1 19904 } -1 19905 if ( -1 19906 ["button", "input", "select", "textarea"].indexOf(nodeName) !== -1 && -1 19907 node.getAttribute("type") !== "hidden" -1 19908 ) { -1 19909 return true; -1 19910 } -1 19911 return false; -1 19912 }; 16804 1991316805 -1 var isHidden = function(node, refNode) {16806 -1 var hidden = function(node) {16807 -1 if (node.nodeType !== 1 || node == refNode) {16808 -1 return false;16809 -1 }16810 -1 if (node.getAttribute('aria-hidden') === 'true') {16811 -1 return true;16812 -1 }16813 -1 if (node.getAttribute('hidden')) {16814 -1 return true;16815 -1 }16816 -1 var style = getStyleObject(node);16817 -1 if (style['display'] === 'none' || style['visibility'] === 'hidden') {16818 -1 return true;16819 -1 }16820 -1 return false;16821 -1 };16822 -1 return hidden(node);16823 -1 };-1 19914 // ARIA Role Exception Rule Set 1.1 -1 19915 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders. -1 19916 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html -1 19917 -1 19918 // Always include name from content when the referenced node matches list1, as well as when child nodes match those within list3 -1 19919 // Note: gridcell was added to list1 to account for focusable gridcells that match the ARIA 1.0 paradigm for interactive grids. -1 19920 var list1 = { -1 19921 roles: [ -1 19922 "button", -1 19923 "checkbox", -1 19924 "link", -1 19925 "option", -1 19926 "radio", -1 19927 "switch", -1 19928 "tab", -1 19929 "treeitem", -1 19930 "menuitem", -1 19931 "menuitemcheckbox", -1 19932 "menuitemradio", -1 19933 "cell", -1 19934 "gridcell", -1 19935 "columnheader", -1 19936 "rowheader", -1 19937 "tooltip", -1 19938 "heading" -1 19939 ], -1 19940 tags: [ -1 19941 "a", -1 19942 "button", -1 19943 "summary", -1 19944 "input", -1 19945 "h1", -1 19946 "h2", -1 19947 "h3", -1 19948 "h4", -1 19949 "h5", -1 19950 "h6", -1 19951 "menuitem", -1 19952 "option", -1 19953 "td", -1 19954 "th" -1 19955 ] -1 19956 }; -1 19957 // Never include name from content when current node matches list2 -1 19958 var list2 = { -1 19959 roles: [ -1 19960 "application", -1 19961 "alert", -1 19962 "log", -1 19963 "marquee", -1 19964 "timer", -1 19965 "alertdialog", -1 19966 "dialog", -1 19967 "banner", -1 19968 "complementary", -1 19969 "form", -1 19970 "main", -1 19971 "navigation", -1 19972 "region", -1 19973 "search", -1 19974 "article", -1 19975 "document", -1 19976 "feed", -1 19977 "figure", -1 19978 "img", -1 19979 "math", -1 19980 "toolbar", -1 19981 "menu", -1 19982 "menubar", -1 19983 "grid", -1 19984 "listbox", -1 19985 "radiogroup", -1 19986 "textbox", -1 19987 "searchbox", -1 19988 "spinbutton", -1 19989 "scrollbar", -1 19990 "slider", -1 19991 "tablist", -1 19992 "tabpanel", -1 19993 "tree", -1 19994 "treegrid", -1 19995 "separator" -1 19996 ], -1 19997 tags: [ -1 19998 "article", -1 19999 "aside", -1 20000 "body", -1 20001 "select", -1 20002 "datalist", -1 20003 "optgroup", -1 20004 "dialog", -1 20005 "figure", -1 20006 "footer", -1 20007 "form", -1 20008 "header", -1 20009 "hr", -1 20010 "img", -1 20011 "textarea", -1 20012 "input", -1 20013 "main", -1 20014 "math", -1 20015 "menu", -1 20016 "nav", -1 20017 "section" -1 20018 ] -1 20019 }; -1 20020 // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node matches list1. -1 20021 var list3 = { -1 20022 roles: [ -1 20023 "term", -1 20024 "definition", -1 20025 "directory", -1 20026 "list", -1 20027 "group", -1 20028 "note", -1 20029 "status", -1 20030 "table", -1 20031 "rowgroup", -1 20032 "row", -1 20033 "contentinfo" -1 20034 ], -1 20035 tags: [ -1 20036 "dl", -1 20037 "ul", -1 20038 "ol", -1 20039 "dd", -1 20040 "details", -1 20041 "output", -1 20042 "table", -1 20043 "thead", -1 20044 "tbody", -1 20045 "tfoot", -1 20046 "tr" -1 20047 ] -1 20048 }; 16824 2004916825 -1 var isParentHidden = function(node, refNode, skipOwned, skipCurrent) {16826 -1 var trackNodes = [];16827 -1 while (node && node !== refNode) {16828 -1 if (!skipCurrent && node.nodeType === 1 && isHidden(node, refNode)) {16829 -1 return true;16830 -1 } else skipCurrent = false;16831 -1 if (!skipOwned && node.id && ownedBy && ownedBy[node.id] && ownedBy[node.id].node && trackNodes.indexOf(node) === -1) {16832 -1 trackNodes.push(node);16833 -1 node = ownedBy[node.id].node;16834 -1 } else {16835 -1 node = node.parentNode;16836 -1 }16837 -1 }16838 -1 return false;16839 -1 };-1 20050 var nativeFormFields = ["button", "input", "select", "textarea"]; -1 20051 var rangeWidgetRoles = ["scrollbar", "slider", "spinbutton"]; -1 20052 var editWidgetRoles = ["searchbox", "textbox"]; -1 20053 var selectWidgetRoles = ["grid", "listbox", "tablist", "tree", "treegrid"]; -1 20054 var otherWidgetRoles = [ -1 20055 "button", -1 20056 "checkbox", -1 20057 "link", -1 20058 "switch", -1 20059 "option", -1 20060 "menu", -1 20061 "menubar", -1 20062 "menuitem", -1 20063 "menuitemcheckbox", -1 20064 "menuitemradio", -1 20065 "radio", -1 20066 "tab", -1 20067 "treeitem", -1 20068 "gridcell" -1 20069 ]; -1 20070 var presentationRoles = ["presentation", "none"]; -1 20071 -1 20072 var hasGlobalAttr = function(node) { -1 20073 var globalPropsAndStates = [ -1 20074 "busy", -1 20075 "controls", -1 20076 "current", -1 20077 "describedby", -1 20078 "details", -1 20079 "disabled", -1 20080 "dropeffect", -1 20081 "errormessage", -1 20082 "flowto", -1 20083 "grabbed", -1 20084 "haspopup", -1 20085 "invalid", -1 20086 "keyshortcuts", -1 20087 "live", -1 20088 "owns", -1 20089 "roledescription" -1 20090 ]; -1 20091 for (var i = 0; i < globalPropsAndStates.length; i++) { -1 20092 var a = trim(node.getAttribute("aria-" + globalPropsAndStates[i])); -1 20093 if (a) { -1 20094 return true; -1 20095 } -1 20096 } -1 20097 return false; -1 20098 }; 16840 2009916841 -1 var getStyleObject = function(node) {16842 -1 var style = {};16843 -1 if (document.defaultView && document.defaultView.getComputedStyle) {16844 -1 style = document.defaultView.getComputedStyle(node, '');16845 -1 } else if (node.currentStyle) {16846 -1 style = node.currentStyle;16847 -1 }16848 -1 return style;16849 -1 };-1 20100 var isHidden = function(node, refNode) { -1 20101 var hidden = function(node) { -1 20102 if (node.nodeType !== 1 || node === refNode) { -1 20103 return false; -1 20104 } -1 20105 if (node.getAttribute("aria-hidden") === "true") { -1 20106 return true; -1 20107 } -1 20108 if (node.getAttribute("hidden")) { -1 20109 return true; -1 20110 } -1 20111 var style = getStyleObject(node); -1 20112 if (style["display"] === "none" || style["visibility"] === "hidden") { -1 20113 return true; -1 20114 } -1 20115 return false; -1 20116 }; -1 20117 return hidden(node); -1 20118 }; 16850 2011916851 -1 var cleanCSSText = function(node, text) {16852 -1 var s = text;16853 -1 if (s.indexOf('attr(') !== -1) {16854 -1 var m = s.match(/attr\((.|\n|\r\n)*?\)/g);16855 -1 for (var i = 0; i < m.length; i++) {16856 -1 var b = m[i].slice(5, -1);16857 -1 b = node.getAttribute(b) || '';16858 -1 s = s.replace(m[i], b);16859 -1 }16860 -1 }16861 -1 return s || text;16862 -1 };-1 20120 var isParentHidden = function(node, refNode, skipOwned, skipCurrent) { -1 20121 while (node && node !== refNode) { -1 20122 if (!skipCurrent && node.nodeType === 1 && isHidden(node, refNode)) { -1 20123 return true; -1 20124 } else skipCurrent = false; -1 20125 node = node.parentNode; -1 20126 } -1 20127 return false; -1 20128 }; 16863 2012916864 -1 var isBlockLevelElement = function(node, cssObj) {16865 -1 var styleObject = cssObj || getStyleObject(node);16866 -1 for (var prop in blockStyles) {16867 -1 var values = blockStyles[prop];16868 -1 for (var i = 0; i < values.length; i++) {16869 -1 if (styleObject[prop] && ((values[i].indexOf('!') === 0 && [values[i].slice(1), 'inherit', 'initial', 'unset'].indexOf(styleObject[prop]) === -1) || styleObject[prop].indexOf(values[i]) !== -1)) {16870 -1 return true;16871 -1 }16872 -1 }16873 -1 }16874 -1 if (!cssObj && node.nodeName && blockElements.indexOf(node.nodeName.toLowerCase()) !== -1) {16875 -1 return true;16876 -1 }16877 -1 return false;16878 -1 };-1 20130 var getStyleObject = function(node) { -1 20131 var style = {}; -1 20132 if (document.defaultView && document.defaultView.getComputedStyle) { -1 20133 style = document.defaultView.getComputedStyle(node, ""); -1 20134 } else if (node.currentStyle) { -1 20135 style = node.currentStyle; -1 20136 } -1 20137 return style; -1 20138 }; 16879 2013916880 -1 // CSS Block Styles indexed from:16881 -1 // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context16882 -1 var blockStyles = {16883 -1 'display': ['block', 'grid', 'table', 'flow-root', 'flex'],16884 -1 'position': ['absolute', 'fixed'],16885 -1 'float': ['left', 'right', 'inline'],16886 -1 'clear': ['left', 'right', 'both', 'inline'],16887 -1 'overflow': ['hidden', 'scroll', 'auto'],16888 -1 'column-count': ['!auto'],16889 -1 'column-width': ['!auto'],16890 -1 'column-span': ['all'],16891 -1 'contain': ['layout', 'content', 'strict']16892 -1 };-1 20140 var cleanCSSText = function(node, text) { -1 20141 var s = text; -1 20142 if (s.indexOf("attr(") !== -1) { -1 20143 var m = s.match(/attr\((.|\n|\r\n)*?\)/g); -1 20144 for (var i = 0; i < m.length; i++) { -1 20145 var b = m[i].slice(5, -1); -1 20146 b = node.getAttribute(b) || ""; -1 20147 s = s.replace(m[i], b); -1 20148 } -1 20149 } -1 20150 return s || text; -1 20151 }; 16893 2015216894 -1 // HTML5 Block Elements indexed from:16895 -1 // https://github.com/webmodules/block-elements16896 -1 // Note: 'br' was added to this array because it impacts visual display and should thus add a space .16897 -1 // Reference issue: https://github.com/w3c/accname/issues/416898 -1 // Note: Added in 1.13, td, th, tr, and legend16899 -1 var blockElements = ['address', 'article', 'aside', 'blockquote', 'br', 'canvas', 'dd', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'legend', 'li', 'main', 'nav', 'noscript', 'ol', 'output', 'p', 'pre', 'section', 'table', 'td', 'tfoot', 'th', 'tr', 'ul', 'video'];-1 20153 var isBlockLevelElement = function(node, cssObj) { -1 20154 var styleObject = cssObj || getStyleObject(node); -1 20155 for (var prop in blockStyles) { -1 20156 var values = blockStyles[prop]; -1 20157 for (var i = 0; i < values.length; i++) { -1 20158 if ( -1 20159 styleObject[prop] && -1 20160 ((values[i].indexOf("!") === 0 && -1 20161 [values[i].slice(1), "inherit", "initial", "unset"].indexOf( -1 20162 styleObject[prop] -1 20163 ) === -1) || -1 20164 styleObject[prop].indexOf(values[i]) !== -1) -1 20165 ) { -1 20166 return true; -1 20167 } -1 20168 } -1 20169 } -1 20170 if ( -1 20171 !cssObj && -1 20172 node.nodeName && -1 20173 blockElements.indexOf(node.nodeName.toLowerCase()) !== -1 -1 20174 ) { -1 20175 return true; -1 20176 } -1 20177 return false; -1 20178 }; 16900 2017916901 -1 var getObjectValue = function(role, node, isRange, isEdit, isSelect, isNative) {16902 -1 var val = '';16903 -1 var bypass = false;-1 20180 // CSS Block Styles indexed from: -1 20181 // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context -1 20182 var blockStyles = { -1 20183 display: ["block", "grid", "table", "flow-root", "flex"], -1 20184 position: ["absolute", "fixed"], -1 20185 float: ["left", "right", "inline"], -1 20186 clear: ["left", "right", "both", "inline"], -1 20187 overflow: ["hidden", "scroll", "auto"], -1 20188 "column-count": ["!auto"], -1 20189 "column-width": ["!auto"], -1 20190 "column-span": ["all"], -1 20191 contain: ["layout", "content", "strict"] -1 20192 }; 16904 2019316905 -1 if (isRange && !isNative) {16906 -1 val = node.getAttribute('aria-valuetext') || node.getAttribute('aria-valuenow') || '';16907 -1 }16908 -1 else if (isEdit && !isNative) {16909 -1 val = getText(node) || '';16910 -1 }16911 -1 else if (isSelect && !isNative) {16912 -1 var childRoles = [];16913 -1 if (role == 'grid' || role == 'treegrid') {16914 -1 childRoles = ['gridcell', 'rowheader', 'columnheader'];16915 -1 }16916 -1 else if (role == 'listbox') {16917 -1 childRoles = ['option'];16918 -1 }16919 -1 else if (role == 'tablist') {16920 -1 childRoles = ['tab'];16921 -1 }16922 -1 else if (role == 'tree') {16923 -1 childRoles = ['treeitem'];16924 -1 }16925 -1 val = joinSelectedParts(node, node.querySelectorAll('*[aria-selected="true"]'), false, childRoles);16926 -1 bypass = true;16927 -1 }16928 -1 val = trim(val);16929 -1 if (!val && (isRange || isEdit) && node.value) {16930 -1 val = node.value;16931 -1 }16932 -1 if (!bypass && !val && isNative) {16933 -1 if (isSelect) {16934 -1 val = joinSelectedParts(node, node.querySelectorAll('option[selected]'), true);16935 -1 } else {16936 -1 val = node.value;16937 -1 }16938 -1 }-1 20194 // HTML5 Block Elements indexed from: -1 20195 // https://github.com/webmodules/block-elements -1 20196 // Note: 'br' was added to this array because it impacts visual display and should thus add a space . -1 20197 // Reference issue: https://github.com/w3c/accname/issues/4 -1 20198 // Note: Added in 1.13, td, th, tr, and legend -1 20199 var blockElements = [ -1 20200 "address", -1 20201 "article", -1 20202 "aside", -1 20203 "blockquote", -1 20204 "br", -1 20205 "canvas", -1 20206 "dd", -1 20207 "div", -1 20208 "dl", -1 20209 "dt", -1 20210 "fieldset", -1 20211 "figcaption", -1 20212 "figure", -1 20213 "footer", -1 20214 "form", -1 20215 "h1", -1 20216 "h2", -1 20217 "h3", -1 20218 "h4", -1 20219 "h5", -1 20220 "h6", -1 20221 "header", -1 20222 "hgroup", -1 20223 "hr", -1 20224 "legend", -1 20225 "li", -1 20226 "main", -1 20227 "nav", -1 20228 "noscript", -1 20229 "ol", -1 20230 "output", -1 20231 "p", -1 20232 "pre", -1 20233 "section", -1 20234 "table", -1 20235 "td", -1 20236 "tfoot", -1 20237 "th", -1 20238 "tr", -1 20239 "ul", -1 20240 "video" -1 20241 ]; -1 20242 -1 20243 var getObjectValue = function( -1 20244 role, -1 20245 node, -1 20246 isRange, -1 20247 isEdit, -1 20248 isSelect, -1 20249 isNative -1 20250 ) { -1 20251 var val = ""; -1 20252 var bypass = false; -1 20253 -1 20254 if (isRange && !isNative) { -1 20255 val = -1 20256 node.getAttribute("aria-valuetext") || -1 20257 node.getAttribute("aria-valuenow") || -1 20258 ""; -1 20259 } else if (isEdit && !isNative) { -1 20260 val = getText(node) || ""; -1 20261 } else if (isSelect && !isNative) { -1 20262 var childRoles = []; -1 20263 if (role === "grid" || role === "treegrid") { -1 20264 childRoles = ["gridcell", "rowheader", "columnheader"]; -1 20265 } else if (role === "listbox") { -1 20266 childRoles = ["option"]; -1 20267 } else if (role === "tablist") { -1 20268 childRoles = ["tab"]; -1 20269 } else if (role === "tree") { -1 20270 childRoles = ["treeitem"]; -1 20271 } -1 20272 val = joinSelectedParts( -1 20273 node, -1 20274 node.querySelectorAll('*[aria-selected="true"]'), -1 20275 false, -1 20276 childRoles -1 20277 ); -1 20278 bypass = true; -1 20279 } -1 20280 val = trim(val); -1 20281 if (!val && (isRange || isEdit) && node.value) { -1 20282 val = node.value; -1 20283 } -1 20284 if (!bypass && !val && isNative) { -1 20285 if (isSelect) { -1 20286 val = joinSelectedParts( -1 20287 node, -1 20288 node.querySelectorAll("option[selected]"), -1 20289 true -1 20290 ); -1 20291 } else { -1 20292 val = node.value; -1 20293 } -1 20294 } 16939 2029516940 -1 return val;16941 -1 };-1 20296 return val; -1 20297 }; 16942 2029816943 -1 var addSpacing = function(s) {16944 -1 return trim(s).length ? ' ' + s + ' ' : ' ';16945 -1 };-1 20299 var addSpacing = function(s) { -1 20300 return trim(s).length ? " " + s + " " : " "; -1 20301 }; 16946 2030216947 -1 var joinSelectedParts = function(node, nOA, isNative, childRoles) {16948 -1 if (!nOA || !nOA.length) {16949 -1 return '';16950 -1 }16951 -1 var parts = [];16952 -1 for (var i = 0; i < nOA.length; i++) {16953 -1 var role = getRole(nOA[i]);16954 -1 var isValidChildRole = !childRoles || childRoles.indexOf(role) !== -1;16955 -1 if (isValidChildRole) {16956 -1 parts.push(isNative ? getText(nOA[i]) : walk(nOA[i], true, false, [], false, {top: nOA[i]}).name);16957 -1 }16958 -1 }16959 -1 return parts.join(' ');16960 -1 };-1 20303 var joinSelectedParts = function(node, nOA, isNative, childRoles) { -1 20304 if (!nOA || !nOA.length) { -1 20305 return ""; -1 20306 } -1 20307 let parts = []; -1 20308 for (var i = 0; i < nOA.length; i++) { -1 20309 var role = getRole(nOA[i]); -1 20310 var isValidChildRole = !childRoles || childRoles.indexOf(role) !== -1; -1 20311 if (isValidChildRole) { -1 20312 parts.push( -1 20313 isNative -1 20314 ? getText(nOA[i]) -1 20315 : walk(nOA[i], true, false, [], false, { top: nOA[i] }).name -1 20316 ); -1 20317 } -1 20318 } -1 20319 return parts.join(" "); -1 20320 }; 16961 2032116962 -1 var getPseudoElStyleObj = function(node, position) {16963 -1 var styleObj = {};16964 -1 for (var prop in blockStyles) {16965 -1 styleObj[prop] = document.defaultView.getComputedStyle(node, position).getPropertyValue(prop);16966 -1 }16967 -1 styleObj['content'] = document.defaultView.getComputedStyle(node, position).getPropertyValue('content').replace(/^\"|\\|\"$/g, '');16968 -1 return styleObj;16969 -1 };-1 20322 var getPseudoElStyleObj = function(node, position) { -1 20323 var styleObj = {}; -1 20324 for (var prop in blockStyles) { -1 20325 styleObj[prop] = document.defaultView -1 20326 .getComputedStyle(node, position) -1 20327 .getPropertyValue(prop); -1 20328 } -1 20329 styleObj["content"] = document.defaultView -1 20330 .getComputedStyle(node, position) -1 20331 .getPropertyValue("content") -1 20332 .replace(/^"|\\|"$/g, ""); -1 20333 return styleObj; -1 20334 }; 16970 2033516971 -1 var getText = function(node, position) {16972 -1 if (!position && node.nodeType === 1) {16973 -1 return node.innerText || node.textContent || '';16974 -1 }16975 -1 var styles = getPseudoElStyleObj(node, position);16976 -1 var text = styles['content'];16977 -1 if (!text || text === 'none') {16978 -1 return '';16979 -1 }16980 -1 if (isBlockLevelElement({}, styles)) {16981 -1 if (position == ':before') {16982 -1 text += ' ';16983 -1 }16984 -1 else if (position == ':after') {16985 -1 text = ' ' + text;16986 -1 }16987 -1 }16988 -1 return text;16989 -1 };-1 20336 var getText = function(node, position) { -1 20337 if (!position && node.nodeType === 1) { -1 20338 return node.innerText || node.textContent || ""; -1 20339 } -1 20340 var styles = getPseudoElStyleObj(node, position); -1 20341 var text = styles["content"]; -1 20342 if (!text || text === "none") { -1 20343 return ""; -1 20344 } -1 20345 if (isBlockLevelElement({}, styles)) { -1 20346 if (position === ":before") { -1 20347 text += " "; -1 20348 } else if (position === ":after") { -1 20349 text = " " + text; -1 20350 } -1 20351 } -1 20352 return text; -1 20353 }; 16990 2035416991 -1 var getCSSText = function(node, refNode) {16992 -1 if (node && node.nodeType !== 1 || node == refNode || ['input', 'select', 'textarea', 'img', 'iframe'].indexOf(node.nodeName.toLowerCase()) !== -1) {16993 -1 return {before: '', after: ''};16994 -1 }16995 -1 if (document.defaultView && document.defaultView.getComputedStyle) {16996 -1 return {16997 -1 before: cleanCSSText(node, getText(node, ':before')),16998 -1 after: cleanCSSText(node, getText(node, ':after'))16999 -1 };17000 -1 } else {17001 -1 return {before: '', after: ''};17002 -1 }17003 -1 };-1 20355 var getCSSText = function(node, refNode) { -1 20356 if ( -1 20357 (node && node.nodeType !== 1) || -1 20358 node === refNode || -1 20359 ["input", "select", "textarea", "img", "iframe"].indexOf( -1 20360 node.nodeName.toLowerCase() -1 20361 ) !== -1 -1 20362 ) { -1 20363 return { before: "", after: "" }; -1 20364 } -1 20365 if (document.defaultView && document.defaultView.getComputedStyle) { -1 20366 return { -1 20367 before: cleanCSSText(node, getText(node, ":before")), -1 20368 after: cleanCSSText(node, getText(node, ":after")) -1 20369 }; -1 20370 } else { -1 20371 return { before: "", after: "" }; -1 20372 } -1 20373 }; 17004 2037417005 -1 var getParent = function(node, nTag) {17006 -1 while (node) {17007 -1 node = node.parentNode;17008 -1 if (node && node.nodeName && node.nodeName.toLowerCase() == nTag) {17009 -1 return node;17010 -1 }17011 -1 }17012 -1 return {};17013 -1 };-1 20375 var getParent = function(node, nTag) { -1 20376 while (node) { -1 20377 node = node.parentNode; -1 20378 if (node && node.nodeName && node.nodeName.toLowerCase() === nTag) { -1 20379 return node; -1 20380 } -1 20381 } -1 20382 return {}; -1 20383 }; 17014 2038417015 -1 var hasParentLabelOrHidden = function(node, refNode, ownedBy, ignoreHidden) {17016 -1 var trackNodes = [];17017 -1 while (node && node !== refNode) {17018 -1 if (node.id && ownedBy && ownedBy[node.id] && ownedBy[node.id].node && trackNodes.indexOf(node) === -1) {17019 -1 trackNodes.push(node);17020 -1 node = ownedBy[node.id].node;17021 -1 } else {17022 -1 node = node.parentNode;17023 -1 }17024 -1 if (node && node.getAttribute) {17025 -1 if (trim(node.getAttribute('aria-label')) || (!ignoreHidden && isHidden(node, refNode))) {17026 -1 return true;17027 -1 }17028 -1 }17029 -1 }17030 -1 return false;17031 -1 };-1 20385 var hasParentLabelOrHidden = function(node, refNode, ownedBy, ignoreHidden) { -1 20386 var trackNodes = []; -1 20387 while (node && node !== refNode) { -1 20388 if ( -1 20389 node.id && -1 20390 ownedBy && -1 20391 ownedBy[node.id] && -1 20392 ownedBy[node.id].node && -1 20393 trackNodes.indexOf(node) === -1 -1 20394 ) { -1 20395 trackNodes.push(node); -1 20396 node = ownedBy[node.id].node; -1 20397 } else { -1 20398 node = node.parentNode; -1 20399 } -1 20400 if (node && node.getAttribute) { -1 20401 if ( -1 20402 trim(node.getAttribute("aria-label")) || -1 20403 (!ignoreHidden && isHidden(node, refNode)) -1 20404 ) { -1 20405 return true; -1 20406 } -1 20407 } -1 20408 } -1 20409 return false; -1 20410 }; 17032 2041117033 -1 var trim = function(str) {17034 -1 if (typeof str !== 'string') {17035 -1 return '';17036 -1 }17037 -1 return str.replace(/^\s+|\s+$/g, '');17038 -1 };-1 20412 var trim = function(str) { -1 20413 if (typeof str !== "string") { -1 20414 return ""; -1 20415 } -1 20416 return str.replace(/^\s+|\s+$/g, ""); -1 20417 }; 17039 2041817040 -1 if (isParentHidden(node, document.body, true)) {17041 -1 return props;17042 -1 }-1 20419 if (isParentHidden(node, document.body, true)) { -1 20420 return props; -1 20421 } 17043 2042217044 -1 // Compute accessible Name and Description properties value for node17045 -1 var accProps = walk(node, false, false, [], false, {top: node});-1 20423 // Compute accessible Name and Description properties value for node -1 20424 var accProps = walk(node, false, false, [], false, { top: node }); 17046 2042517047 -1 accName = trim(accProps.name.replace(/\s+/g, ' '));17048 -1 accDesc = trim(accProps.title.replace(/\s+/g, ' '));-1 20426 var accName = trim(accProps.name.replace(/\s+/g, " ")); -1 20427 var accDesc = trim(accProps.title.replace(/\s+/g, " ")); 17049 2042817050 -1 if (accName === accDesc) {17051 -1 // If both Name and Description properties match, then clear the Description property value.17052 -1 accDesc = '';17053 -1 }-1 20429 if (accName === accDesc) { -1 20430 // If both Name and Description properties match, then clear the Description property value. -1 20431 accDesc = ""; -1 20432 } 17054 2043317055 -1 props.name = accName;17056 -1 props.desc = accDesc;-1 20434 props.name = accName; -1 20435 props.desc = accDesc; 17057 2043617058 -1 // Clear track variables17059 -1 nodes = [];17060 -1 owns = [];-1 20437 // Clear track variables -1 20438 nodes = []; -1 20439 owns = []; 17061 2044017062 -1 if (fnc && typeof fnc == 'function') {17063 -1 return fnc.apply(node, [17064 -1 node,17065 -1 props17066 -1 ]);17067 -1 } else {17068 -1 return props;17069 -1 }-1 20441 if (fnc && typeof fnc === "function") { -1 20442 return fnc.apply(node, [node, props]); -1 20443 } else { -1 20444 return props; -1 20445 } 17070 20446 }; 17071 20447 17072 20448 // Customize returned string for testable statements 17073 20449 17074 20450 var getNames = function(node) {17075 -1 var props = calcNames(node);17076 -1 return 'accName: "' + props.name + '"\n\naccDesc: "' + props.desc + '"\n\n(Running AccName Computation Prototype version: ' + currentVersion + ')';-1 20451 var props = calcNames(node); -1 20452 return ( -1 20453 'accName: "' + -1 20454 props.name + -1 20455 '"\n\naccDesc: "' + -1 20456 props.desc + -1 20457 '"\n\n(Running AccName Computation Prototype version: ' + -1 20458 currentVersion + -1 20459 ")" -1 20460 ); 17077 20461 }; 17078 2046217079 -1 if (typeof module === 'object' && module.exports) {17080 -1 module.exports = {17081 -1 getNames: getNames,17082 -1 calcNames: calcNames,17083 -1 };-1 20463 if (typeof module === "object" && module.exports) { -1 20464 module.exports = { -1 20465 getNames: getNames, -1 20466 calcNames: calcNames -1 20467 }; 17084 20468 }17085 -1 },{}],14:[function(require,module,exports){-1 20469 -1 20470 },{}],15:[function(require,module,exports){ 17086 20471 (function (global){ 17087 20472 global.goog = { 17088 20473 provide: function() {}, @@ -17107,7 +20492,7 @@ require('accessibility-developer-tools/src/js/Properties'); 17107 20492 module.exports = global.axs; 17108 20493 17109 20494 }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})17110 -1 },{"accessibility-developer-tools/src/js/AccessibilityUtils":1,"accessibility-developer-tools/src/js/BrowserUtils":2,"accessibility-developer-tools/src/js/Color":3,"accessibility-developer-tools/src/js/Constants":4,"accessibility-developer-tools/src/js/DOMUtils":5,"accessibility-developer-tools/src/js/Properties":6}],15:[function(require,module,exports){-1 20495 },{"accessibility-developer-tools/src/js/AccessibilityUtils":2,"accessibility-developer-tools/src/js/BrowserUtils":3,"accessibility-developer-tools/src/js/Color":4,"accessibility-developer-tools/src/js/Constants":5,"accessibility-developer-tools/src/js/DOMUtils":6,"accessibility-developer-tools/src/js/Properties":7}],16:[function(require,module,exports){ 17111 20496 var ariaApi = require('aria-api'); 17112 20497 var accdc = require('w3c-alternative-text-computation'); 17113 20498 var axe = require('axe-core'); @@ -17208,4 +20593,4 @@ try { 17208 20593 }); 17209 20594 } 17210 2059517211 -1 },{"./axs":14,"aria-api":7,"axe-core":12,"w3c-alternative-text-computation":13}]},{},[15]);-1 20596 },{"./axs":15,"aria-api":8,"axe-core":13,"w3c-alternative-text-computation":14}]},{},[16]);
diff --git a/package.json b/package.json
@@ -5,7 +5,7 @@ 5 5 "devDependencies": { 6 6 "accessibility-developer-tools": "^2.12.0", 7 7 "aria-api": "^0.2.5",8 -1 "axe-core": "^3.0.3",-1 8 "axe-core": "^3.1.2", 9 9 "w3c-alternative-text-computation": "github:accdc/w3c-alternative-text-computation" 10 10 }, 11 11 "repository": {