Make WordPress Core


Ignore:
Timestamp:
11/08/2021 10:47:09 PM (19 months ago)
Author:
antpb
Message:

Media: Change upload button to a file input for better e2e targeting.

Changes the media library upload button to input type="file" for better end to end testing capabilities.

Props justinahinon, joedolson, sabernhardt, audrasjb.
Fixes #54168.

File:
1 edited

Legend:

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

    r52033 r52059  
    22472247        <p class="drag-drop-info"><?php _e( 'Drop files to upload' ); ?></p>
    22482248        <p><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>
    2249         <p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e( 'Select Files' ); ?>" class="button" /></p>
     2249        <p class="drag-drop-buttons"><label for="plupload-browse-button" id="plupload-browse-label" class="button button-hero"><?php esc_html_e( 'Select Files' ); ?></label><input id="plupload-browse-button" type="file" class="screen-reader-text" aria-labelledby="plupload-browse-label post-upload-info" /></p>
    22502250        </div>
    22512251    </div>
     
    22892289    </div>
    22902290
    2291 <p class="max-upload-size">
     2291<p class="max-upload-size" id="post-upload-info">
    22922292    <?php
    22932293    /* translators: %s: Maximum allowed file size. */
Note: See TracChangeset for help on using the changeset viewer.