Site logo

Archived topic

Image alt-texts missing

7 replies · Started by Torsten on August 28, 2021

Viewing posts 1–8 of 8

Hello,

something very strange seems to be happening on my site with the metadata for images that might somehow be related to GP.

In the media, all images have alt-text defined.

In the frontend (and in the page source) they don't show up.

When I inspect the image in Firefox there is no alt-text associated with it.

When I view the page source, no alt text appears either.

I get the same result in Chrome etc..

Rank Math also says that there are no alt texts.

What is the cause of this and how can it be fixed?

Best regards

Torsten

Hi there,

GP doesn't really interfere with the image functions used in the post content. It would kind of suggest another plugin or function is at play that is changing the core WP behaviour.

Can you share a link to a post where i can see an image this missing its ALT tag ?

Hello David,

It is on both existing sides (Home and Impressions). I have already given you access with my previous question.

Best regards

Torsten

Looking at your home page, the only images i see are:

1. SVG icons, which don't have alt tags.
2. Background Images on Container Blocks. Background images are added using CSS, they are not output as an <img> which is required if you need the alt tag.

You may want to replace the 'gallery' layout of containers with a Gallery Block which will output <img> HTML which will have the alt tags.

Hello David,

I switched to the Gallery Block. Only the alt-texts still do not appear!

???

Best regards

Torsten

As David mentioned, the theme itself doesn't control this.

Can you activate a Twenty series WP theme and see if the same issue exists there?

If so please check with WordPress' support team.

Thanks!

Hello Leo,

I have found the problem and I am sharing the solution with everyone:

The alt-texts must first be added to the image(s) before creating the Gallery Block.

If you do this later, the alt-texts are not included in the gallery.

Add alt-texts to Gallery Block images easily by using the Media Library.

1⃣ Click Media Library button
2⃣ Click Edit Gallery
3⃣ Select an image
4⃣ Add the alt-text

Best regards

Torsten

Glad to hear.

This archived topic is closed to new replies.