Alt-text or title do not appear when you hover over an image
-
Wondering how to get the alt text (or image title, I don’t care which) to popup like a “tooltip” when you mouse over an image. Other themes do this by default, but I can’t seem to get Dara to cooperate, and I can’t find anything in the code or css that is suppressing it. Any guidance? Thank you!
The blog I need help with is: (visible only to logged in users)
-
Hi there,
Alt text never displays on a website. Alt text is added via the HTML
altattribute, and only displays if an image fails to load for some reason. Otherwise it’s only visible to software like screen readers. This is not something that depends on your site theme, but is how HTML itself works.To have a tooltip display, you need to add a title attribute to the image. This is not the same thing as the Title field you can complete for the image in the media library, but has to be added to the image block in the editor itself when you insert an image:
If you’ve added that attribute to an image and it’s not showing a tooltip when you view the post itself in your browser, please give a link to the post where this is happening and I’d be happy to take a look.
- The topic ‘Alt-text or title do not appear when you hover over an image’ is closed to new replies.