From 13eb6f95f0ab21dca863b70aeabf43bf217f8cef Mon Sep 17 00:00:00 2001 From: Joen A <1204802+jasmussen@users.noreply.github.com> Date: Tue, 16 Mar 2021 09:05:34 +0100 Subject: [PATCH] Try: more accessible labels. (#29659) * Try: more accessible labels. * Update packages/block-library/src/social-link/index.php Co-authored-by: Ari Stathopoulos Co-authored-by: Ari Stathopoulos --- packages/block-library/src/social-link/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index 4f8893511d48f3..770be3d41bfbf7 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -19,7 +19,12 @@ function render_block_core_social_link( $attributes, $content, $block ) { $service = ( isset( $attributes['service'] ) ) ? $attributes['service'] : 'Icon'; $url = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false; - $label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : block_core_social_link_get_name( $service ); + $label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : sprintf( + /* translators: %1$s: Social-network name. %2$s: URL. */ + __( '%1$s: %2$s', 'gutenberg' ), + block_core_social_link_get_name( $service ), + $url + ); $class_name = isset( $attributes['className'] ) ? ' ' . $attributes['className'] : false; // Don't render a link if there is no URL set.