Skip to content

Commit 13eb6f9

Browse files
jasmussenaristath
andauthored
Try: more accessible labels. (#29659)
* Try: more accessible labels. * Update packages/block-library/src/social-link/index.php Co-authored-by: Ari Stathopoulos <[email protected]> Co-authored-by: Ari Stathopoulos <[email protected]>
1 parent 55101ca commit 13eb6f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/block-library/src/social-link/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ function render_block_core_social_link( $attributes, $content, $block ) {
1919

2020
$service = ( isset( $attributes['service'] ) ) ? $attributes['service'] : 'Icon';
2121
$url = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false;
22-
$label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : block_core_social_link_get_name( $service );
22+
$label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : sprintf(
23+
/* translators: %1$s: Social-network name. %2$s: URL. */
24+
__( '%1$s: %2$s', 'gutenberg' ),
25+
block_core_social_link_get_name( $service ),
26+
$url
27+
);
2328
$class_name = isset( $attributes['className'] ) ? ' ' . $attributes['className'] : false;
2429

2530
// Don't render a link if there is no URL set.

0 commit comments

Comments
 (0)