Featured image in post, adding alt text or captions?

When creating a new blog post with the Capser theme and a “main image” (not an in-post inage) or thumbnail image. Is it possible to add alt text, and if not, a caption? I’m trying to be 508/WCAG accessibility compliant.

Yes… you can add that easily in ghost.
Example Code :

![Your Alt Text Here] (Your Image Link Here)

Sorry, not in-post. The “main” header image of a post. I’m aware of the markdown code for an imagine within a post.

screenshot_343

Then you want to add your alt tag there. Its coming from the theme header code. So you need to edit with dyanamic alt tag like post title .

1 Like

A caption workaround is to replace the main image with a regular full size image in the post content, that can of course have a caption by using HTML’s figcaption.

This also allows to have a thumbnail instead of the full image in the post settings, using it for post index pages only (and removing it from the post template), which solves the bandwidth and speed problem of full size images used for thumbnails.

You can edit your theme to achieve any sort of alt text you want for featured images, either set statically or pulled dynamically from the title or any of the custom meta fields

2 Likes

I just want to chime in on this and say the solutions presented here aren’t necessarily useful for someone looking to make their site completely ADA compliant.

  1. A static alt tag doesn’t really help if you’re trying to add descriptive text for a specific image.
  2. The title of the post doesn’t actually help for ADA compliance issues since, again, it probably won’t accurately describe the image.
  3. If we’re already using the custom meta fields for their intended use (which we are on my site) then those are out of the picture to repurpose for this.
  4. Replacing the featured image with a regular image in the body content doesn’t help on my blog’s home page where I’m also displaying the featured image along w/ the title and excerpt.

So currently, using while using featured images it’s often not possible to provide a completely screen-reader friendly site.

4 Likes

hello beautiful humans… :rainbow: :hugs:

  • we know the ghost post image uploader doesn’t offer post image alt text
  • and we know there are work-arounds
  • can we know why the image post image uploader doesn’t offer post image alt text
  • is it a technical matter; a decision not to; something other?
  • are there any thoughts about adding alt text support to the ghost image uploader?

Yes You can surely add alt text or caption or both in the featured image. Adding Alt text is really essential for SEO as well

Would love to have this as a core default. I just found a beautiful header image on Unsplash and I would love nothing more than to give proper attribution to the image creator, but it appears the theme we’re using doesn’t have this built-in. I’ll create an issue to our webteam’s queue, but I doubt this will get high enough priority any time soon.

The header image of a blog post is usually the most important. If any image needs alt-text for the sake of proper attribution, it’s this one.

3 Likes

Agreed, this is a massive issue for compliance and simply good publishing. From early testing the ghost team need a couple of traditional publishers on the team to deal with seemingly simple things like this - a very simple ask.

1 Like

Remove the featured image from post.hbs and now you can add to featured image in post settings and add it in your post body with alt text. However, this still leads to double images in the newsletter.

It would be great if we could somehow edit the newsletter template to exclude the featured image. Then, this would be a satisfactory workaround at least.

This functionality doesn’t seem to be too far away. Apparently its implementation wasn’t as simple as one would assume.

2 Likes