From 849cb4c172344c068bbec80e6663f1fe8a513b13 Mon Sep 17 00:00:00 2001 From: joedolson Date: Wed, 29 May 2024 22:22:14 +0000 Subject: [PATCH] Media: Accessibility: Make alt text information URL translatable. Allow translators to replace the W3C WAI decision tree link used to provide information about writing alt text. Improves accessibility for non-English speaking content authors. Props tmatsuur, joedolson, oglekler, SergeyBiryukov, myhro, sabernhardt. Fixes #60975. Built from https://develop.svn.wordpress.org/trunk@58240 git-svn-id: http://core.svn.wordpress.org/trunk@57703 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 3 ++- wp-includes/media-template.php | 3 ++- wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index e726c9a4a3..2a4995507f 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -3241,7 +3241,8 @@ function edit_form_image_editor( $post ) { printf( /* translators: 1: Link to tutorial, 2: Additional link attributes, 3: Accessibility text. */ __( 'Learn how to describe the purpose of the image%3$s. Leave empty if the image is purely decorative.' ), - esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), + /* translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations. */ + esc_url( __( 'https://www.w3.org/WAI/tutorials/images/decision-tree/' ) ), 'target="_blank" rel="noopener"', sprintf( ' %s', diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index a43a92cf32..abe3fac0ba 100644 --- a/wp-includes/media-template.php +++ b/wp-includes/media-template.php @@ -159,7 +159,8 @@ function wp_print_media_templates() { $alt_text_description = sprintf( /* translators: 1: Link to tutorial, 2: Additional link attributes, 3: Accessibility text. */ __( 'Learn how to describe the purpose of the image%3$s. Leave empty if the image is purely decorative.' ), - esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), + /* translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations. */ + esc_url( __( 'https://www.w3.org/WAI/tutorials/images/decision-tree/' ) ), 'target="_blank" rel="noopener"', sprintf( ' %s', diff --git a/wp-includes/version.php b/wp-includes/version.php index 09d9481f87..18f44148ef 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58239'; +$wp_version = '6.6-alpha-58240'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.