mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Accessibility: Customize: Add an empty alt attribute to the <img> 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 `<img>` 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
This commit is contained in:
parent
bb01f0187c
commit
fdfe183017
@ -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(
|
||||
'<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo"/></a>',
|
||||
'<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo" alt="" /></a>',
|
||||
esc_url( home_url( '/' ) )
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user