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 ); ?>

v

0 && get_post( $pid_b ) && get_permalink( $pid_b ) ) { if ( isset( $failed_ids_b[ $pid_b ] ) ) { continue; } // Same gates as the retry endpoint, so the count matches. if ( ! in_array( get_post_type( $pid_b ), $allowed_types_b, true ) ) { continue; } if ( (bool) apply_filters( 'acceguru_should_skip_page', false, $pid_b, array( 'id' => $pid_b ) ) ) { continue; } $failed_ids_b[ $pid_b ] = true; // Bucket reason for the inline summary. Prefer the stable // category stored on the entry; fall back to parsing the // (English) detail text only for logs saved before categories. $category_b_raw = $entry_b['category'] ?? ''; $category_b = is_scalar( $category_b_raw ) ? sanitize_key( (string) $category_b_raw ) : ''; if ( in_array( $category_b, array( 'timed_out', 'save_failed', 'scan_error', 'skipped', 'other' ), true ) ) { $bucket = $category_b; } else { $detail_b_raw = $entry_b['detail'] ?? ''; $detail_b = is_scalar( $detail_b_raw ) ? (string) $detail_b_raw : ''; if ( false !== stripos( $detail_b, 'timed out' ) ) { $bucket = 'timed_out'; } elseif ( false !== stripos( $detail_b, 'save failed' ) ) { $bucket = 'save_failed'; } elseif ( false !== stripos( $detail_b, 'scan error' ) ) { $bucket = 'scan_error'; } elseif ( false !== stripos( $detail_b, 'skipped' ) ) { $bucket = 'skipped'; } else { $bucket = 'other'; } } $reason_counts_b[ $bucket ] = ( $reason_counts_b[ $bucket ] ?? 0 ) + 1; } } } $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 && 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; case 'skipped': /* translators: %d: number of pages skipped during the scan. */ $reason_parts_b[] = sprintf( _n( '%d skipped page', '%d skipped pages', $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 ) . ')' : ''; ?>

' . esc_html__( 'WCAG 2.0 / 2.1 / 2.2, Section 508 and EN 301 549', '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; } } $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 ), ); $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 ); }; ?>

    %2$s %3$s', esc_attr( $kind ), esc_html( $mark ), esc_html( $label . ( '' !== $detail ? ' - ' . $detail : '' ) ) ); } if ( $skipped_count > 0 ) { printf( '
  • ? %s
  • ', /* translators: %d: number of pages skipped during the scan. */ esc_html( sprintf( _n( '%d page skipped', '%d pages skipped', $skipped_count, 'acceguru' ), $skipped_count ) ) ); } } 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; ?>