Sha256: 6781c5c81c6d77d812d7048e74c0258982823500c3313600eaf422660d587233

Contents?: true

Size: 408 Bytes

Versions: 10

Compression:

Stored size: 408 Bytes

Contents

if (!options || !options.selector || typeof options.selector !== 'string') {
	throw new TypeError(
		'visible-in-page requires options.selector to be a string'
	);
}

const matchingElms = axe.utils.querySelectorAllFilter(
	virtualNode,
	options.selector,
	vNode => axe.commons.dom.isVisible(vNode.actualNode)
);
this.relatedNodes(matchingElms.map(vNode => vNode.actualNode));
return matchingElms.length > 0;

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
govuk_publishing_components-21.27.1 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.27.0 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.26.2 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.26.1 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.26.0 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.25.0 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.24.0 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.23.1 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.23.0 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js
govuk_publishing_components-21.22.2 node_modules/axe-core/lib/checks/keyboard/page-has-elm.js