How to use the axe-core._audit function in axe-core

To help you get started, we’ve selected a few axe-core 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 dequelabs / react-axe / index.js View on Github external
function logFailureMessage(node, key) {
  var message = axeCore._audit.data.failureSummaries[key].failureMessage(
    node[key].map(function(check) {
      return check.message || '';
    })
  );

  console.error(message);
}
github microsoft / accessibility-insights-web / src / scanner / axe-utils.ts View on Github external
export function getMatchesFromRule(ruleId: string): (node: any, virtualNode: any) => boolean {
    return axe._audit.defaultConfig.rules.filter(rule => rule.id === ruleId)[0].matches;
}