Make WordPress Core


Ignore:
Timestamp:
02/16/2021 04:03:37 AM (4 years ago)
Author:
joedolson
Message:

Media: Associate upload errors and field with controls.

Adds an explicit relationship between the upload button and the maximum upload limit, moves focus to the error dismiss button if an error occurs, and adds a call to wp.a11y.speak to report the error after it occurs.

Props afercia, anevins, antpb, adamsilverstein, poena
Fixes #47120

File:
1 edited

Legend:

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

    r49804 r50352  
    253253                <h2 class="upload-instructions drop-instructions"><?php _e( 'Drop files to upload' ); ?></h2>
    254254                <p class="upload-instructions drop-instructions"><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>
    255                 <button type="button" class="browser button button-hero"><?php _e( 'Select Files' ); ?></button>
     255                <button type="button" class="browser button button-hero" aria-labelledby="post-upload-info"><?php _e( 'Select Files' ); ?></button>
    256256            </div>
    257257
    258258            <div class="upload-inline-status"></div>
    259259
    260             <div class="post-upload-ui">
     260            <div class="post-upload-ui" id="post-upload-info">
    261261                <?php
    262262                /** This action is documented in wp-admin/includes/media.php */
Note: See TracChangeset for help on using the changeset viewer.