WordPress.org

Make WordPress Core

Ticket #42724: 42724-2.diff

File 42724-2.diff, 2.2 KB (added by RavanH, 19 months ago)

Patch proposing non-hidden line breaks and added fieldset/legend for accessibility

  • src/wp-admin/css/common.css

    diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
    index 3a929ac375..a676404627 100644
    a b img { 
    39423942        }
    39433943}
    39443944
    3945 .options-media-php br {
    3946         display: none;
    3947 }
    3948 
    3949 @media screen and (max-width: 375px) {
    3950         .options-media-php input[type="number"][name*="_size_"] {
    3951                 margin: 5px 0;
    3952         }
    3953         .options-media-php label[for*="_size_h"]:before {
    3954                 content: "";
    3955                 display: block;
    3956         }
    3957         .options-media-php br {
    3958                 display: block;
    3959         }
    3960 }
    3961 
    39623945@media screen and (max-width: 320px) {
    39633946        /* Prevent default center alignment and larger font for the Right Now widget when
    39643947           the network dashboard is viewed on a small mobile device. */
  • src/wp-admin/options-media.php

    diff --git a/src/wp-admin/options-media.php b/src/wp-admin/options-media.php
    index 4f585a10da..2ea79c8beb 100644
    a b include( ABSPATH . 'wp-admin/admin-header.php' ); 
    5454<table class="form-table">
    5555<tr>
    5656<th scope="row"><?php _e( 'Thumbnail size' ); ?></th>
    57 <td>
     57<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Thumbnail size' ); ?></span></legend>
    5858<label for="thumbnail_size_w"><?php _e( 'Width' ); ?></label>
    5959<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option( 'thumbnail_size_w' ); ?>" class="small-text" />
     60<br />
    6061<label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label>
    6162<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" />
    62 <p><input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/>
    63 <label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label></p>
    64 </td>
     63<br />
     64<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/>
     65<label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label>
     66</fieldset></td>
    6567</tr>
    6668
    6769<tr>