Sha256: e5594f4218cae40095ef30f0b36374e97166dd8fefac04d9d2cc66050330cbc3
Contents?: true
Size: 722 Bytes
Versions: 375
Compression:
Stored size: 722 Bytes
Contents
/** * Implements allowed roles defined at: * https://www.w3.org/TR/html-aria/#docconformance * https://www.w3.org/TR/SVG2/struct.html#implicit-aria-semantics */ const { dom } = axe.commons; const { allowImplicit = true, ignoredTags = [] } = options || {}; const tagName = node.nodeName.toUpperCase(); // check if the element should be ignored, by an user setting if (ignoredTags.map(t => t.toUpperCase()).includes(tagName)) { return true; } const unallowedRoles = axe.commons.aria.getElementUnallowedRoles( node, allowImplicit ); if (unallowedRoles.length) { this.data(unallowedRoles); if (!dom.isVisible(node, true)) { // flag hidden elements for review return undefined; } return false; } return true;
Version data entries
375 entries across 375 versions & 1 rubygems