import { labelVirtual } from '../../commons/text';

function titleOnlyEvaluate(node, options, virtualNode) {
	var labelText = labelVirtual(virtualNode);
	return (
		!labelText &&
		!!(node.getAttribute('title') || node.getAttribute('aria-describedby'))
	);
}

export default titleOnlyEvaluate;

import { labelVirtual, titleText } from '../../commons/text';

function titleOnlyEvaluate(node, options, virtualNode) {
	const labelText = labelVirtual(virtualNode);
	const title = titleText(virtualNode);
	const ariaDescribedBy = virtualNode.attr('aria-describedby');

	return !labelText && !!(title || ariaDescribedBy);
}

export default titleOnlyEvaluate;

work with virtual nodes (#2489)