Sha256: 0919c5ad1730a1f08312f3f5d5dce0625c3f9f233f4997918a48c0db3a0f4211
Contents?: true
Size: 714 Bytes
Versions: 271
Compression:
Stored size: 714 Bytes
Contents
options = options || {}; var invalid = []; var attr, attrName, allowed, role = node.getAttribute('role'), attrs = axe.utils.getNodeAttributes(node); if (!role) { role = axe.commons.aria.implicitRole(node); } allowed = axe.commons.aria.allowedAttr(role); if (Array.isArray(options[role])) { allowed = axe.utils.uniqueArray(options[role].concat(allowed)); } if (role && allowed) { for (var i = 0, l = attrs.length; i < l; i++) { attr = attrs[i]; attrName = attr.name; if ( axe.commons.aria.validateAttr(attrName) && !allowed.includes(attrName) ) { invalid.push(attrName + '="' + attr.nodeValue + '"'); } } } if (invalid.length) { this.data(invalid); return false; } return true;
Version data entries
271 entries across 271 versions & 1 rubygems