• Resolved ulim

    (@ulim)


    I have defined an Alt text and a title for an image. If I use that image on a page or as a featured image in a blog post, then the Alt text is not present and neither is the title. Is this a bug in Blocksy?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello @ulim

    Depending on how you’re trying to insert your images, you might need to edit the page itself as well.

    If you’ve already inserted the images onto the page, the modifications made inside the media gallery will not apply automatically to the existing page — https://ibb.co/gb836g8. So, in this case, you’ll also need to edit the page.

    And as a side note, this isn’t something that we affect from our end, as we have no control over the Gutenberg editor/WP dashboard. This is simply how the WP system works like.

    Hope this helps.

    Thanks.

    Thread Starter ulim

    (@ulim)

    Ok thank you, I have now tried to re-import the image and save the page. The ALT text did appear then, but the HTML syntax was wrong. It said something like:

    <img alt="Object: "Queen Chair"" ...>

    So the double quotes in the ALT text weren’t escaped to &quot; thus rendering the HTML invalid.

    Also, the title of the image did not appear in the title attribute of the img tag. Are those all bugs in WordPress that I should raise there?

    • This reply was modified 2 years, 11 months ago by ulim.

    Hello @ulim

    I’ve just tried this and the ALT text worked correctly when using Gutenberg + Stackable. Could you please get back to me with the editor that you’re using? Perhaps this is coming from their end, but we’d like to check.

    Thanks.

    Thread Starter ulim

    (@ulim)

    I have used the standard Gutenberg editor and the image block to insert my image.

    Theme Author creativethemeshq

    (@creativethemeshq)

    Hello @ulim,
    What do you really mean by “the alt text is not present”?
    As I can see everything works just fine, please see this video – https://d.pr/v/UU0G8I

    Could you please share your website url or record a video so we could better understand your issue?

    Thread Starter ulim

    (@ulim)

    What you did was edit the alt text on the page and then it was updated on the page. But it is not updated in the media library.

    Vice versa, if (what I did) the alt text is edited in the media library, then it won’t show up on the page.

    You wrote in your first statement that this is normal and I need to re-insert the image onto the page in order to get the changes that were made in the media library. So if that is a bug in WordPress / Gutenberg and has nothing to do with Blocksy, then we’re good on that count. I can put this forward with the Gutenberg guys.

    However, there is another issue: try to use double quotes “like this” for some part of the alt text. This will lead to invalid HTML markup, because the alt-attribute is closed too early. My question was simply whether this is also a Gutenberg bug?

    Thread Starter ulim

    (@ulim)

    In fact, this could even be a security issue, because it is an injection attack.

    I could write something like this in the alt text:

    Hello” onclick=”myEvilJavascriptCommand

    • This reply was modified 2 years, 11 months ago by ulim.

    Hello @ulim

    We’ve thoroughly investigated this and all of these issues are actually caused by the Gutenberg editor.

    Even with the default 2021 theme, the quotes are still present inside of the DOM — https://ibb.co/jT4MKyW.

    And yes, the ALT tag not synching still happens with other themes.

    I would recommend posting this on the Gutenberg Github page here — https://github.com/WordPress/gutenberg. You’ll be in direct contact with their developers.

    Thanks.

    Thread Starter ulim

    (@ulim)

    Ok, thanks for checking. Bummer that they don’t escape user input, you might as well ship your WordPress instance directly to Russia.

    I understand your concern @ulim, but believe me, this is completely out of our control. ???♂?

    Let us know if you have any other questions. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Alt Text not working’ is closed to new replies.