WordPress.org

Forums

Lightbox Gallery
Adding ALT tags to the images (6 posts)

  1. dmpp
    Member
    Posted 1 year ago #

    I'm using your plugin - great work on it BTW.

    I need to make sure that it's WCAG compliant, and as such the images used need to have ALT tags added to them.
    That would be for the loading.gif and close.png and anything else. I think there's one in there where src="". That too should have an ALT tag.

    http://wordpress.org/plugins/lightbox-gallery/

  2. dmpp
    Member
    Posted 1 year ago #

    anyone?

  3. noise
    Member
    Posted 1 year ago #

    me too

  4. noise
    Member
    Posted 1 year ago #

    I think the issue is on line 676

    $output .= '><img src="'.$thumbnail_link[0].'" width="'.$thumbnail_link[1].'" height="'.$thumbnail_link[2].'" alt="'.esc_attr($attachment->post_excerpt).'" /></a>
    </'.$icontag.'>';

    Should be more like "'_wp_attachment_image_alt" instead of the post_excerpt

  5. noise
    Member
    Posted 1 year ago #

    Fixed it Just change line 676 from

    alt="'.esc_attr($attachment->post_excerpt).'" />

    to

    alt="'.esc_attr($attachment->_wp_attachment_image_alt).'" />

    good to go

  6. dmpp
    Member
    Posted 1 year ago #

    Thanks - I actually changed over to a different plugin though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Lightbox Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic