Results 1 to 5 of 5

Thread: How to add Alt text to the images in the Simple Controls Gallery

  1. #1
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to add Alt text to the images in the Simple Controls Gallery

    1) Script Title: Simple Controls Gallery

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...plegallery.htm

    3) Describe problem: what changes need to be made to the .js file to produce alt text for the images in the simple gallery viewer?
    thanks!
    Colin
    www.hitherandyon.com

  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

    Your images in the gallery already have alt attributes.
    - John
    ________________________

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

  3. #3
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, thanks for replying. The text at the top of the images that appears on hover...yes, I thought that value had been labeled as the alt text for the image in the description of the image viewer. But when I test the page in site analyzer tools they aren't interpreted as alt text.

  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

    Why is that important? Are you primarily concerned with accessibility or SEO? Something else?

    As far as SEO goes, if you Google the alt attributes of the images, your page comes out on top. I haven't checked any other search engines, but Google is the industry standard. If others don't work like it does in this regard now, they probably will soon enough.

    On the accessibility front, those with screen readers or images disabled should be able to respectively hear or see the alt attributes IF they have javascript enabled (this is similar to a 'normal' user who will not see the slideshow if javascript is turned off). To accommodate them and other non-javascript users you could put your slideshow images in a noscript tag as regular image tags with alt attributes. You could even include the descriptions as ordinary text and/or links in the noscript element. This will help all non-javascript users, not just those who are differently abled or who have images turned off.

    In any event the images have alt attributes, any decent DOM inspector shows that they do. And I see that you've modified the script to use the image descriptions as alt attributes.

    BTW, the alt attribute is NOT intended as a hover description. That's the purpose of the title attribute. IE less than 8 will use the alt attribute like a title attribute if there is no title attribute. This is non-standard behavior, corrected in later versions. All other browsers follow the standard here. If desired, empty title attributes may be given to images to prevent IE 7 and less from displaying the alt attribute as a title attribute. Likewise, the alt attribute may be duplicated as the title attribute to allow standards compliant browsers to display them as hover descriptions. One may also use different alt and title attributes.
    Last edited by jscheuer1; 11-09-2011 at 12:20 AM. Reason: usage
    - John
    ________________________

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

  5. #5
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you!

    Got it, thanks for all the input
    Aloha

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
  •