EnvironmentalChemistry.com
Environmental, Chemistry & Hazardous Materials News, Careers & Resources

Editor's Blog

Tooltips, Firefox's six year old unpatched bug

By Kenneth Barbalace
[Friday, September 08, 2006]
As any long time Firefox user knows, Firefox has never handled the "TITLE" attribute that is supposed to be displayed in tooltips correctly and crops messages/notes webmasters place in the TITLE attribute after a limited number of characters.

From a web development stance, this is a major issue as the TITLE attribute is supposed to be used to provide additional information about links, images, technical terms, abbreviations, etc. The standard work a rounds to this issue use JavaScript to create a faux tooltips (e.g. article descriptions at Yahoo New). The problem with these work a rounds are that they create unwieldy code and cause accessibility issues.

From a website development standpoint this bug creates a real conundrum; does one use the TITLE attribute as it is designed to be used, or does one use faux tooltips via JavaScript? The former is the proper solution from an accessibility stance for disabled users, but around 10% of users would have problems viewing those notes properly. The latter solution creates accessibility issues for disabled users, and would require kludgy JavaScripts but would ensure that the 10% of users who use Firefox would be able to view those notes properly.

Probably the thing that irks me most about this bug is that the "battle cry" of Firefox developers and fanboys to websites that do not work correctly in Firefox is "fix your code and validate to W3C HTML/CSS specifications." Well you know what? This is a two way street. If web developers are going to be expected to make sure their sites properly implement W3C specifications, then web developers have the right to expect that web browsers like Firefox properly support those same specifications.

The really sad thing about this tooltip bug in Firefox is that it has been known and well documented in Mozilla's Bugzilla (see bugs #45375 and #228673) for over six years (since the days of Mozilla and Seamonkey). How long do we have to wait for a bug that creates as severe of an accessibility/usability issue as this to be fixed? Yes I realize that Firefox/Mozilla is a volunteer driven project, however, it is constantly under development and has become the second most popular web browser. One would think that after six years, however, that a few developers could have set some time aside from developing more glamorous parts of Firefox and fix this very basic usability/accessibility issue.

So in my development of my main site http://EvironmentalChemistry.com what was my solution to my earlier question about whether to use the TITLE attribute as it was intended or use faux tooltips via JavaScript? It wasn't an easy decision to make; however, I have decided to use the TITLE attribute as it was intended regardless of the impact it has on Firefox users. After all, Firefox developers have had over six years to fix the relevant bugs I do not think I should compromise the overall accessibility of my websites simply to work around bugs should have and could have been fixed years ago.

For more on this issue and to see how different browsers fare with their implementation of the TITLE attribute and tooltips see http://Webdevout's article on this and their tooltip test suite

5 comments:

NOTICE: Comments are user generated feedback and do not represent the views and/or opinions of EnvironmentalChemistry.com.

Auros said...

I've been frustrated by the fact that FireFox does not popup the keywords associated with LiveJournal userpics, and just investigated why. Now I know. Six years for something this simple? Really quite sad...

Ken said...

The issue you are talking about is a totaly seperate issue and is the fault of LiveJournal and not Firefox. There are two different HTML attributes that generate tooltips. The attribute I wrote about it the TITLE attribute, which is supposed to provide additional meta data to all users.

The attribute normally used by web applications like LiveJournal is the ALT attribute. Technically speaking the content of the ALT attribute (which stands for "alternative") is ONLY supposed to be rendered when and if the image does not render.

So in the end Firefox is handling the ALT attribute correctly but LiveJournal has implemented it in the wrong fashion. What LiveJournal and other similar applications should be doing is providing both an ALT attribute (for when images do not render) and a TITLE attribute for additional "meta" data.

You will discover that Opera also does not render the alt attribute if the image displays correctly. MSIE's implementation of the ALT attribute (where it displays as a tooltip) is completely wrong based on W3C specifications.

Anonymous said...

7 years now. Flick your lighters people...

Anonymous said...

8 years ....

Ken (EnvironmentalChemistry.com) said...

With Firefox 3.0, this issue is mostly fixed, however, Firefox 3.0 crops the maximum length of tooltips at around 80-100 characters, which isn't ideal.

EnviroChem Logo