Changeset 42031
- Timestamp:
- 10/27/2017 08:17:49 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r42025 r42031 3694 3694 } ); 3695 3695 3696 control.notifications.container = control.getNotificationsContainerElement();3697 3698 3696 renderNotificationsIfVisible = function() { 3699 3697 var sectionId = control.section(); … … 3906 3904 */ 3907 3905 renderContent: function () { 3908 var control = this, template, standardTypes, templateId ;3906 var control = this, template, standardTypes, templateId, sectionId; 3909 3907 3910 3908 standardTypes = [ … … 3946 3944 control.container.html( template( control.params ) ); 3947 3945 } 3946 } 3947 3948 // Re-render notifications after content has been re-rendered. 3949 control.notifications.container = control.getNotificationsContainerElement(); 3950 sectionId = control.section(); 3951 if ( ! sectionId || ( api.section.has( sectionId ) && api.section( sectionId ).expanded() ) ) { 3952 control.notifications.render(); 3948 3953 } 3949 3954 }, -
trunk/src/wp-includes/customize/class-wp-customize-media-control.php
r41550 r42031 132 132 public function content_template() { 133 133 ?> 134 <label for="{{ data.settings['default'] }}-button"> 135 <# if ( data.label ) { #> 136 <span class="customize-control-title">{{ data.label }}</span> 137 <# } #> 138 <# if ( data.description ) { #> 139 <span class="description customize-control-description">{{{ data.description }}}</span> 140 <# } #> 141 </label> 134 <# 135 var selectButtonId = _.uniqueId( 'customize-media-control-button-' ); 136 var descriptionId = _.uniqueId( 'customize-media-control-description-' ); 137 var describedByAttr = data.description ? ' aria-describedby="' + descriptionId + '" ' : ''; 138 #> 139 <# if ( data.label ) { #> 140 <label class="customize-control-title" for="{{ selectButtonId }}">{{ data.label }}</label> 141 <# } #> 142 <div class="customize-control-notifications-container"></div> 143 <# if ( data.description ) { #> 144 <span id="{{ descriptionId }}" class="description customize-control-description">{{{ data.description }}}</span> 145 <# } #> 142 146 143 147 <# if ( data.attachment && data.attachment.id ) { #> … … 179 183 <# if ( data.canUpload ) { #> 180 184 <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button> 181 <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>185 <button type="button" class="button upload-button control-focus" id="{{ selectButtonId }}" {{{ describedByAttr }}}>{{ data.button_labels.change }}</button> 182 186 <# } #> 183 187 </div> … … 193 197 <# } #> 194 198 <# if ( data.canUpload ) { #> 195 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.select }}</button>199 <button type="button" class="button upload-button" id="{{ selectButtonId }}" {{{ describedByAttr }}}>{{ data.button_labels.select }}</button> 196 200 <# } #> 197 201 </div>
Note: See TracChangeset
for help on using the changeset viewer.