- Timestamp:
- 10/27/2017 08:17:49 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.