title-only-evaluate.js 362 B

1234567891011
  1. import { labelVirtual, titleText } from '../../commons/text';
  2. function titleOnlyEvaluate(node, options, virtualNode) {
  3. const labelText = labelVirtual(virtualNode);
  4. const title = titleText(virtualNode);
  5. const ariaDescribedBy = virtualNode.attr('aria-describedby');
  6. return !labelText && !!(title || ariaDescribedBy);
  7. }
  8. export default titleOnlyEvaluate;