Make WordPress Core


Ignore:
Timestamp:
02/08/2024 11:29:18 PM (11 months ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r57289 r57572  
    10391039                <input type="hidden" class="icon_colors" value="<?php echo esc_attr( wp_json_encode( array( 'icons' => $color_info->icon_colors ) ) ); ?>" />
    10401040                <label for="admin_color_<?php echo esc_attr( $color ); ?>"><?php echo esc_html( $color_info->name ); ?></label>
    1041                 <table class="color-palette">
    1042                     <tr>
     1041                <div class="color-palette">
     1042                <?php
     1043                foreach ( $color_info->colors as $html_color ) {
     1044                    ?>
     1045                    <div class="color-palette-shade" style="background-color: <?php echo esc_attr( $html_color ); ?>">&nbsp;</div>
    10431046                    <?php
    1044                     foreach ( $color_info->colors as $html_color ) {
    1045                         ?>
    1046                         <td style="background-color: <?php echo esc_attr( $html_color ); ?>">&nbsp;</td>
    1047                         <?php
    1048                     }
    1049                     ?>
    1050                     </tr>
    1051                 </table>
     1047                }
     1048                ?>
     1049                </div>
    10521050            </div>
    10531051            <?php
Note: See TracChangeset for help on using the changeset viewer.