Should the alt attribute show up when hovering on the image?

I also had that problem - I added the alt attribute but I can’t see any text when I hover over the image.

1 Like

The alt attribute is not meant to be visible unless there’s an issue loading the image.

The alt attribute also serves the following purposes: (click here)
  • If an image fails to load on a web page, a user can mouse over the area originally intended for the image and read a brief description of the image. This is made possible by the description you provide in the alt attribute.
  • Visually impaired users often browse the web with the aid of screen reading software. When you include the alt attribute, the screen reading software can read the image’s description out loud to the visually impaired user.
  • The alt attribute also plays a role in Search Engine Optimization (SEO), because search engines cannot “see” the images on websites as they crawl the internet. Having descriptive alt attributes can improve the ranking of your site.

Learn more:

2 Likes

The only browser to show the tooltip (for alt) when hovering was IE. Whether EDGE does, or not one cannot say. If you want a tooltip on hover, then include a title attribute.

alt and title are not the same thing, and not interchangeable. Search engines and screen readers can see both. ALT is intended to be brief and concise, and should never be used for SEO purposes. They are a requirement under accessibility guidelines. TITLE can be more descriptive, give more detail and be less brief. It can be leveraged for SEO.

We can style tooltips with CSS by using an attribute selector, afaik.

4 Likes

Oh, thanks. that makes more sense.

1 Like

Thanks a lot! I have been worrying about this for minuter!