Logo alt attribute

BuzzC

Registered Member
Joined
May 21, 2017
Messages
99
Reaction score
14
Hi everyone,

Can anyone please point me in the right direction on setting an alt attribute for the logo image on a wordpress site? Its the only thing that I cant seem to crack and nothing online on this either...as far as I can tell.

Want to get 100% on an audit tool I am testing and this is the last item on the list.
 
Find the image in your WordPress Media Library, select it and set the alt-text in the details panel on the right-hand side of your screen.
 
This way I know... and the alt attr is added in the media library but when the logo renders it does not appear. Theme issue? Possibly a manual way of doing it (im not friendly with php so thats why i am asking here)
 
Alt text appears inside the container only when the image can't be displayed. So, if the logo renders, alt text shouldn't even be displayed.

Are you referring image title? That's what pops up when you hover over it with your mouse. Let me know if this helped.
 
If I inspect the element in chrome it appears like this
<img class = "xxxx" src"http://xxx/xxx.png" alt> == $0

whereas all other images display alt text properly

<img class = "xxxx" src"http://xxx/xxx.png" alt="blablabla"

and the soft picks this up.
 
Alt text appears inside the container only when the image can't be displayed. So, if the logo renders, alt text shouldn't even be displayed.

Are you referring image title? That's what pops up when you hover over it with your mouse. Let me know if this helped.

All true, however, he is using an audit tool. The image title has no SEO value, alt text has potential SEO value. The tool is telling him that the alt attribute is not set. It's not a case of the alt text physically displaying.

If I inspect the element in chrome it appears like this
<img class = "xxxx" src"http://xxx/xxx.png" alt> == $0

whereas all other images display alt text properly

<img class = "xxxx" src"http://xxx/xxx.png" alt="blablabla"

and the soft picks this up.

If you navigate to wp-content/themes/yourtheme you will find a header.php file. You could try setting the alt-text manually in that. I'd need to see the theme to be sure though, they could be using a custom function to display the logo.
 
All true, however, he is using an audit tool. The image title has no SEO value, alt text has potential SEO value. The tool is telling him that the alt attribute is not set. It's not a case of the alt text physically displaying.



If you navigate to wp-content/themes/yourtheme you will find a header.php file. You could try setting the alt-text manually in that. I'd need to see the theme to be sure though, they could be using a custom function to display the logo.

Bingo! found it as per your suggestion. Added the alt text and all good now. Thanks man! I have the same problem on another theme and tried going this route via the header file a few days ago but the code was different and I simply didnt know how to manuall ad the attributes. The current theme code is pretty straight forward and all good now.
 
Go to wordpress media library. Select your Logo, now you can see the ALT Tag there. Now just edit that.
Very Simple.
Check this Sample:
Image not found: vL88LVa
 
Bingo! found it as per your suggestion. Added the alt text and all good now. Thanks man! I have the same problem on another theme and tried going this route via the header file a few days ago but the code was different and I simply didnt know how to manuall ad the attributes. The current theme code is pretty straight forward and all good now.

No problem. Glad you got it sorted.
 
All true, however, he is using an audit tool. The image title has no SEO value, alt text has potential SEO value. The tool is telling him that the alt attribute is not set. It's not a case of the alt text physically displaying.

Oh word. Glad you got it sorted out.
 
Back
Top