Forum Moderators: phranque
nevertheless, i don't know since which browser version title is supported. maybe this will only work on specific browsers then.
and just a 2nd note: the alt attribute in my tip is supplied (even if it's empty then) and you shouldn't get any problems while checking the doc in the validator.
-hakre
and just a 2nd note: the alt attribute in my tip is supplied (even if it's empty then) and you shouldn't get any problems while checking the doc in the validator.
You're right is saying that using alt="" will be good enough for validation, but it is not sufficient in terms of accessibility. A blind person would have no idea what the image represents without the alt text. As for browser compatibility, title is supported in all modern browsers.
It allows for an easy way to associate the image data with the image so it can be displayed in a createPopup() rather than a conventional alt balloon.
function mouse_entered_image(el) {
if (el.alt!= '') {
window['temp_alt_str' + el.id] = el.alt
el.alt = ''
}
}function mouse_exited_image(el) {
if (el.alt == '') {
el.alt = window['temp_alt_str' + el.id]
}
}
<img id="img1" onmouseleave="mouse_exited_image(this)" onmouseover="mouse_entered_image(this)" alt="some text">
A blind person would have no idea what the image represents without the alt text
shure he/she won't. but take it simplier: in this post it's about hiding the tooltip, even for people who can see (and read), so this might not be applicable here at all. for blind people a description can be added to the picture as well in other ways, too. in terms of accessability it depends, there are not that straight rules like, every image should ever have and alt attribute with a descriptive text.
Not sure if this can help.
I really like the alt text in the images because of the added information on the page for the visitor and also for the SE benefits, but my client is not too keen on "those d#%n anoying yellow boxes of text" that pop up.
Oh well, please everyone all the time...
tmi