From 951b462ea202b5cfcdc977194b4053009b6d03bc Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Tue, 5 Mar 2019 17:49:00 +0000 Subject: [PATCH] Accessibility: Replace media placeholder clickable divs with buttons. ` - + <# } #> <# } else { #>
-
- {{ data.button_labels.placeholder }} -
+ <# if ( data.canUpload ) { #> + + <# } #>
<# if ( data.defaultAttachment ) { #> <# } #> - <# if ( data.canUpload ) { #> - - <# } #>
<# } #> @@ -241,6 +237,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control { case 'image': return array( 'select' => __( 'Select image' ), + 'site_icon' => __( 'Select site icon' ), 'change' => __( 'Change image' ), 'default' => __( 'Default' ), 'remove' => __( 'Remove' ), diff --git a/src/wp-includes/customize/class-wp-customize-site-icon-control.php b/src/wp-includes/customize/class-wp-customize-site-icon-control.php index 4d7bcf525a..bb4681ef62 100644 --- a/src/wp-includes/customize/class-wp-customize-site-icon-control.php +++ b/src/wp-includes/customize/class-wp-customize-site-icon-control.php @@ -47,14 +47,12 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control */ public function content_template() { ?> - + <# if ( data.label ) { #> + {{ data.label }} + <# } #> + <# if ( data.description ) { #> + {{{ data.description }}} + <# } #> <# if ( data.attachment && data.attachment.id ) { #>
@@ -74,22 +72,19 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<# if ( data.canUpload ) { #> - + <# } #>
<# } else { #>
-
- button_labels['placeholder']; ?> -
+ <# if ( data.canUpload ) { #> + + <# } #>
<# if ( data.defaultAttachment ) { #> <# } #> - <# if ( data.canUpload ) { #> - - <# } #>
<# } #> diff --git a/src/wp-includes/widgets/class-wp-widget-media-gallery.php b/src/wp-includes/widgets/class-wp-widget-media-gallery.php index 54cea50ad9..fc1a5dcf17 100644 --- a/src/wp-includes/widgets/class-wp-widget-media-gallery.php +++ b/src/wp-includes/widgets/class-wp-widget-media-gallery.php @@ -228,7 +228,7 @@ class WP_Widget_Media_Gallery extends WP_Widget_Media { <# } else { #>
-

l10n['no_media_selected'] ); ?>

+
<# } #> diff --git a/src/wp-includes/widgets/class-wp-widget-media.php b/src/wp-includes/widgets/class-wp-widget-media.php index 0c3b599e54..e6146bf8d3 100644 --- a/src/wp-includes/widgets/class-wp-widget-media.php +++ b/src/wp-includes/widgets/class-wp-widget-media.php @@ -411,7 +411,9 @@ abstract class WP_Widget_Media extends WP_Widget {

-
l10n['no_media_selected'] ); ?>
+

@@ -423,9 +425,6 @@ abstract class WP_Widget_Media extends WP_Widget { l10n['replace_media'] ); ?> -

diff --git a/tests/qunit/index.html b/tests/qunit/index.html index 29f53b269c..91ba7c7567 100644 --- a/tests/qunit/index.html +++ b/tests/qunit/index.html @@ -45,7 +45,7 @@ @@ -588,83 +588,87 @@ - - - - - - - + + + + + + - + + + +