Users: Replace table tags for color palettes in profiles.

Replace the `table` element used to present color palette selection in the user profile screen with generic elements. The extra semantics of a table are at best unhelpful and have some potential to great extraneous verbosity for screen readers.

Props sabernhardt, desrosj.
Fixes #53157.
Built from https://develop.svn.wordpress.org/trunk@57572


git-svn-id: http://core.svn.wordpress.org/trunk@57073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2024-02-08 23:31:16 +00:00
parent 27ba6d5b6b
commit 962f2a1508
6 changed files with 25 additions and 15 deletions

View File

@ -934,11 +934,14 @@ table.form-table td .updated p {
}
.color-palette {
display: table;
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
.color-palette .color-palette-shade,
.color-palette td {
display: table-cell;
height: 20px;
padding: 0;
border: none;
@ -1602,12 +1605,15 @@ table.form-table td .updated p {
margin-bottom: 0;
}
.form-table .color-palette .color-palette-shade,
.form-table .color-palette td {
display: table-cell;
width: 15px;
height: 30px;
padding: 0;
}
.form-table table.color-palette {
.form-table .color-palette {
margin-left: 10px;
}

File diff suppressed because one or more lines are too long

View File

@ -933,11 +933,14 @@ table.form-table td .updated p {
}
.color-palette {
display: table;
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
.color-palette .color-palette-shade,
.color-palette td {
display: table-cell;
height: 20px;
padding: 0;
border: none;
@ -1601,12 +1604,15 @@ table.form-table td .updated p {
margin-bottom: 0;
}
.form-table .color-palette .color-palette-shade,
.form-table .color-palette td {
display: table-cell;
width: 15px;
height: 30px;
padding: 0;
}
.form-table table.color-palette {
.form-table .color-palette {
margin-right: 10px;
}

File diff suppressed because one or more lines are too long

View File

@ -1038,17 +1038,15 @@ function admin_color_scheme_picker( $user_id ) {
<input type="hidden" class="css_url" value="<?php echo esc_url( $color_info->url ); ?>" />
<input type="hidden" class="icon_colors" value="<?php echo esc_attr( wp_json_encode( array( 'icons' => $color_info->icon_colors ) ) ); ?>" />
<label for="admin_color_<?php echo esc_attr( $color ); ?>"><?php echo esc_html( $color_info->name ); ?></label>
<table class="color-palette">
<tr>
<?php
foreach ( $color_info->colors as $html_color ) {
?>
<td style="background-color: <?php echo esc_attr( $html_color ); ?>">&nbsp;</td>
<?php
}
<div class="color-palette">
<?php
foreach ( $color_info->colors as $html_color ) {
?>
</tr>
</table>
<div class="color-palette-shade" style="background-color: <?php echo esc_attr( $html_color ); ?>">&nbsp;</div>
<?php
}
?>
</div>
</div>
<?php

View File

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