function runAccessibilityAudit(a11yResults, opt_config) {
  var auditResults = axs.Audit.run(opt_config);
  for (var i = 0; i < auditResults.length; i++) {
    var auditResult = auditResults[i];
    if (auditResult.result == axs.constants.AuditResult.FAIL) {
      var auditRule = auditResult.rule;
      // TODO(aboxhall): more useful error messages (sadly non-trivial)
      a11yResults.push(auditResult);
    }
  }
  // TODO(aboxhall): have strict (no errors or warnings) vs non-strict
  // (warnings ok)
  // TODO(aboxhall): some kind of info logging for warnings only??
  return (a11yResults.length == 0);
}
/**
 * Run an accessibility audit on the current page state.
 * @type {Function}
 * @param {Array} a11yResults
 * @param {axs.AuditConfiguration=} opt_config
 * @return {boolean} Whether there were any errors or warnings
 * @private
 */
Run an accessibility audit on the current page state.
Run an accessibility audit on the current page state .
function runAccessibilityAudit(a11yResults, opt_config) {
  var auditResults = axs.Audit.run(opt_config);
  for (var i = 0; i < auditResults.length; i++) {
    var auditResult = auditResults[i];
    if (auditResult.result == axs.constants.AuditResult.FAIL) {
      var auditRule = auditResult.rule;
      a11yResults.push(auditResult);
    }
  }
  return (a11yResults.length == 0);
}
function runAccessibilityAudit ( a11yResults , opt_config ) { var auditResults = axs . Audit . run ( opt_config ) ; for ( var i = 0 ; i < auditResults . length ; i ++ ) { var auditResult = auditResults [ i ] ; if ( auditResult . result == axs . constants . AuditResult . FAIL ) { var auditRule = auditResult . rule ; a11yResults . push ( auditResult ) ; } } return ( a11yResults . length == 0 ) ; }
Run an accessibility audit on the current page state.
Run an accessibility audit on the current page state .
// TODO(aboxhall): more useful error messages (sadly non-trivial) // TODO(aboxhall): have strict (no errors or warnings) vs non-strict // (warnings ok) // TODO(aboxhall): some kind of info logging for warnings only??