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:

7 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.

13 Likes

Oh, thanks. that makes more sense.

1 Like

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

Well explained. Thanks

1 Like

You said that “ALT is intended to be brief and concise, and should never be used for SEO purposes.” ,
but in the introduction this site says:" 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."<

So i don’t really understand this point

3 Likes

Well that may be, when used in a natural way. Many would be SEOers have leveraged alternate text in any number of ways to curry favor in the keyword competition, rather than letting it serve its principal purpose…assistive technology.

Wouldn’t that contradict what the course is saying below?

  • 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.

That is a blanket generalization. Can affect the ranking, not improve it. There are hundreds of factors. This is one very small concern. It’s primary purpose is assistive technology users, not search engines. It’s the belief in that statement that had SEOers gaming the system years ago until search engines devalued any boost to rankings ALT may have previously offered.

Conclusion? The course is a little bit outdated and the alt is used for blind people rather than for improving SEO. It makes sense as this ranking strategy may vary over time and browsers may change too in order to stop practices that boost certain webpages.