alt
as a tooltipFrom Internet Explorer Programming Bugs. Dave Massy: It’s not exactly clear to me from any of the links that Internet Explorer is not handling to the specification. Maybe I missed it but is there anything in the W3C Recommendation that says that tooltips type display of the text is not an acceptable use of the
Maybe someone should make it clear that this is a bug. Oh yes.
alt
attribute? I think it’s an interesting point but often having the tooltip can be a useful addition especially when the image is a hyperlink. Maybe it could be made an optional thing if people find it annoying rather than helpful.
When the image is a hyperlink... the hyperlink should have a TITLE attribute — and there we have the beloved tooltip.
I don't think it's bad that IE shows the ALT text in a tooltip. What's bad is that developers count on browsers to do this.
Like you said, it's for alternate text. If IE is nice enough to give easy access to that alternate text for people that think "what the heck is that picture supposed to mean?", then that's cool.
If developers are incompetent enough to put anything other than alternate text in the alt attribute, and then complain that their "mission-critical" text isn't accessable in certain browsers, then that's their problem.
It is alternative text rather than supportive text offering advisory information, while the image is visible and I still stand by: /2004/12/alt-attribute#comment-2803
Exactly, as long as the alternate text contains the exact same information as the image (which is up to developers), there is no reason to hide the alternate text from a user once the user requests it.
Just think of it as IE turning off display of the image (and showing the alt text as it normally would), only nicer.
Again, this is a developer problem. Not a browser problem.
Most alt
attributes should be empty because they’re merely illustratory. Displaying alt
as a tooltip does not encourage this. It’s fine to make this information accessible to users with images enabled; Firefox allows this via the Properties dialogue available from the context menu of an image. It’s not fine to treat alt
in any way that suggests it is a caption, because it’s not; title
is.
Unfortunately, this is going to be a problem for a long, long time. The W3C makes no recommendations about how a browser should display things in their specs. No where is it explicitly said, for example, that a paragraph should, by default, have "margin: 1em 0". But we assume it does -- because it does is most browsers. But if the IE team wants to make it 2ems of top and bottom margin, there's nothing in the spec stopping them. Obviously that's a simple example -- but you see my point.
The W3C needs to make recommendations about how different type of user agents on different types of devices ought to render things (particularly when unstyled by a stylesheet).
Jeff, yeah, I hope the rendering part of HTML 5 will cover that to some extend. It is a difficult issue though. User agents should be allowed to do exactly what you say, p { margin:2em 0 }
.
Try to get 500 million downloads in a month, which obviously isn't going to work and they damn well know it.
That's just plain stupid argument.
What about standards? Not those standards that are forced by someone - but by standards that has evolved in process of using browsers. Yes, even Netscape supported atl
attribute on images as a tooltip.
Breaking people expectations is not what I call the correct way to handle task. That's the exact reason, there are over 500 comments asking Firefox team to implement this alt
tooltip behaviour. That's the exact reason, why there is popup alt
extension available that could have been downloaded million times. (but what does that say anyway)
You are blindly following everything W3C says, well that's your issue. For other people that think about historical usage and usability that comes with it, alt
tooltips behaviour is the correct one. Unfortunately, you are clearly unable to grasp that.
I am also unable to grasp why people are using tables for layout, the famous font
element and various other things that I consider to be wrong. Yet, from an historical perspective these things seem to be “good.”
Opera 8.51 shows both Title and Address in the tooltip. Personally, I'd like it to go a step further and also show Alt. Tooltips have room to grow.
Anne: you are demagogical and I believe we can discuss this in the rational fashion.
Usability means that since the billions of websites are using ALT as a tooltip, we will provide tooltip feature for people in the browser. Forgert about standards, schmandards. This is about backward compatible approach that allows to use websites easier for millions of people browsing every day.
Standards are good way to be make usable webpages, so don't spoil it by saying that not showing ALT on image hover is good thing. Anyway, what's the point of text duplication in ALT/TITLE attributes
Until there are browsers, that are able to display both ALT/TITLE/LONGDESC attributes on hover in one go (maybe coloured differently), the best way to go is to keep ALT visible.
If alt
continues to be displayed as a tooltip it will continue to be useless as an alt text. Maybe HTML5 should introduce a real-alt
attribute so people can continue to abuse HTML4 in peace.
A |real-alt
| attribute? Are you joking?!? The HTML 4.01 spec specifically says that the |alt
| attribute is to be used to "let authors specify alternate text to serve as content when the element cannot be rendered normally". The very term "alternate" precludes simultaneous use.
At the same time, we have the HTML 4.01 spec telling us that |title
| can be used for tooltips:
Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip" (a short message that appears when the pointing device pauses over an object).
Clearly, we already have an attribute for alternate text and an attribute for tooltips. We have browsers that implement the |alt
| attribute according to the specification. Internet Explorer 6.0 actually overrides the |alt
| tooltip behavior if |title
| is defined, even if it's |title=""
|. And yet people seem to think that, instead of IE simply dropping support for |alt
| tooltips (which would probably be trivial for them to do), the specification should be changed and every other browser in the Known Universe should add support for it. You even have people suggesting that we add a new attribute to serve as the "real" alternate text!
I, for one, have no intention of endorsing an erroneous use of an attribute, especially when similar effects can be accomplished via CSS3. Using |alt
| as a tooltip is nothing more than IE-specific markup. As for |real-alt
|, it's just going to go unused because people who currently use |alt
| as a tooltip instead of |title
| will be to lazy to figure out what it's for.
Blindly following standards, are you?
What about ALT attribute in HTML 3.0? Was there any TITLE attribute for images then?
What about usability? Well, I shouldn't ask, it is rather clear you don't understand the basic concept behind it. Backward compatiblity? Does that say anything to you?
Exactly dusoft - alt, when it it was invented, was clearly meant in the way it is now. It's far, far simpeler to change the specs. Title should still override alt though, as a tooltip.
And voila, problem solved!
Maybe I should have used <sarcasm>
tags for the real-alt
bit.
dusoft: neither did CSS exist when HTML 3.0 was written. But surely everyone who argues in favour of the standard in a particular instance automatically follows it blindly! Drop the straw men.
There is a real accessibility detriment to alt
abuse. It’s not some obsure detail that they bicker about in the semantic ivory tower.
I only saw title
s on images start to appear after Firefox popularity picked up. Guess what will happen if IE stops doing it wrong? Right, everyone will fix their sites. We had that when the transition to 6.0’s more conformant CSS interpretation broke some sites – they were fixed in a hurry. Malformed XHTML being served as text/html
? They “work,” so they never get fixed.
If you want alt
to end up in the never fixed bucket, that’s your call.
was clearly meant in the way it is now
If it was clearly so, we wouldn’t be having this discussion nor would title
have been defined with its designated semantics.
I agree with the stance Mozilla makes over there being no requirement to display a tool-tip. Of course there's no requirement - the requirements of how the alt
attribute are used are clear.
However, the reasoning is totally bogus. To say it's a bug to display the alt
as a tool-tip is utterly spurious. Browser makers should be free to add value wherever they see fit, or not, as they see fit. HTML authors need to grow the F up, respect their trade and use the attribute according to the spec. Otherwise it's like saying we should get rid of stop signs at traffic junctions to prevent the common offence of failing to stop.
Well, don't get me wrong, I am pretty well known for spreading web standards in Slovakia, but blindly following specs is not what I expect from rational beings. Anne unfortunately failed in this case.
Here's what the HTML 3 spec says:
ALT (Alternate text)
Optional alternative text as an alternative to the graphics for display in text-only environments.
The HTML 3.2 spec is a little more vague, but the meaning is similar:
alt [...] -- for display in place of image --
[...]
This is used to provide a text description of the image and is vital for interoperability with speech-based and text only user agents.
In both cases, it is clear that the text is meant to be used "in place of" an image in a context where the image cannot be displayed.
But how is it a bug to display |alt| as a tooltip? Well, technically it's not. User agents can provide functionality in addition to what is in the specification so long as the specification itself doesn't prohibit it. However, allowing |alt| as a tooltip encourages people to place text in |alt| that is not suitable as alternate text for the image. Many years ago, I myself was guilty of putting text in |alt| that said stuff like "I rendered this in POV-Ray" and other stuff that clearly wouldn't be acceptable as alternate text.
Now that we have the |title| attribute, using |alt| for tooltips only slows it's adoption and continues the abuse of |alt|. Aristotle has the right idea. Unless we jettison the |alt| tooltips, both |alt| and |title| will suffer.
Now that we have the |title| attribute, using |alt| for tooltips only slows it's adoption and continues the abuse of |alt|.
Agreed.
Unless we jettison the |alt| tooltips, both |alt| and |title| will suffer.
Why must it be either/or? Can't we keep the display of |alt| tooltips (when no |title| value exists, or possibly in addition to the |title| value) without using |alt| for tooltips? This should 'simply' be a matter of educating professional web developers to use HTML the way it was designed, not the way it makes the browser behave.
There's a greasemonkey script which lets you see the alt
attribute in a tooltip, if nothing has been set for the title
attribute, that is.
Good for pages made by IE-raised authors. Bad for displaying alt
even when title=""
has been entered.
You get the image or the alt
, but not both. It isn't open to interpretation.
You get the image or the
alt
, but not both. It isn't open to interpretation.
Joe - that's interesting. Where does the recommendation specify "not both"? I can't find that bit. All I read is that the alt
must be used when the image cannot be rendered, for whatever reason. (I'm not saying you're wrong, but I just can't find reference to that claim).
My personal take on it is that as long as the browser meets the basic requirement of using the alt
when the image can't be displayed, there's no harm in also making the alt
available when the image can be displayed. If they think it adds value, then fine.
That's how browsers should remain competitive and differentiate themselves. Adhere to the recommendations and then add value with enhancements as they see fit.
However, if you can point out how making the alt
text available as well as rendering the image is actively harmful, I'm sure we'd all be interested to learn. It's certainly an area where you know more than I.
It is harmful as it advocates to use tooltip text inside alt
instead of alternate content. Why is that so hard to get?
It is harmful as it advocates to use tooltip text inside alt instead of alternate content. Why is that so hard to get?
By that logic, all forms of error-correction by the browser are harmful, as they encourage authors to violate the Specification.
Why is crappy alt
text more harmful than mis-nested elements (or whatever)?
Where does the recommendation specify
not both?
Are we looking for logics? Or something to «blindly follow»? If the latter, W3C needs to add the words «noth both». But logically, that alt
is a text alternative for the image, implicitely means «not both».
That said, who decides who needs an text alternative for the image? So per se, nothing wrong with «both». But as a rule for everyone: We should admit that this is not what the specs say.
Myself, I don't want a browser to show the address as a tooltip either.
Can't we keep the display of |alt| tooltips (when no |title| value exists, or possibly in addition to the |title| value) without using |alt| for tooltips?
Because people are lazy and will be as sloppy as you let them. If alt
shows up in a tooltip, designers will conclude that since alt
shows up in all contexts, there is no need to fill the markup with redundant title
attributes. And I can’t fault them for the thought, wrong as it may be: things should be designed so that doing the simplest thing that can possibly work does not yield bad results.
I have no beef with doing what Firefox does: you can read the alternative text if you bring up the properties window for the image in question.
Or if you want, make the tooltip content configurable, so the user can enable alt
display in a tooltip – but have the option disabled by default, so that designers must consider the case where this is not enabled. (The question is whether it is good UI-economic sense to make this a preference – “preferences have a cost” etc.)
By that logic, all forms of error-correction by the browser are harmful, as they encourage authors to violate the Specification.
Hehe. I am pro-draconian, so this resonates with me.
But I can envision Anne’s argument: that the problem is that the Specification does not define error correction, but should, so that even when correction needs to happen, everything can still be in accordance with the Specification.
But I can envision Anne’s argument: that the problem is that the Specification does not define error correction, but should, so that even when correction needs to happen, everything can still be in accordance with the Specification.
The HTML Specification doesn't define error correction for anything else either. So that's hardly an argument for complaining about this instance of browsers aiding and abetting bad markup.
My sense is that I'm perfectly OK with a browser exposing alt
text to the user. But only if that's done in a way visibly distinct from the way it exposes title
text. If I didn't add a title
attribute to an <img>
, there was probably a reason, and I'm not happy if the browser pretends that I did (by displaying the mandatory alt
text instead).
As long as it can't be mistaken for title
text (Firefox's method certainly fits this description), I have no problem with the browser exposing alt
text to the user.
Actually, if the next version of Internet Explorer simply put something like "Alternate Text: " before the contents of |alt| in the tooltip, I might be able to live with that. Think of it this way:
<img src="Slinky.png" alt="My cat Slinky">
The tooltip for the above would read "Alternate Text: My cat Slinky". This solves two problems. First, it allows people to see the contents of |alt| in the way they're accustomed to. They just hover the mouse. At the same time, web authors would be highly annoyed by the "Alternate Text:" bit and start use |title| instead. Those who keep using |alt| for tooltips would quickly be labelled as clueless or inexperienced.
So, is this a viable solution?
Mozilla Web Author FAQ: Why doesn’t Mozilla display my alt
tooltips?
But only if that's done in a way visibly distinct from the way it exposes
title
text. If I didn't add atitle
attribute to an<img>
, there was probably a reason
Fully agree.
<img src="Slinky.png" alt="My cat Slinky">
That is an awful choice of alt
content. It should go in title
. What does “My cat Slinky” help someone who can’t see the picture? A proper alternative text for such a photo might be something like “Slinky, my cat, is always hungry” – ie. a textual stand-in for what the picture conveys.
Or, as another example, for a website traffic graph, “the traffic on my site from August through December” would be a likely but useless alt
value that belongs into the title
instead. A proper alternative text would be something like “A graph of my website traffic from August through December shows an average 500 visitors per day with a mild upward trend; you can also see a sharp spike upward or 60,000 visitors per day when I was Slashdotted in mid-November.”
Obviously, almost noone is going to go to the extraordinary pain and effort required to provide such high-quality alts, all the time. Doubtless, if the image is not absolutely vital to understanding of the surrounding context, it is better to invest this effort on other parts of the site/article. Hence the rule that most images should simply have a empty alt
– which tooltip display is just going to discourage.
I support the notion that ALT should be displayed with TITLE as well. There is no such thing as implicit meaning in the text you quoted. Specifications are not something to follow blindly (for how many times I need to repeat this), but to think about it while following.
If browsing with ALT text displayed is more usable (and sometimes even more accessible), then this is YES feature.
Of course, TITLE could precede ALT as well as LONGDESC could precede TITLE. But let the browser makers decide about this.
If Opera wants to display URL as a tooltip and users of Opera are alright with that, is that a bug, because no such thing is in specification??? Yeah, maybe if Anne would not be Opera-positive, he would say that is bug.
I support the notion that ALT should be displayed with TITLE as well.
I will say it one more time, and then shut up.
If I have two <img>
s, one with both alt
and title
attributes, and one with just an alt
attribute, do not (I repeat, do not!) display the alt
text for the latter in a fashion visually indistinguishable from the title
text of the former.
I don't care if you decide to expose alt
text to the user. But please make it distinguishable from the title
text that I intended to be displayed as a tooltip. Change the background colour, put the phrase Alt:
in front of it, do something to ensure that the user will never confuse it with title
text, intended as a tooltip.
Specifications are not something to follow blindly (for how many times I need to repeat this), but to think about it while following.
Fallacious. Having thought about the spec does not preclude agreeing with it, and likewise following the spec does not preclude having thought about it.
Did I mention that, following consideration, I don’t see a problem with optional tooltip display of alt
, as long as it is not the default? Neither do I have a problem with the Firefox extension that provides this functionality.
But it’s obviously convenient to denigrate everyone who disagrees with you as blind followers, instead of considering their arguments.
If alt shows up in a tooltip, designers will conclude that since alt shows up in all contexts, there is no need to fill the markup with redundant title attributes.
Sure, and there are enough times when an alt text may double as good title text, so in that case it is redundant.
Also, say that only title is displayed as tooltip in all browsers. What do you think will happen?
From what I've seen over the years, the lazy majority will only add title attributes and simply skip or forget the alt attribute. That'd be an even worse situation for accessibility, wouldn't it?
Aristotle:
I wasn't intending the |alt| contents in the example to be semantic. I was simply giving an example of what to do with the |alt| contents. The string could have been "klasdlhfksadjh@#$$" for all I cared. If I were really writing serious alternate text, I would probably have something like this: "My black Legless Cat, Slinky, sleeps in a serpentine coil on my coach, his body wrapped around a mouse-like cat toy."
James:
The only situation where it is useful to have |alt| double as a tooltip is when you both need a tooltip and it is semantically acceptable to have identical tooltip and alternate text. That just doesn't happen enough to justify using |alt| as a tooltip.
Far more common are situations where you're using an image to display text in a specific font and with specific graphical enhancements added. In that situation, you'd want |alt| to be the same as the text in the image, and you'd want the tooltip not to show up at all. However, to do that in Internet Explorer, you'd be forced to define |title| which is redundant. So the way I see it, having |alt| as a tooltip causes as many redundancy problems as it solves.
Also more common is the outright abuse of |alt|. I'd much rather have everyone using |title| for tooltip-specific text and have people not using |alt| at all than have people putting tooltip text in a place where it doesn't belong. If people aren't serious about real alternate content, |alt| tooltips aren't going to improve the situation. They're simply going to confuse people.
Matthew: fully agree.
Fallacious. Having thought about the spec does not preclude agreeing with it, and likewise following the spec does not preclude having thought about it.
What about following the spec, but thinking about it and seeing the weak points? No such case for you?
Did I mention that, following consideration, I don’t see a problem with optional tooltip display of alt, as long as it is not the default?
Well, that's just exactly what I said. If there is no title, display ALT as tooltip, if there is title only, display TITLE as tooltip, if there are both, display TITLE at top and then maybe ALT at the bottom with "Alternative text:" prefix or whatever.
But we have moved from the topic, which is that displaying alt
as tooltip (even when no title
available) is buggy.
That's wrong notion. Is Opera buggy because it display URL tooltip on links hovering? Yes, specification doesn't say URL should be displayed, then it is buggy (note, this is exactly Anne's reasoning, not mine).
For what it is worth, that is not my reasoning. Could you please stop saying that and other clueless things? Given that you advocate web standards and such, could you also please quote people using the q
or blockquote
elements instead of abusing the em
element? Thanks. That is not to say that showing the IRI as a tooltip does not cause us problems by the way. It is only a very different problem and not related at all to showing alternative text as if it was additional information.
(The comment regarding used markup might at some point in time make no sense to the weird stranger reading this thread this far down as I tend to modify comments with markup abuse.)
Given that you advocate web standards and such, could you also please quote people using the
q
orblockquote
elements instead of abusing theem
element? Thanks.
Given that you advocate web standards and such, could you also please quote people using the q or blockquote elements instead of abusing the em element?
Of course, I can. But that's not the problem we have been talking about
HOWTO Spot a Wannabe Web Standards Advocate
Ha Ha! It's easy to use these pseudo arguments, when you don't have anything to say. Ha Ha!
The HTML spec is pretty vague on the whole thing, which is a problem. In the last decade there has been quite a lot of thinking about it, and there are some obvious assumptions that get taken as received wisdom. title
is not a tooltip. alt
isn't either. They are supplementary information (metadata, if you will) about things in a page, with slightly different purposes.
It should be up to developers to decide how to present them, and up to users to decide which implementation is brain-dead and which makes sense to them. Of course this is based on the myth that you can chooose a system for a single feature - in the real world most people have to fight hard to choose a secure, usable, reliable solution over an insecure and brain-dead nightmare, if they happen to have a different idea to their sysadmin about how to define those terms.
I think it is helpful to present alt
and title
as optional information in a tooltip. In my personal experience, I don't usually care about the title, but I would often like to know just what the designer thought the image actually meant - especially navigation icons which are very often pretty cryptic to me. I want to be able to choose. But that's just me.
Well, that's just exactly what I said. If there is no title, display ALT as tooltip, if there is title only, display TITLE as tooltip, if there are both, display TITLE at top and then maybe ALT at the bottom with "Alternative text:" prefix or whatever.
This is actually worse than what IE does. First of all, there's no reason to have "Alternate text:" in on context and not the other. This is actually more confusing to the user because you can't tell the difference between an <img> element that has only an |alt| attribute and one that has only a |title| attribute. Furthermore, if you actually have a |title| attribute, you're probably using a semantically correct |alt| attribute anyways, so you don't need it in the tooltip because you're already displaying the image. If you really need a semantic |alt| tooltip to let people know what the image is, you probably have an image that's so aweful that using text instead would be preferrable.
Let's make something clear. There is no reason to have true alternate text for an image in a tooltip. Ever! The only reason I was willing to compromise and have |alt| in an tooltip that is visually distinct from a standard tooltip is because of the number of pages out there that use |alt| as if it were |title|. Even then, I was saying that I could live with it, not that I preferred it. Displaying the |alt| attribute as if it were a standard tooltip for the platform is totally unacceptable.
Ha Ha! It's easy to use these pseudo arguments, when you don't have anything to say. Ha Ha!
When there’s no interest in a constructive argument, eventually one stops trying.
When there’s no interest in a constructive argument, eventually one stops trying.
Well, I was trying to be constructive proposing potential solutions. But being attacked just because you don't agree with me, well what to say? The most constructive thing you and Anne did was to point that I was using <em> instead of <blockquote>. Was that on topic?
There’s still no point trying.
It's no doubt that the problem in reality lies within the web development community and not within Internet Explorer's rendering of the alt
attribute. But there are several reasons why Internet Explorer's implementation should be considered wrong:
alt
attribute for tooltips. If Internet Explorer shows a tooltip for alt
, why shouldn't web developers use it that way? If you think you have the answer, please move on to point 3.
alt
attribute use wording that in no way would give an impression that it should be displayed simultaneously with the image. It's for alternative content and should be displayed only when the image isn't there. Here's a simple algorithm for you, if plain english is too complicated to comprehend:
if images_are_supported
show image
else
show alt
It is cructial that alt text is displayed in some manner by browsers and via tooltip seems logical.
If we all agree that
then how is a person with low vision such as myself support to access the alternative text for images?
What you are saying is that in order for a low vision user to have access the image meaning is to turn off images or to use a screen reader. These requirement are not acceptable. Turning off images actually make pages more difficult to read because images are used to call attention to section of the page and are used to add space and color to the page. In addition, requiring the use of a screen reader is also not acceptable.
Alternative mean an alternative for someone who can't see or process the image -- low vision, colorblind, or cognitively imapired users may not be able to see or distinguish the image and thus determine the image's purpose without alternative text. Thus, having access to alternative text is absolutely critical.
Jonathans comment - This is the first logical argument for displaying the alternative text in a tooltip i read here.
But a tooltip for alternative text for someone with low vision is absolutely no help when it is displayed in the tiny font it normaly is. And i know no browser which let the user modify the tooltip font-size.
And I feel sorry for Anne to have to argue with such kind of persons like here. Nothing makes me more angry than people putting words in my mouth