How to use the aria-query.elementRoles.keys function in aria-query

To help you get started, we’ve selected a few aria-query examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maranran / eslint-plugin-vue-a11y / lib / utils / index.js View on Github external
getImplicitRole (node) {
    assert(node && node.type === 'VElement');
    const type = this.getElementType(node);
    let implicitRole = null;
    [...elementRoles.keys()].forEach((element) => {
      let { name, attributes} = element;
      if (name === type && this.attributesComparator(attributes, node)) {
        implicitRole = elementRoles.get(element)
      }
    })
    return implicitRole
  }
}