From fdfe1830175822bca3ee1517b5ac420091bc45a3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 8 Jan 2021 16:53:50 +0000 Subject: [PATCH] Accessibility: Customize: Add an empty `alt` attribute to the `` tag used as a hidden placeholder in the Customizer preview when no logo is chosen. Per accessibility best practices, it is recommended that all HTML `` elements have an `alt` attribute. Any decorative images should have an empty `alt` attribute (`alt=""`). Props laxman-prajapati, sabernhardt, audrasjb. Fixes #51846. git-svn-id: https://develop.svn.wordpress.org/trunk@49949 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 26fe0a3674..a84ffce694 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -1081,7 +1081,7 @@ function get_custom_logo( $blog_id = 0 ) { } elseif ( is_customize_preview() ) { // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview). $html = sprintf( - '', + '', esc_url( home_url( '/' ) ) ); }