• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Reply to: HTML alt text

Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "HTML alt text"

Collapse

  • r0bly0ns
    replied
    On a serious note, it looks like Microsoft are finally getting the message:


    http://blogs.msdn.com/ie/archive/200...s-and-ie8.aspx



    I wonder if this has anything to do with that big fine they got last week..........

    Leave a comment:


  • xoggoth
    replied
    Hey! another of my tedious questions has kicked off an acrimonious IE of Firefox etc debate excellent! I am doing interactives to run in a webbrowser in VB.net but would like to put some samples on line at some time so ways of getting to work on other than IE are relevant. Ta all.

    Leave a comment:


  • r0bly0ns
    replied



    Hook, line and sinker!


    You guys make it too easy sometimes


    Leave a comment:


  • NickFitz
    replied
    Originally posted by r0bly0ns View Post
    Unless a specification says "DO NOT DO THIS", you can't have a go at the developer for doing it!

    <snip>

    I am merley saying that because somebody adds something that is not in the spec, does not mean thay have not adehered to the spec, unless the spec said not to add it.
    Originally posted by Ardesco View Post
    Originally posted by r0bly0ns View Post
    Unless a specification says "DO NOT DO THIS", you can't have a go at the developer for doing it!

    <snip>

    I am merley saying that because somebody adds something that is not in the spec, does not mean thay have not adehered to the spec, unless the spec said not to add it.
    I have a spec here that does not say "Do not force the user to click on a 'Don't Delete' button every five seconds to prevent the database from being wiped." Should I get that feature put in?

    Of course you don't do things that aren't on the spec, if the feature was wanted it would be on the spec, otherwise don't touch it!!!

    What Ardesco said

    And given that the same spec specifically defines a feature that can be used for tooltips (the title attribute), why on earth overload another, separate feature with the same functionality?

    From the above: '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).' Look, MS, there's already a way of doing that, so there's no need to do it again.

    In this case MS have deliberately, and for no apparent reason, repurposed a feature whose defined purpose is explicitly stated in the spec: "...alternate text to serve as content when the element cannot be rendered normally." It doesn't say anything about it serving some further purpose when the content can be rendered normally. Is there supposed to be a list of things that shouldn't be done with it?

    "Should not be rendered as a tooltip."
    "Should not be emailed to everybody in the user's address book."
    "Should not be used to overwrite a random sector of the hard disk."
    "Should not be sent to a sweet factory for display inside a stick of rock."
    "Should not be set as the content of the user's screensaver."
    "Should not be used to replace the user's password."
    "Should not be..."

    Last edited by NickFitz; 28 February 2008, 16:19.

    Leave a comment:


  • Ardesco
    replied
    Originally posted by r0bly0ns View Post
    Unless a specification says "DO NOT DO THIS", you can't have a go at the developer for doing it!



    Now this, I do agree with you on!



    I'm not saying I think Microsoft is right in this, and I am not saying they are wrong.
    I am merley saying that because somebody adds something that is not in the spec, does not mean thay have not adehered to the spec, unless the spec said not to add it.
    I have a spec here that does not say "Do not force the user to click on a 'Don't Delete' button every five seconds to prevent the database from being wiped." Should I get that feature put in?

    Of course you don't do things that aren't on the spec, if the feature was wanted it would be on the spec, otherwise don't touch it!!!

    Leave a comment:


  • r0bly0ns
    replied
    Originally posted by NickFitz View Post
    Nowhere does it say that alt text should be used for tooltips if the title attribute is absent, either - in fact, nothing whatsoever even remotely suggests that it is appropriate to display alt text in a tooltip.
    Unless a specification says "DO NOT DO THIS", you can't have a go at the developer for doing it!

    Originally posted by NickFitz View Post
    Note that IE also fails to adequately display alt text when an image is absent, instead using a Netscape-Navigator-3-style "broken image" icon with maybe a couple of characters of the alt text squeezed in next to it. Proper browsers, on the other hand, even allow you to apply CSS to alt text, so that if (say) the user has disabled images, the alt text can be displayed in an aesthetically satisfactory way.
    Now this, I do agree with you on!



    I'm not saying I think Microsoft is right in this, and I am not saying they are wrong.
    I am merley saying that because somebody adds something that is not in the spec, does not mean thay have not adehered to the spec, unless the spec said not to add it.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by r0bly0ns View Post
    How is it a bug?

    You said yourself that if the title tag is there, IE displays it.

    EDIT:

    Just read the link you posted and nowhere in the specification for alt text does is say that the alt text attribute should not be used as a title if the title is not present.
    Nowhere does it say that alt text should be used for tooltips if the title attribute is absent, either - in fact, nothing whatsoever even remotely suggests that it is appropriate to display alt text in a tooltip.

    As Ardesco points out, this means that if you want to have meaningful alt text (for its intended purpose of providing information to users of assistive technologies) but do not want a tooltip (as it would be redundant and irritating for normal users) then you have to explicitly include an empty title attribute. Every other browser gets this right: only a title attribute with a non-whitespace value will cause a tooltip to appear.

    Note that IE also fails to adequately display alt text when an image is absent, instead using a Netscape-Navigator-3-style "broken image" icon with maybe a couple of characters of the alt text squeezed in next to it. Proper browsers, on the other hand, even allow you to apply CSS to alt text, so that if (say) the user has disabled images, the alt text can be displayed in an aesthetically satisfactory way.

    Originally posted by MrMark View Post
    #4 NickFitz. Many thanks chappy - I'd used the alt and title attributes previously without ever realising the difference. Your post cleared it all up for me. Brilliant!
    NP. It's amazing what you can find out by reading the specs rather than using Microsoft products

    Leave a comment:


  • MrMark
    replied
    thx

    #4 NickFitz. Many thanks chappy - I'd used the alt and title attributes previously without ever realising the difference. Your post cleared it all up for me. Brilliant!

    Leave a comment:


  • 51st State
    replied
    Originally posted by Ardesco View Post
    The point is that Alt is designed to display some text to the user when they cannot load the picture. You may not want to set a tool tip, but IE forces you to have one anyway.

    IE is a pain in the arse bug ridden POS, IE6's amazing rendering of some CSS stuff also leaves a lot to be desired.
    Yeah - bring back Netscape 4.x; now there was a browser that worked

    Leave a comment:


  • Ardesco
    replied
    The point is that Alt is designed to display some text to the user when they cannot load the picture. You may not want to set a tool tip, but IE forces you to have one anyway.

    IE is a pain in the arse bug ridden POS, IE6's amazing rendering of some CSS stuff also leaves a lot to be desired.

    Leave a comment:


  • r0bly0ns
    replied
    How is it a bug?


    You said yourself that if the title tag is there, IE displays it.


    EDIT:

    Just read the link you posted and nowhere in the specification for alt text does is say that the alt text attribute should not be used as a title if the title is not present.
    Last edited by r0bly0ns; 27 February 2008, 21:15.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by r0bly0ns View Post

    Because IE is intelegent enough to detect that you have omitted the title, so will display the alt text as a title as this may be some use to the user.


    HTH

    Because the IE team didn't follow the specifications, produced a buggy implementation, and have ever since refused to correct it because some people who don't know anything about HTML have come to rely on it.

    HTH



    (Oh, and intelligent )

    Leave a comment:


  • r0bly0ns
    replied
    Originally posted by NickFitz View Post
    As other have said, JS is the only way to do large-text tooltips. Use a library like JQuery or YUI to save yourself too much mucking about and get out-of-the-box cross-browser compatibility.

    BTW, the "alt" text is only displayed by IE, and IE is wrong to do so - you should be using the "title" attribute if you want tooltips to appear. The "alt" attribute is only supposed to be shown as a placeholder if the image can't be displayed, or to be (e.g.) read out by assistive technologies such as screen readers used by visually impaired users, whereas the "title" attribute is specifically for the purpose of being displayed in addition to the image (via a tooltip, for example).

    So if you have any situation that relies on a tooltip appearing, use "title" for it or it won't work in Firefox, Opera, Safari, Konqueror, or indeed any other proper browser, as opposed to the appalling heap of bug-ridden rubbish that Microsoft have been forcing on the world.

    Note that IE will (correctly, and in the same way as all other browsers) show the "title" in preference to the "alt" text, if both are present. This means that you can have a short tooltip using "title", while using alt for slightly longer text that would be too much for a tooltip, but is of greater help to assistive technology users; e.g.

    <img src="banana.gif" title="Banana" alt="An anthropomorphised banana dancing from side to side with a gleeful expression on its face">

    will show "Banana" in the tooltip, but a blind user would get a useful description of what they couldn't see.



    Because IE is intelegent enough to detect that you have omitted the title, so will display the alt text as a title as this may be some use to the user.


    HTH
    Last edited by r0bly0ns; 27 February 2008, 20:16. Reason: IE may be smart, but I'm not

    Leave a comment:


  • NickFitz
    replied
    Originally posted by xoggoth View Post
    Can find nowt on net but maybe soemone knows different. Is there any way to enlarge the text specified in the alt tag for an image???

    Ta for any answers.
    As other have said, JS is the only way to do large-text tooltips. Use a library like JQuery or YUI to save yourself too much mucking about and get out-of-the-box cross-browser compatibility.

    BTW, the "alt" text is only displayed by IE, and IE is wrong to do so - you should be using the "title" attribute if you want tooltips to appear. The "alt" attribute is only supposed to be shown as a placeholder if the image can't be displayed, or to be (e.g.) read out by assistive technologies such as screen readers used by visually impaired users, whereas the "title" attribute is specifically for the purpose of being displayed in addition to the image (via a tooltip, for example).

    So if you have any situation that relies on a tooltip appearing, use "title" for it or it won't work in Firefox, Opera, Safari, Konqueror, or indeed any other proper browser, as opposed to the appalling heap of bug-ridden rubbish that Microsoft have been forcing on the world.

    Note that IE will (correctly, and in the same way as all other browsers) show the "title" in preference to the "alt" text, if both are present. This means that you can have a short tooltip using "title", while using alt for slightly longer text that would be too much for a tooltip, but is of greater help to assistive technology users; e.g.

    <img src="banana.gif" title="Banana" alt="An anthropomorphised banana dancing from side to side with a gleeful expression on its face">

    will show "Banana" in the tooltip, but a blind user would get a useful description of what they couldn't see.

    Leave a comment:


  • xoggoth
    replied
    Oh well, it is an interactive in jscript so adding another popup box will be trivial anyway. Cheers!

    Leave a comment:

Working...
X