Forum Moderators: open

Message Too Old, No Replies

ALT tag

Is popup on hover over ALT tag a bug or a feature?

         

richlowe

4:42 pm on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This thread continues a discussion started in [webmasterworld.com...]

That IS a bug. It is NOT the correct response.

It is not a bug. It is part of the MICROSOFT internet explorer specification and implementation. It is not part of the W3C specification. However, having the text show when you mouse over is INTENTIONAL and was specifically designed into IE.

Is there any proof to say that IE was specifically designed to do this? Not saying your wrong Rich, just want to see the facts before hand :)

Craig

See:

[msdn.microsoft.com...]

It is part of the documented behavior for IE.
Richard Lowe

choster

4:51 pm on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Semantics. It is not a bug, but it is a non-standard implementation regardless. From MSDN,
The text also acts as a ToolTip if the title is not set

Thus, use alt= for what alt= was intended and use title= for what title= was intended, and all should display correctly in all browsers.

richlowe

5:11 pm on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Semantics. It is not a bug, but it is a non-standard implementation regardless.

It is not semantics. IE is the de-facto standard since it is used by over 95% of the users in the world. The other browsers are actually non standard implementations of the IE standard. (don't you just love devil's advocates ;-)).

Regardless, it does seem kind of silly to have an identical ALT and TITLE tag. I prefer IE's implementation of ALT over the strict W3C definition (and W3C does NOT say anything about using or not using ALT in the manner that IE does).

All three major browsers handle this differently.

With ALT but no title:

IE shows ALT
Opera shows a link to the picture (this really sucks and is totally worthless)
Netscape shows nothing

I prefer IE's behavior personally.

Richard

creative craig

5:13 pm on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I prefer IE's behavior personally.

Same here. Thanks for the link Rich.

Craig

DrDoc

5:14 pm on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First off... There are no alt tags ;) It's an alt attribute.

Strictly speaking, it is still a bug. The first line gives that away:

Sets or retrieves a text alternative to the graphic.

Alternative = instead of... not jointly, or at the same time as.

Now, you are right that some rocket scientist wannabe in Redmond thought he would be smart and extend the behavior to add a little "feature" making the alternative text "pop up" as a tooltip... making the behavior intentional.

However, I don't see anything wrong with this, since the intention is to only show the alt text if there is no title attribute present. Except for... what if I don't want the alt text to show up on mouseover? Most other proprietary features can be turned on and off (image toolbar, smart tags, just to mention a few), but not this one. That would force me to use a title attribute and bloat my code for no reason. Or, I may not use the alt text at all.

See, the problem isn't so much that this "feature" is a bad idea. I think it's a great idea. However, it promotes laziness and incorrect coding. Why do you think people don't use the alt attribute the way they should? Because they think the only purpose it serves is to act as a tooltip. And then they realize that it doesn't work in other browsers, thinking that they are broken. Why, when there is a perfectly functional and valid attributes that does exactly what you want in all browsers, would you intentionally break that by promoting a completely different attribute never meant to serve that purpose?

It may seem innocent, since both the alt and title attributes hold text. But, in reality, the texts are very different. The alt attribute holds a brief description of the image, meant to be rendered if, for some reason, you cannot see the image, either because of a visual challenge, or whatever the reason may be.

When you look at it closely, Microsoft's implementation of the alt attribute is all but innocent. It's a deliberate attempt of breaking the expected behavior of the browser.

What if I built a browser and decided to use the style attribute as a tooltip, or use the type attribute in a script tag in place of the src tag. All of a sudden millions of pages would malfunction. Whose fault would that be? Mine. "Oh, but it was a deliberate feature, designed to work that way. I figured a lot of designers would like my browser because they wouldn't have to view source to see which styles are used for the element I moused over!" (Redmond, don't get any ideas. This is meant to be an example.) That would not be acceptable, no matter how deliberate my "design" is, no matter how "purposefully" I implemented it.

A bug is always a bug, no matter if it's intentional or not.

A dictionary defines

bug
as:
A defect or difficulty, as in a system or design.
Computer Science. A defect in the code or routine of a program.

If that's not what Microsoft did, then... whatever.

DrDoc

5:17 pm on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IE is the de-facto standard since it is used by over 95% of the users in the world.

And Chinese is the de-facto standard international language...

IE is no standard whatsoever as long as they claim to support W3C. If they were honest enough to tell the world that they follow their own standard, then yes, IE would be the world standard. But now it isn't.

R1chard

3:34 pm on Mar 10, 2004 (gmt 0)

10+ Year Member



Gotta agree with DrDoc.

Whatever anybody may tell you, MSIE is NOT a standard. People who use that as an excuse are just lazy or don't really know what they are talking about.

The two attributes are entirely different, and should be used for different purposes.

D_Blackwell

5:31 am on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you explain the purpose of the title attribute. I use the alt attribute because I try to follow the WCAG AAA accessibility guidelines. I use an empty title attribute to shut down the IE tool tip. Should I be using something in it? And for what? How extensive a description is ok with alt? I'm not real generous in my alt descriptions, and could be more user friendly, if there is no downside.

asquithea

10:06 am on Mar 13, 2004 (gmt 0)

10+ Year Member



Imagine that somebody is viewing your site through a text browser. Your alt text is what they will see instead of the image.

So let's suppose that your company logo is a stylised picture of a globe. Which of the following do you want your site to say to a blind/text-based user:

(no alt text)

This online computer repair service is brought to you by

This online computer repair service is brought to you by A picture of a globe

This online computer repair service is brought to you by A translucent blue globe with shiny red insets, bordered by a fringe of fire and three-dimensional black lettering

This online computer repair service is brought to you by CompTech International

The title text can be regarded as additional information, to be displayed as a tooltip, or as a line of text in the status bar, or spoken aloud, or ignored altogether. It's particularly useful on hyperlinks:

A good hyperlink should describe what's at the end of the link without the user having to read the text around it:

(Common)

One of the best browsers around is Mozilla Firefox. Click here [mozilla.org] to get it!

(Better)

One of the best browsers around is Mozilla Firefox [mozilla.org]

Sometimes, however, the destination of the link is still not obvious even though the context is clearer. For example:

With increasing numbers of people using a newer, more capable browser [mozilla.org], I have been able to build this site using the latest Cascading Style Sheet technology.

In this case, you'd want to attach a title to the link, so that when the user hovers over it they see [External link: Mozilla Firefox] or similar.

Actually, this forum does exactly that; view the source and you'll see that it inserts a title automatically for each hyperlink (so you don't have to parse the redirected hyperlink shown in the status bar).

I hope that helps a bit.