implicit-nodes.js 587 B

1234567891011121314151617181920212223
  1. import { clone } from '../../core/utils';
  2. import lookupTable from './lookup-table';
  3. /**
  4. * Get a list of CSS selectors of nodes that have an implicit role
  5. * @method implicitNodes
  6. * @memberof axe.commons.aria
  7. * @deprecated
  8. * @instance
  9. * @param {String} role The role to check
  10. * @return {Mixed} Either an Array of CSS selectors or `null` if there are none
  11. */
  12. function implicitNodes(role) {
  13. let implicit = null;
  14. const roles = lookupTable.role[role];
  15. if (roles && roles.implicit) {
  16. implicit = clone(roles.implicit);
  17. }
  18. return implicit;
  19. }
  20. export default implicitNodes;