0 ) ? (int) round( ( $axe_passes / $total_checks ) * 100 ) : null; $by_impact = array( 'critical' => $critical, 'serious' => $serious, 'moderate' => $moderate, 'minor' => $minor ); $ignored_rules = Acceguru_Scanner::get_ignored_rules(); $impact_total = max( 0, $serious + $moderate + $minor + (int) $critical ); $scan_post_statuses = Acceguru_Scanner::selected_scan_post_statuses(); ?>

v

0 && get_post( $pid_b ) && get_permalink( $pid_b ) ) { if ( isset( $failed_ids_b[ $pid_b ] ) ) { continue; } $failed_ids_b[ $pid_b ] = true; $reason_counts_b[ $outcome_b ] = ( $reason_counts_b[ $outcome_b ] ?? 0 ) + 1; } } } $stored_log_counters_b = get_option( 'acceguru_last_scan_log_counters', array() ); if ( is_array( $stored_log_counters_b ) && array_key_exists( 'redirected', $stored_log_counters_b ) ) { $redirected_raw_b = $stored_log_counters_b['redirected']; if ( is_scalar( $redirected_raw_b ) ) { $redirected_count_b = max( 0, (int) $redirected_raw_b ); } } $failed_count_b = count( $failed_ids_b ); $scanned_count_b = is_array( $summary ) ? (int) ( $summary['pages_scanned'] ?? 0 ) : 0; $eligible_count_b = $scanned_count_b + $failed_count_b; if ( ( $failed_count_b > 0 || $redirected_count_b > 0 ) && null !== $summary ) : $reason_parts_b = array(); foreach ( $reason_counts_b as $bucket_k => $bucket_n ) { $bucket_n = (int) $bucket_n; switch ( $bucket_k ) { case 'timed_out': /* translators: %d: number of scan timeouts. */ $reason_parts_b[] = sprintf( _n( '%d timeout', '%d timeouts', $bucket_n, 'acceguru' ), $bucket_n ); break; case 'save_failed': /* translators: %d: number of pages whose scan results could not be saved. */ $reason_parts_b[] = sprintf( _n( '%d save failure', '%d save failures', $bucket_n, 'acceguru' ), $bucket_n ); break; case 'scan_error': /* translators: %d: number of scan errors. */ $reason_parts_b[] = sprintf( _n( '%d scan error', '%d scan errors', $bucket_n, 'acceguru' ), $bucket_n ); break; default: /* translators: %d: number of other scan failures. */ $reason_parts_b[] = sprintf( _n( '%d other failure', '%d other failures', $bucket_n, 'acceguru' ), $bucket_n ); break; } } $reason_str_b = $reason_parts_b ? ' (' . implode( ', ', $reason_parts_b ) . ')' : ''; ?>
0 ) : ?> 0 ) : ?>

' . esc_html__( 'ADA, WCAG 2.0 / 2.1 / 2.2, Section 508, EN 301 549, the California Unruh Civil Rights Act, the European Accessibility Act (EAA), AODA, the UK Equality Act 2010, and other accessibility laws and standards', 'acceguru' ) . '' ); ?>

true ), 'objects' ), Acceguru_Scanner::eligible_post_types() ); $a11y_cov_scanned_labels = array(); $a11y_cov_missing_labels = array(); foreach ( $a11y_cov_all as $a11y_cov_slug => $a11y_cov_obj ) { if ( in_array( $a11y_cov_slug, $a11y_cov_scanned, true ) ) { $a11y_cov_scanned_labels[] = (string) $a11y_cov_obj->label; } else { $a11y_cov_missing_labels[] = (string) $a11y_cov_obj->label; } } $a11y_cov_done = count( $a11y_cov_scanned_labels ); $a11y_cov_total = count( $a11y_cov_all ); if ( $a11y_cov_total > 0 && null !== $summary ) : ?>
0 ) : ?>
= 60 ? ( intdiv( $asf_durs, 60 ) . 'm ' . ( $asf_durs % 60 ) . 's' ) : ( $asf_durs . 's' ); if ( ! empty( $summary['partial'] ) ) { // Cancelled run: the numbers cover only the pages reached // before Cancel, so say so plainly (in red) instead of // claiming a full scan. $asf_pages = (int) ( $summary['pages_scanned'] ?? 0 ); echo ''; echo esc_html__( 'Last scan cancelled', 'acceguru' ); echo ' · ' . esc_html( $asf_when ); echo ' · ' . esc_html( sprintf( /* translators: %d: number of pages scanned before the scan was cancelled */ _n( '%d page scanned (partial results)', '%d pages scanned (partial results)', $asf_pages, 'acceguru' ), $asf_pages ) ); echo ''; } else { echo ''; /* translators: %s: local date/time of the most recent full-site scan */ echo esc_html( sprintf( __( 'Last full scan: %s', 'acceguru' ), $asf_when ) ); if ( $asf_durms > 0 ) { /* translators: %s: how long the scan took, e.g. "2m 14s" */ echo ' · ' . esc_html( sprintf( __( 'took %s', 'acceguru' ), $asf_took ) ); } echo ''; } ?>
0 ) { ++$count_critical; } if ( $ps > 0 ) { ++$count_serious; } if ( $pm > 0 ) { ++$count_moderate; } if ( $pn > 0 ) { ++$count_minor; } if ( 0 === (int) $p['total_issues'] ) { ++$count_clean; } if ( (int) ( $p['manual_checks'] ?? 0 ) > 0 ) { ++$count_manual; } } $filter_buttons = array( array( 'all', __( 'All', 'acceguru' ), $count_all ), array( 'critical', __( 'Crit.', 'acceguru' ), $count_critical ), array( 'serious', __( 'Ser.', 'acceguru' ), $count_serious ), array( 'moderate', __( 'Mod.', 'acceguru' ), $count_moderate ), array( 'minor', __( 'Min.', 'acceguru' ), $count_minor ), // "No violations", not "Clean": axe checks it could not decide on its // own (needs review) are not stored, so a zero here does not certify // the page - it only says no automated check failed. array( 'clean', __( 'No violations', 'acceguru' ), $count_clean ), // Last on purpose: a manual check is not a severity and not a // violation, so it stands outside the ramp above. array( 'manual', __( 'Man.', 'acceguru' ), $count_manual ), ); $impact_colors = array( 'critical' => 'var(--critical)', 'serious' => 'var(--serious)', 'moderate' => 'var(--moderate)', 'minor' => '#a0aec0' ); ?>

labels->name ?? $type_obj->label ); $href = add_query_arg( array( 'post_type' => $type_slug, 'orderby' => 'acceguru_issues', 'order' => 'desc' ), admin_url( 'edit.php' ) ); $type_links[] = sprintf( '%s →', esc_url( $href ), esc_html( $label ) ); } ?>
0 ) : ?>
0'; } return sprintf( '%d', esc_attr( $color ), $n ); }; ?>
MAN.
-'; } elseif ( 0 === (int) $page_manual ) { echo '0'; } else { // The violet of the Manual Checks card, kept off // the severity ramp so it never reads as a level. echo wp_kses( sprintf( '%d', (int) $page_manual ), acceguru_admin_allowed_html() ); } ?>

    %2$s %3$s', esc_attr( $kind ), esc_html( $mark ), esc_html( $label . ( '' !== $detail ? ' - ' . $detail : '' ) ) ); } if ( $skipped_count > 0 ) { /* translators: %d: number of pages skipped during the scan. */ $skipped_text = sprintf( _n( '%d page skipped', '%d pages skipped', $skipped_count, 'acceguru' ), $skipped_count ); // Name the causes on the same line. One cause reads as // plain text; several are listed with their counts. // Saved counters win over the rows: on a site with more // skipped pages than the log keeps, the rows are an // undercount while the counters stay exact. $saved_counters = get_option( 'acceguru_last_scan_log_counters', array() ); if ( is_array( $saved_counters ) && (int) ( $saved_counters['skipped'] ?? 0 ) > 0 ) { $skipped_count = (int) $saved_counters['skipped']; $skipped_by_reason = Acceguru_Scanner::sanitize_skip_reason_counts( $saved_counters['skipped_by_reason'] ?? array() ); /* translators: %d: number of pages skipped during the scan. */ $skipped_text = sprintf( _n( '%d page skipped', '%d pages skipped', $skipped_count, 'acceguru' ), $skipped_count ); } $reason_labels = Acceguru_Scanner::skip_reasons(); arsort( $skipped_by_reason ); $named = array(); foreach ( $skipped_by_reason as $code => $n ) { $label = $reason_labels[ $code ] ?? $reason_labels['filter_skip']; $named[] = ( 1 === count( $skipped_by_reason ) ) ? $label : $label . ': ' . (int) $n; } if ( $named ) { $skipped_text .= ' - ' . implode( '; ', $named ); } printf( '
  • ? %s
  • ', esc_html( $skipped_text ) ); } if ( $redirected_count > 0 ) { printf( '
  • ↪ %s
  • ', /* translators: %d: number of redirected addresses deliberately not scanned. */ esc_html( sprintf( __( 'Redirected addresses: %d - not scanned', 'acceguru' ), $redirected_count ) ) ); } } else { // The stored log keeps problems and failures only, so a scan // where every page came back clean leaves it empty. The saved // counters still prove the scan happened, and the counter row // above says so, which makes the "no scans yet" line a plain // contradiction. Same test the scanner uses to restore them. $counters_rest = is_array( $stored_log_counters_b ) ? $stored_log_counters_b : array(); $scan_on_record = ( (int) ( $counters_rest['scanned'] ?? 0 ) > 0 ) || ( (int) ( $counters_rest['redirected'] ?? 0 ) > 0 ) || ( (int) ( $counters_rest['skipped'] ?? 0 ) > 0 ); if ( $scan_on_record ) { printf( '
  • %1$s %2$s
  • ', '✓', esc_html__( 'No issues found', 'acceguru' ) ); } else { echo '
  • ' . esc_html__( 'No scans run yet. Click "Run Full Site Scan" above to see per-page progress here.', 'acceguru' ) . '
  • '; } } ?>

    $count ) : $pct = $max_rule_count > 0 ? round( ( $count / $max_rule_count ) * 100, 1 ) : 0; ?>