Site logo

Archived topic

Alt tag for logo

1 reply · Started by Drew on April 24, 2018

Viewing posts 1–2 of 2

In the process of having a client site reviewed by an accessibility compliance provider, they flagged the alt tag assigned to the logo image as a fail.

They provided a recommended tag value - [client name] home - but it appears that even after putting that in place via the logo image, the theme is pulling whatever value is entered into the site name (via Settings>General).

As an example, in order to get "[client name] home" to appear as the alt tag, I had to enter that as the Site title: https://www.screencast.com/t/BhhFx37e

Is there a way to adjust this without having to alter the site title?

Hi Drew,

You can adjust the alt tag quite easily with this filter:

add_filter( 'generate_logo_title', 'tu_adjust_logo_alt' );
function tu_adjust_logo_alt() {
    return 'Your alt here';
}
This archived topic is closed to new replies.