Add alt & title text to comments placeholder icon
-
Hi there,
There’s a smiley face placeholder (wp-content/themes/hestia/assets/img/placeholder.jpg) that goes in to the comments area on posts even if you have avatars turned off. There’s no alt or title text placed on it. A screenreader will announce this as “image”. Can we have alt and title text added to this? Perhaps “Avatar Placeholder” will do. The file needing modification is layout-functions.php, perhaps like so:
function hestia_comments_template() { if ( is_user_logged_in() ) { $current_user = get_avatar( wp_get_current_user(), 64 ); } else { $current_user = '<img src="' . get_template_directory_uri() . '/assets/img/placeholder.jpg" alt="Avatar Placeholder" title="Avatar Placeholder" height="64" width="64"/>'; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add alt & title text to comments placeholder icon’ is closed to new replies.