Sha256: 8ee0167fdcbb4e2844c5fcb99d820d8b871c43ed15c0afe63b8f3dec65ba9193

Contents?: true

Size: 443 Bytes

Versions: 104

Compression:

Stored size: 443 Bytes

Contents

const parent = axe.commons.dom.getComposedParent(node);
if (!parent) {
	// Can only happen with detached DOM nodes and roots:
	return undefined;
}

const parentTagName = parent.nodeName.toUpperCase();
const parentRole = (parent.getAttribute('role') || '').toLowerCase();

if (parentRole === 'list') {
	return true;
}

if (parentRole && axe.commons.aria.isValidRole(parentRole)) {
	return false;
}

return ['UL', 'OL'].includes(parentTagName);

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
govuk_publishing_components-21.16.3 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.16.2 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.16.1 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.16.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.15.2 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.15.1 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.15.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.14.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.13.5 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.13.4 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.13.3 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.13.2 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.13.1 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.13.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.12.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.11.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.10.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.9.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.8.1 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-21.8.0 node_modules/axe-core/lib/checks/lists/listitem.js