pages-cms icon indicating copy to clipboard operation
pages-cms copied to clipboard

Support for image alt text

Open gvjacob opened this issue 7 months ago • 4 comments

I'm using Pages CMS for a small scale website (~4 page templates total), and it's been effective for the size. An issue I'm encountering is the lack of native alt text support for images. Support for alt text should be a crucial feature for any CMS. I understand that this is taken care of for images in a rich text field, but support for general media would be great!

Is there native support for alt text that I might've missed? If not, are there plans to implement this? In the meantime, are there workarounds you would recommend?

The workaround I had considered is to create a collection for media that accepts image upload and an alternative text. While this gets to a solution, it loses the more intuitive media picker UI that comes with a media field.

Image

Thank you for the great work on this CMS! Appreciate any help here.

gvjacob avatar May 27 '25 18:05 gvjacob

Didn't think of that. Maybe I should add an option allowing you to maintain alt values. I'll add that to the backlog.

hunvreus avatar May 29 '25 01:05 hunvreus

@hunvreus appreciate it! I also understand that Pages CMS wants to follow whatever way developers scaffold their content schemas, which is great for flexibility. But FWIW, for a critical feature/best practice that every website should follow, I don't have issues with the CMS dictating the solution. Of course, if we can make this completely customizable, that's an even bigger win.

gvjacob avatar May 29 '25 01:05 gvjacob

I would like to see a native alt text support as well.

In the meantime i created a simple component for this usecase:

components:
  alt-image:
    label: Image with ALT text
    type: object
    fields:
      - name: src
        label: Image
        type: image
      - name: alt
        label: ALT text
        type: string

jomaway avatar Jun 16 '25 22:06 jomaway

Yeah, it's definitely something we can add.

Glad to see users using the components :)

hunvreus avatar Jun 16 '25 23:06 hunvreus