• Resolved Hozefa Saleh

    (@hozefasmile)


    Testing Environment
    Wordpress Version: 5.8-beta1
    HTTPS -> Yes
    Multisite -> No
    Active Theme – WordPress default – Twenty Twenty-One
    Plugins activated -> Gutenberg 10.8.0 , WordPress Beta Tester 3.1.0
    Server -> Linux Apache
    PHP Version -> 7.3.20
    Database -> mysqli 5.6.38

    Issue related to wordpress default image block.
    Steps to recreate the error -> 1. Insert an image to a page using image block
    2. Write a alt text for that image in block setting panel
    3. Check frontend code and you will see the alt text is showing.
    4. Now remove the alt text from image block settings
    5. Go to media library and add alt text for that particular image
    6. Check front end again and you will see no alt text added for the image.
    7. Now again insert that image using image block directly from media library
    8. You will see that alt text is working in the frontend.

    So if we apply alt text in media library beforehand we insert it in the page, then the alt text is working.
    But if we insert image beforehand and then later on apply alt text in media library, it not work for the image already inserted.

    Thanks
    Hozefa

Viewing 6 replies - 1 through 6 (of 6 total)
  • But if we insert image beforehand and then later on apply alt text in media library, it not work for the image already inserted.

    I don’t know if this the intended behaviour or not, but I personally see this as a “feature”, and not a bug ??

    If an image in the media library has alt text, it will be used when inserting the image in the block editor — but only at the time of insertion. Removing or changing the alt text from the media library does not affect what has already been inserted in the editor.

    The fact that the alt text in the block editor is not intrinsically linked to the image allows re-using the same image in different contexts with different alt text! And I consider that a useful feature, and not a bug.

    Thread Starter Hozefa Saleh

    (@hozefasmile)

    Hi George,

    You have to look it in different perspective.

    The image block already provide alt text input field in its block settings. And that alt text override the alt text provided in media library. So if someone planning to keep alt text not connected with what value provided in media library, he has use this feature instead.

    Now look at this scenario:-
    Some one initially inserted images (for example company logos) in various post. At that time he not provided alt text beforehand in media library for those images. Now later on he want to add alt text. the only option he has to go to each blog post and check for that image and then put alt text in block setting of that image. If he directly go to media library and put a universal alt text their for that image, it will not going to work for all those post where he has added that company logo image. And now finding and updating each image alt text is a very time consuming process.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    This is not a ‘new’ issue and is working as expected. Your scenario is valid, but it’s also something that is plugin territory ??

    Thread Starter Hozefa Saleh

    (@hozefasmile)

    Do anybody know if there is a plugin available to resolve this issue ?

    Hi, did you find a plugin to help with this situation? Agree, definitely not a feature!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You would search for something like “Update alt tags for all uses of an image +Wordpress”

    https://www.ads-software.com/plugins/update-alt-attribute/ comes to mind.

    Since this is no longer a big report about a new version of WP (and in fact has been this way since the dawn of time) I’m closing this post.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bug – Media Library Alt text for image not working’ is closed to new replies.