Changeset 52059
- Timestamp:
- 11/08/2021 10:47:09 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/media/views/uploader/inline.js
r50547 r52059 107 107 108 108 if ( this.controller.uploader ) { 109 $placeholder = this.$('.browser ');109 $placeholder = this.$('.browser-container'); 110 110 111 111 // Check if we've already replaced the placeholder. … … 114 114 } 115 115 116 $browser.detach().text( $placeholder.text() ); 117 $browser[0].className = $placeholder[0].className; 118 $browser[0].setAttribute( 'aria-labelledby', $browser[0].id + ' ' + $placeholder[0].getAttribute('aria-labelledby') ); 116 var browserLabel = $placeholder.find( 'label' ); 117 var browserInput = $placeholder.find( 'input' ); 118 119 browserLabel.attr( 'for', $browser[0].id ); 120 browserInput.attr( 'id', $browser[0].id ); 121 $browser.removeAttr( 'id' ); 122 123 $browser.append( browserLabel ).append( browserInput ); 119 124 $placeholder.replaceWith( $browser.show() ); 120 125 } -
trunk/src/js/media/views/uploader/window.js
r43309 r52059 28 28 var uploader; 29 29 30 this.$browser = $( '< button type="button" class="browser" />' ).hide().appendTo( 'body' );30 this.$browser = $( '<div class="browser-container">' ).hide().appendTo( 'body' ); 31 31 32 32 uploader = this.options.uploader = _.defaults( this.options.uploader || {}, { -
trunk/src/wp-admin/includes/media.php
r52033 r52059 2247 2247 <p class="drag-drop-info"><?php _e( 'Drop files to upload' ); ?></p> 2248 2248 <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> 2250 2250 </div> 2251 2251 </div> … … 2289 2289 </div> 2290 2290 2291 <p class="max-upload-size" >2291 <p class="max-upload-size" id="post-upload-info"> 2292 2292 <?php 2293 2293 /* translators: %s: Maximum allowed file size. */ -
trunk/src/wp-includes/css/buttons.css
r50278 r52059 134 134 } 135 135 136 /* Support focus state on label designed as button in media uploader. */ 137 .drag-drop-inside p.drag-drop-buttons:focus-within label.button, 138 .uploader-inline-content div.browser-container:focus-within label.button, 136 139 .wp-core-ui .button.focus, 137 140 .wp-core-ui .button:focus, -
trunk/src/wp-includes/media-template.php
r52033 r52059 253 253 <h2 class="upload-instructions drop-instructions"><?php _e( 'Drop files to upload' ); ?></h2> 254 254 <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" aria-labelledby="post-upload-info"><?php _e( 'Select Files' ); ?></button> 255 <div class="browser-container"> 256 <label class="button button-hero"><?php esc_html_e( 'Select Files' ); ?></label> 257 <input type="file" class="browser screen-reader-text" aria-describedby="post-upload-info"> 258 </div> 256 259 </div> 257 260
Note: See TracChangeset
for help on using the changeset viewer.