Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Ultimate fade-in slideshow

  1. #1
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate fade-in slideshow

    Hi
    Is there any way of setting alt text for images inserted using the slideshow?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Why do you want to do that?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    http://www.dynamicdrive.com/forums/s...ead.php?t=9401
    If you only have one slideshow, I suggest using my modification. I'll suggest it as a replacement for the UFIS just as soon as I get it object-oriented
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I still want to know why.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks Twey for the suggestion but I have three slideshows running.
    Brothercake.com has several fade options with alt text, but they only activate onclick, and I'm no programmer. But perhaps they might hve something to add.
    JScheuer thanks for your interest but with respect I'm surprised you're asking. As a disabled person myself, I know the importance of making content accessible. That's why I'd prefer to have alt text. But I guess I'll have to do without for the time being.
    Thanks for your feedback.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You wouldn't be so surprised if you had seen many of the recent requests for alt attributes that were really requests for a tooltip. The sort of thing best handled with the title attribute unless one wanted to get real involved about it. I was merely trying to determine if you wanted alt content capability or a sort of mini text popup. Because IE treats the alt attribute as a title attribute in the image tag when no title attribute is present, many people get the two confused. I was trying to determine which you actually wanted.

    That said, it would be relatively easy to add either of those capabilities to this or virtually any slideshow that is powered by a multidimensional array. Simply add another entry to each image's individual array (in this script like so, addition red):

    Code:
    fadeimages[0]=["photo1.jpg", "", "","this could be the alternate text"]
    Then utilize it in the code (adding alternate content for this script, addition red):

    Code:
    fadeshow.prototype.populateslide=function(picobj, picindex){
    var slideHTML=""
    if (this.theimages[picindex][1]!="") //if associated link exists for image
    slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
    slideHTML+='<img src="'+this.postimages[picindex].src+'" alt="'+this.theimages[picindex][3]+'" title="" border="'+this.imageborder+'px">'
    if (this.theimages[picindex][1]!="") //if associated link exists for image
    slideHTML+='</a>'
    picobj.innerHTML=slideHTML
    }
    This of course would require any image not having an alternate attribute specified in its array entry to have an empty entry there in its place, just like images with no links or with no targets in the original.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the explanation. I sometimes findtooltips annoying when it comes to images. They're OK if they're on buttons, but when they obscure my beautiful photos, I find them annoying!
    I've modified the script as you suggested, and I seem to have done it OK as it still runs!
    How thoroughly does this technique work with screen-readers etc? Mine is a physical disability, but I'd like to be sure I've covered those with visual problems.
    What exactly does the amendment do?
    Thanks

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What exactly does the amendment do?
    Simply adds an alt attribute to the images. This is some text that should be conveyed to the user in the event that the user agent cannot display the image; this could be because the requested file doesn't exist, because the image is corrupted, or because the browser is incapable of rendering images: for example, if it is a text-based browser or a screen reader.
    How thoroughly does this technique work with screen-readers etc?
    I'm not entirely sure how a screen-reader would handle the changing of the images. It may read out the alts again when they change, or it may only read them once when the page loads. If there is a way to make the former happen, I think the way this script does it is probably the most likely. You may wish to check the resulting page using Firefox' Fangs screen reader emulator. Not all screen readers will work in exactly the same way, but Fangs' output should be close enough.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks Twey,

    I do understand about alt images (which is why I was keen to have them included) I was more interested in how, technically, the script returns the output to the browser. But I welcome your assurance that this is probably the most effective way.

    Thanks also for the link. I'll get the page online and try it out as soon as I can.

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I do understand about alt images (which is why I was keen to have them included)
    I did wonder
    I was more interested in how, technically, the script returns the output to the browser.
    The script works by editing the inner HTML of the containing element and adding HTML for an image tag to it. The modification merely adds an alt attribute to that tag.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •