Customize: Put focus on change button instead of remove button in media control.

Allow controls to specify the primary element to receive focus by adding a `control-focus` class.

Props adamsilverstein, westonruter.
Fixes #36337.


git-svn-id: https://develop.svn.wordpress.org/trunk@37152 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2016-03-30 21:40:43 +00:00
parent 253308253b
commit 0bc533e10b
2 changed files with 8 additions and 4 deletions
@@ -196,7 +196,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
<div class="actions">
<# if ( data.canUpload ) { #>
<button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
<button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
<div style="clear:both"></div>
<# } #>
</div>