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.


Built from https://develop.svn.wordpress.org/trunk@59859


git-svn-id: http://core.svn.wordpress.org/trunk@59201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2025-02-22 12:12:20 +00:00
parent 80167f26b1
commit 8240259860
6 changed files with 18 additions and 6 deletions

View File

@ -167,6 +167,10 @@ are styled in the Privacy section of edit.css */
margin: 0 auto;
}
.widefat.health-check-table th {
font-size: 13px;
}
.health-check-table td:first-child {
width: 30%;
}
@ -338,6 +342,7 @@ are styled in the Privacy section of edit.css */
table-layout: fixed;
}
.health-check-table th,
.health-check-table td {
box-sizing: border-box;
display: block;
@ -345,6 +350,7 @@ are styled in the Privacy section of edit.css */
word-wrap: break-word;
}
.widefat.health-check-table th,
.health-check-table td:first-child {
width: 100%;
padding-bottom: 0;

File diff suppressed because one or more lines are too long

View File

@ -166,6 +166,10 @@ are styled in the Privacy section of edit.css */
margin: 0 auto;
}
.widefat.health-check-table th {
font-size: 13px;
}
.health-check-table td:first-child {
width: 30%;
}
@ -337,6 +341,7 @@ are styled in the Privacy section of edit.css */
table-layout: fixed;
}
.health-check-table th,
.health-check-table td {
box-sizing: border-box;
display: block;
@ -344,6 +349,7 @@ are styled in the Privacy section of edit.css */
word-wrap: break-word;
}
.widefat.health-check-table th,
.health-check-table td:first-child {
width: 100%;
padding-bottom: 0;

File diff suppressed because one or more lines are too long

View File

@ -108,7 +108,7 @@ wp_admin_notice(
}
?>
<table class="widefat striped health-check-table" role="presentation">
<table class="widefat striped health-check-table">
<tbody>
<?php
@ -126,9 +126,9 @@ wp_admin_notice(
}
if ( in_array( $field_name, $sizes_fields, true ) ) {
printf( '<tr><td>%s</td><td class="%s">%s</td></tr>', esc_html( $field['label'] ), esc_attr( $field_name ), $values );
printf( '<tr><th scope="row">%s</th><td class="%s">%s</td></tr>', esc_html( $field['label'] ), esc_attr( $field_name ), $values );
} else {
printf( '<tr><td>%s</td><td>%s</td></tr>', esc_html( $field['label'] ), $values );
printf( '<tr><th scope="row">%s</th><td>%s</td></tr>', esc_html( $field['label'] ), $values );
}
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59858';
$wp_version = '6.8-alpha-59859';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.