There is quite a brouhaha happening at the Mozilla Extension Room over Firefox’s behavior when it encounters items (usually images) with the “alt” attribute (which is often incorrectly referred to as the “alt tag”).
Note: In order to explain my thoughts on the topic, a bit of history is needed. If you already know all the history, feel free to hop straight to my opinion.
Some definitions
- “alt” attribute
- Usually applied to images, it is designed to provide replacement text for images in the case they don’t load or can’t be seen. If there’s a server issue and the image isn’t rendered, a user will see a bit of text in its place. Or, if a user is blind and is using a screen reader, that program will read the alt text aloud, in lieu of the user seeing the image.
- “title” attribute
- Available on most elements, this is an attribute with which the designer can offer a title for a given element. The display of this attribute is left to the discretion of individual browser manufacturers, but most elect to use a tooltip. A few use the stats bar.
- tooltip
- A tooltip is that cute little pop-up box that appears when you hover your mouse over an element. It’s often yellow, and is often used in programs to identify an icon textually, or possibly to provide a bit of inline help.
A bit of history
Back in the days when Netscape 4 ruled the web, that browser displayed the “alt” attribute for images as a “tooltip.” This is the first instance that I can think of in which a tooltip appeared on web pages. When Microsoft started pushing Internet Explorer, it emulated much of Netscape’s behavior, since that what folks were used to. Hence, it also displayed the alt attribute as a tooltip upon hovering an image. It seemed helpful at the time, and all was well.
Well, almost. Two core problems arose from this:
-
It’s simply incorrect. According to the the HTML spec set forth by the W3C, the alt attribute’s text is to be displayed only in the case that the image is not rendered or can’t be seen. It is not supposed to be presented if the image is there.
-
Web authors began using it incorrectly. Rather than replacement text as intended, they began using it to offer long descriptions of images, or they put the filename of the image there, or they put a goofy quote that only made sense if you could see the image, or…well, you get the idea. They assumed that the alt attribute would always be a popup tooltip, and they used the field as a place to put whatever they thought would be nice in a tooltip.
When people starting complaining about this (mostly standards advocates), Microsoft did change the behavior of IE. Microsoft decided it should actually be the title attribute displayed in the tooltip, and not the alt attribute. As such, IE now displays the title attribute if it exists, and the alt attribute if it doesn’t. While this is a marked improvement, it is still in violation of the spec because it still displays the alt attribute as a tooltip in the case there is no title attribute.
The crux of the issue
When the latest round of standards-compliant browsers came out (notably Safari and Firefox), they chose to use tooltips for the title attribute and not display the alt attribute unless the image couldn’t be rendered (as per the spec). This bothered many web authors who were used to IE. They came out saying, “Firefox sucks because it doesn’t display tooltips for my alt tags [sic]!” They incorrectly assumed that Firefox was mistaken, when it is actually IE that is violating the W3C spec.
Now, a crafty developer has created a Firefox extension that emulates IE’s behavior in regard to alt and title attributes, and some people are up in arms about it. Those who object claim that this sort of extension encourages bad practices in web authors and encourages browser manufacturers to emulate IE, rather than do as the spec says.
My thoughts
As a standards advocate, I feel that web authors should be trying to use these attributes correctly. I’m guilty of misusing them at times, and I think we can all do better on it. If you really must have your alt attribute popup into view on mouseover, then you should code a Javascript/
CSS solution to do it.
With that out of the way, I’m not sure why this is such a big deal. Browser manufacturers already incorporate a “quirks” mode to emulate
IE’s bad side when it comes to rendering
HTML and
CSS. Why can’t that quirks mode
also emulate
IE’s alt and title behavior? Seems like a perfectly acceptable and simple solution to me.
As for the Firefox extension in question, I think its harm is being a bit over-hyped. Most people are never going to use it because most people don’t install extensions. Those who do probably have the right to see the web however they like. Why would it be okay to have user stylesheets and not okay for a user to choose to see tooltips for alt attributes (particularly when he/she could actually use the user stylesheet feature to emulate a tooltip for alt attributes)?
001 // Elliott Back // 12.20.2004 // 9:07 PM
All the fuss for no reason. First, it’s just an extension—use as you wish. No one is making you break your W3C compliant Firefox, but now you have the choice! Two, it emulates the world’s most popular browser, making it easier to use for people used to IE. Three, Microsoft sets its own standards… and usually the world follows.
002 // Dan Jallits // 12.21.2004 // 8:24 AM
Jeff, I want to say that I take an interest into your insights and am pleased that you offered a history to put context on the situation, which to me seems to be rarer on blogs now adays. However, I saw this article at times as an unjust slam against that big corporate giant, Microsoft. For instance, you made the statement that “They (bothered web authors) incorrectly assumed that Firefox was mistaken, when it is actually IE that is violating the W3C spec.” You then go on to say that, “When Microsoft started pushing Internet Explorer, it emulated much of Netscape’s behavior, since that(‘s) what folks were used to.” According to you Microsoft later responded to the “bothered web authors” and changed the behavior. Granted it was half-assed, but they did meet the public halfway. No information was provided within the post for the defunct Netscape browser. I see Microsoft as being at fault, but I do not feel they should shoulder the blame entirely. This comment is coming from a person who does not agree with much of Microsoft’s business practices or products. Enough about that. I understand the uproar. Imagine if Bill Gates provided the source code to Altair Basic. Imagine if the Internet actually served its intended purpose. I know all these things are a utopian dream, but it is nice to know that there are some purists out there. I am no exception however, as I have violated this alt/title behavior and other more important specs more times than I care to remember. In response to your last paragraph I have this to say. Firefox is the one browser that web standards advocates have some degree of control on. So I can understand their basis for the “uproar”. There is mutual benefit as Firefox promotes web standards and the web standards community promotes Firefox (you know which blogs I am talking about). Firefox is what I design my sites for, before I go and hack the sh*t out of my CSS for IE, or better yet IE5 Mac. If I have been unclear or wrongly defensive on Microsoft’s behalf, I then apologize as I am wrapping up an all nighter and haven’t had that first cup of coffee this morning.
003 // Jeff Croft // 12.21.2004 // 9:27 AM
Dan,
Thanks for your well-worded comments!
While I don’t have much love for Microsoft, I really didn’t intend to bash them in this artcile. I compltetly agree that Microsoft made a solid attempt to “meet the public halfway” on the tooltips issue, and the entire reason I added the history portion of this piece was to highlight that one move. Perhaps I didn’t do a good enough job. While Microsoft didn’t get it exactly right, they did make an effort and they did do logical thing. Most web standards advocate seem to believe that “IE displays alt attributes as tooltips.” This, alone, is not correct. IE displays alt attributes as tooltips if there is no title attribute. I wanted to make sure that was said.
I don’t really feel like Microsoft should shoulder any of the blame for this. Microsoft was doing what seemed best at the time — emulating Netscape, the world’s leading browser. Most of us were happy they did it. Unfortantley, it led to misuse of the attributes, but it’s not really Microsoft’s fault.
I guess this is the main point of my piece, though: Firefox (and many browsers) have a “quirks mode.” What this really is, we all know, is an “IE Emulation Mode.” It emulates many, if not all, of IE 5’s quirks and pecularities. If we already have an IE Emultation Mode, why can’t it emulate IE’s tooltips behavoir, too? Most of us would never know it’s happening, because we code pages with strict DOCTYPEs that use standards mode, not quirks mode. What’s so wrong with that?
And, no need to apologize — it sounds like I wasn’t very clear. Hopefully this clears it up!
004 // Rob Mientjes // 12.21.2004 // 11:01 AM
I’m pretty sure you have seen the ‘bug report’ as well on this. Ignorant people (about 30) reported this as a bug, and now everyone says it should be added because it will help Firefox gain more marketshare.
But how important is marketshare when you keep conforming less and less to the W3 specs? Just copy IE then! Oh wait, there already is one such browser, and we don’t need its copy, as it is not good. Period.
005 // Jeff Croft // 12.21.2004 // 3:33 PM
Rob-
How is providing tooltips in quirks mode “conforming less and less to the W3 specs?”
Firefox already doesn’t conform to the spec in quirks mode. That’s the whole point of quirks mode. It breaks the box model, and otherwise emulates IE5. If this is okay, why is it not okay to display tooltips for alt attributes?
As long as quirks mode emulates IE5, it may as well go the whole nine…
006 // Rob Mientjes // 12.21.2004 // 3:55 PM
Well, if in quirks mode, I can accept some mistakes. But adding new ‘functionality’ is something completely different. I know quirks mode is now heavily debated, especially on this topic, but I just can’t accept that.
007 // Jared // 12.21.2004 // 5:20 PM
How I love a good brouhaha…
Extensions are just that: extensions. This particular one doesn’t even seem to be designed for the Average Joe internet surfer. Then again, my dad is no novice on the internet but I doubt I’d ever find him installing any extensions for any browser. Most people just use their browsers with the settings and features they come with.
So this is an extension for developers, and that’s fine with me. At the end of the day, there are more important battles to fight than stopping someone from decompliantizing (sp?) their Firefox.
008 // Dustin Diaz // 12.21.2004 // 6:25 PM
what about longdesc? Ok ok, I know that has nothing to do with the tooltip, but I thought it might be worthy to throw into the conversation since folks generally don’t know what’s best for what kind of images.
I generally find it a bit excessive when you use longdesc on layout type images (even though layout images should all be background images applied with your style sheet).
What would you put on your logo for instance? alt or longdesc, or both?
Okay drop that whole conversation (that I had by myself).
Jeff, it’s a nice rant (if you want to call it that). I support standards, but something like the tooltip really doesn’t seem bothersome when IE decides to implement a tooltip on an alt attribute and the title is missing.
But I understand…it’s all or none! So away with stupid alt tooltips :p
Onward with standards :)
009 // Dan Jallits // 12.22.2004 // 7:17 AM
I am in total agreement with Jared. This extension is for the web architect, or whatever we are calling ourselves today. I can’t think of another party who would be interested in installing this, except for those junkies that love to install anything and everything. Now I own a Mac and a few PCs which have Linux and Windows loaded on them. So until Microsoft starts charging for IE, I do not need another browser to emulate its half-hearted attempts at rendering web standards. IE is there right from the get go, it doesn’t even require me to download it off the net. After all, why take the chance that some developer incorrectly codes the extension creating a third version of how a site will render. The name of the game is to adhere to web standards. If all the browsers would render the same how much easier would our profession/hobby be. I see it this way, if we as a collective whole were to stop babying Microsoft by using alternate style sheets or CSS hacks Microsoft (and all other non-conformists) would be forced to conform to the standards, because sooner or later more and more web sites will begin to look like garbage, costing Microsoft market share. We saw this with the launch of Firefox 1.0 This is simple economics, we need to demand a better product for our money. We may have forgotten this but the consumer has the power, we control our pocket books. For instance, if we had to purchase Internet Explorer, how many people would take the lesser quality product (ignore Microsoft’s brand name advantage). My money is that Firefox would prevail.
010 // Dan Jallits // 12.22.2004 // 7:23 AM
In regards to paragraph 3. Microsoft could blame the “web arcitech” for doing a poor job, and leave its browser alone. I say this because it seems that Mircosoft has well paid PR or spin doctors working for them. So yes, a tactic like the one I described could blow up in our faces.
011 // Jeff Croft // 12.22.2004 // 8:21 AM
So, the idea of Firefox having tooltips for alt attributes really bothers you guys that much, but all of the other IE emulation that already exists in quirks mode doesn’t?
I just don’t get it. Safari, Firefox, Opera, etc. — they all break away from standards and do things the way that IE does them in quirks mode — why should this be an exception?
012 // Dan Jallits // 12.22.2004 // 11:19 AM
Quirks mode in its entirety sucks, its a bad concept. Why emulate my Web site (which is temporarily offline) looking like crap on a decent browser like Firefox when I can get the real thing with IE. When Windows has 90 plus percent of the desktop market share, I think it is safe to say that most everyone has a copy of IE. Also, I load both browsers simultaneously, this allows me a simple alt-tab combo and a quick punch of the F5 key to see my changes in both browsers. I will be the militant voice once again in regards to your last statement. There needs to be a graphic browser that adheres strictly to Web standards right from the beginning. Right now I say Firefox stands the best chance as the Web design/development community was a huge force in its promotion. Therefore we need to send a loud and clear message to the boys and girls over at the Mozilla Org. Non-compliant third party extensions are always going to be a problem due to the browser being open source. Although I haven’t seen this drastically effect another project, but I could for instance, butcher WordPress and make it non-standard if I so felt inclined (You hear that Matt!).
013 // Jeff Croft // 12.22.2004 // 11:24 AM
Dan-
You are asking users to:
Don’t you think this is a bit much to ask of Joe Average User?
Quirks mode may offend you, but that’s what DOCTYPE switching is for. If you want your site rendered in standards mode, give it the right DOCTYPE.
You can’t honestly tell me you use Firefox to ONLY view fully complinant sites and not those that render in quirks mode, can you?
014 // Dan Jallits // 12.22.2004 // 11:41 AM
The utopia or end goal should be that a user receives a compliant version of the site regardless of their knowing it. It is our job to deliver such a product to our customers that contract us. Granted I am relatively new to the field, but I do feel strongly about this. If we ignore standards, or equally if browser developers ignore them, why bother with a W3C. In regards to points 2 and 3, I was speaking from a designer/developer point of view during the testing phase. The end-user should never have to switch between browsers. They should be using Firefox all the time (he-he).
015 // Jeff Croft // 12.22.2004 // 11:46 AM
I also feel strongly about standards, but I feel even more strong about the user expenience. The fact that non-complaint sites exist and always will mandates a “quirks” mode. There is no alternative. Every major browser has one, as well they should.
Quirks mode doesn’t exist for developers. It’s not for us. It’s for users. It’s there so users can see sites created in 2001 and not updated since as they were intended to be seen.
The militant stance might be to say that those sites that were created before the standards “movement” don’t matter and people should just ignore them because they don’t comply, but that’s also completly unrealistic.
Users need quirks mode. It’s quite a brilliant way of switching between the “old way” and the “new way” 100% transparently. All web users probably owe Tanktek a big “thank you” for creating it when he was on the IE5/Mac team.
To call it a bad concept, I think, is to not understand its purpose.