luhn-generator
Version:
A generator of numbers that passes the validation of Luhn algorithm or Luhn formula, also known as the 'modulus 10' or 'mod 10' algorithm
19 lines (14 loc) • 409 B
JavaScript
import { accessibleTextVirtual } from '../commons/text';
import { getRole } from '../commons/aria';
function identicalLinksSamePurposeMatches(node, virtualNode) {
const hasAccName = !!accessibleTextVirtual(virtualNode);
if (!hasAccName) {
return false;
}
const role = getRole(node);
if (role && role !== 'link') {
return false;
}
return true;
}
export default identicalLinksSamePurposeMatches;