Make WordPress Core


Ignore:
Timestamp:
02/22/2025 12:10:50 PM (20 months ago)
Author:
audrasjb
Message:

Site Health: Improve HTML semantics for tables used in Site Health debug tab.

This changeset removes the presentation role from the Site Health debug tab tables to switch them into regular data tables, and updates the related stylesheet to keep the previously used styles.

Props audrasjb, hbhalodia, rvouill, mukesh27, sabernhardt, joedolson, alexstine.
Fixes #62880.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/site-health-info.php

    r58299 r59859  
    109109
    110110                                ?>
    111                                 <table class="widefat striped health-check-table" role="presentation">
     111                                <table class="widefat striped health-check-table">
    112112                                        <tbody>
    113113                                        <?php
    … …  
    127127
    128128                                                if ( in_array( $field_name, $sizes_fields, true ) ) {
    129                                                         printf( '<tr><td>%s</td><td class="%s">%s</td></tr>', esc_html( $field['label'] ), esc_attr( $field_name ), $values );
     129                                                        printf( '<tr><th scope="row">%s</th><td class="%s">%s</td></tr>', esc_html( $field['label'] ), esc_attr( $field_name ), $values );
    130130                                                } else {
    131                                                         printf( '<tr><td>%s</td><td>%s</td></tr>', esc_html( $field['label'] ), $values );
     131                                                        printf( '<tr><th scope="row">%s</th><td>%s</td></tr>', esc_html( $field['label'] ), $values );
    132132                                                }
    133133                                        }
Note: See TracChangeset for help on using the changeset viewer.