• Resolved bratkrk

    (@bratkrk)


    I have problem with alt inside WP gallery alt text in source is name of the file like 1.jpg but I set alt with my keywords.

    I DONE:
    -I set up all like media>pictures: title, caption alt text description etc. all with the same text.

    -I turn off all plugins. I try use plugins like SEO Friendly Images. Nothing happend. I

    -try to find in wp catalog [gallery ids=” I found in
    class.wpcom-json-api-update-post-v1-1-endpoint.php
    class.wpcom-json-api-update-post-v1-2-endpoint.php
    comics.php
    admin.js
    I try to change it a little and nothing happend.

    At my site in My site https://www.ideo-klocki.pl/educational-model-of-garbage-incinerator-lego/ In source I got text like this

    <li style="width: 940px; margin-right: 0px; float: left; display: block;" class="flex-active-slide" data-thumb-alt=""><figure><img src="https://www.ideo-klocki.pl/wp-content/uploads/2013/01/1.jpg" alt="1.jpg" /></figure></li>

    I don t know what is wrong I understand that is something with my WP.
    Please try to show me where file that makes gallery is, and how to get out alt text in this specific file.

    • This topic was modified 7 years, 4 months ago by bratkrk.
    • This topic was modified 7 years, 4 months ago by James Huff. Reason: wrapped code in code tags

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator James Huff

    (@macmanx)

    Yeah, that’s definitely not good.

    The alt tag is for screenreaders to read out to a visitor with impaired vision what the image is. In the example you have pasted, “1.jpg” is a terrible alt tag, it’s of no use to any human.

    A better alt tag would be “lego display”.

    Further reading on that for those interested:

    https://www.w3.org/standards/webdesign/accessibility

    https://moz.com/learn/seo/alt-text

    https://oregonstate.edu/accessibility/alttext

    Now, back to the problem. ??

    What plugin are you using to generate that slider, or is it built into your theme (and if so, what is the name of the theme)?

    Thread Starter bratkrk

    (@bratkrk)

    Thanks a lot for answear ??

    I use Swatch theme with flexslider and You are genius ??
    I found it ?? a file is \wp-content\themes\swatch\inc\frontend.php
    it was:
    alt=”‘. basename ( get_attached_file($post->ID) ).'”

    I change it to:
    alt=”‘. $post->post_content.'”

    And its working.

    Thanks ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with alt=”” in photo inside WP Gallery.’ is closed to new replies.