landmark-is-unique-evaluate.js 481 B

1234567891011121314
  1. import { getRole } from '../../commons/aria';
  2. import { accessibleTextVirtual } from '../../commons/text';
  3. function landmarkIsUniqueEvaluate(node, options, virtualNode) {
  4. var role = getRole(node);
  5. var accessibleText = accessibleTextVirtual(virtualNode);
  6. accessibleText = accessibleText ? accessibleText.toLowerCase() : null;
  7. this.data({ role: role, accessibleText: accessibleText });
  8. this.relatedNodes([node]);
  9. return true;
  10. }
  11. export default landmarkIsUniqueEvaluate;