The alt=""
attribute in images does not serve to display the desired tooltip, the purpose of this attribute is best explained in:
What you want is to display the tooltip.
It's worth noting that some browsers such as IE6 could display this tooltip when using the alt=
attribute, but that does not mean it was right.
So to display such a tooltype the "global" attribute to be used is title=""
, of course it is worth noting that it has varied behavior sometimes, as in elements <link ...>
:
So it should look like this:
<img src="https://cdn.sstatic.net/Sites/br/img/sprites.svg?v=9a80d5fa584d"alt="sprites do stack overflow" title="sprites do stack overflow" />
Note that although you have put text in alt
and title
in equal ways, both have different goals, although both are eventually used in SEO for description, behavior in screen readers is variant, despite of being more interesting to take a look at the attributes aria
:
But screen readers goes a little further than the question, I leave the link only to have an interest in delving deeper into the subject.