fallbackrole-evaluate.js 394 B

12345678910111213
  1. import { tokenList } from '../../core/utils';
  2. /**
  3. * Check that an element does not use more than one explicit role.
  4. *
  5. * @memberof checks
  6. * @return {Boolean} True if the element uses more than one explicit role. False otherwise.
  7. */
  8. function fallbackroleEvaluate(node, options, virtualNode) {
  9. return tokenList(virtualNode.attr('role')).length > 1;
  10. }
  11. export default fallbackroleEvaluate;