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-20.0.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-19.0.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-18.3.1 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-18.3.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-18.2.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-18.1.2 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-18.1.1 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-18.0.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.21.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.20.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.19.1 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.19.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.18.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.17.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.16.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.15.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.14.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.13.0 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.12.2 node_modules/axe-core/lib/checks/lists/listitem.js
govuk_publishing_components-17.12.1 node_modules/axe-core/lib/checks/lists/listitem.js