Skip to content

[KIAW-1468] Provide alt text for images in posts and articles #673

Draft
xovnsi wants to merge 3 commits intomasterfrom
malgorzata/kiaw-1468-provide-alt-text-for-images
Draft

[KIAW-1468] Provide alt text for images in posts and articles #673
xovnsi wants to merge 3 commits intomasterfrom
malgorzata/kiaw-1468-provide-alt-text-for-images

Conversation

@xovnsi
Copy link
Contributor

@xovnsi xovnsi commented Sep 15, 2025

Description

Improve accessibility by adding alt text to images in posts and articles if it's not already provided.
Alt text is based on the image's position within the content (e.g., "Image 3 in article")

Screenshots

image image

Checklist

  • 📗 all commit messages follow the conventional commits standard
  • ⬅️ changes are compatible with RTL direction
  • ♿ Changes to the UI are tested for accessibility and compliant with WCAG 2.1.
  • 📝 changes are tested in Chrome, Firefox, Safari and Edge
  • 📱 changes are responsive and tested in mobile
  • 👍 PR is approved by @zendesk/vikings

@xovnsi xovnsi force-pushed the malgorzata/kiaw-1468-provide-alt-text-for-images branch from 780a249 to 7643ba8 Compare September 15, 2025 13:56
@xovnsi xovnsi changed the base branch from master to malgorzata/kiaw-1466-list-structure September 15, 2025 13:56
@xovnsi xovnsi force-pushed the malgorzata/kiaw-1468-provide-alt-text-for-images branch from 7643ba8 to 2ba49e7 Compare September 15, 2025 14:02
@xovnsi xovnsi marked this pull request as ready for review September 15, 2025 14:12
@xovnsi xovnsi requested a review from a team as a code owner September 15, 2025 14:12
Copy link
Contributor

@luis-almeida luis-almeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is regenerated.
Please add these changes to the source files within src

Improve accessibility by adding alt text to images in posts and articles if it's not already provided.

So our editors ever add these alt texts? If not, should we fix those first?

@xovnsi
Copy link
Contributor Author

xovnsi commented Sep 17, 2025

This file is regenerated. Please add these changes to the source files within src

Improve accessibility by adding alt text to images in posts and articles if it's not already provided.

So our editors ever add these alt texts? If not, should we fix those first?
@luis-almeida Yes, it adds it sometimes. In the new article editor, you have the option to add alt text manually. In the old editor, some images may already have alt text embedded, possibly from metadata - I'm not sure how exactly it works

@luis-almeida
Copy link
Contributor

Thanks for answering so quickly!

Yes, it adds it sometimes. In the new article editor, you have the option to add alt text manually. In the old editor, some images may already have alt text embedded, possibly from metadata - I'm not sure how exactly it works

Got it! I still think it would makes sense to fix the editors as it seems like they're not generating accessible markup atm.
But I understand this would be a quicker fix.

One last question: These alt texts are being added in english only.
Isn't that a problem? Shouldn't we have translations for these?

@xovnsi
Copy link
Contributor Author

xovnsi commented Sep 17, 2025

Got it! I still think it would makes sense to fix the editors as it seems like they're not generating accessible markup atm. But I understand this would be a quicker fix.

Yes, I hope this approach is enough, maybe there's a better way to provide more descriptive text.

One last question: These alt texts are being added in english only. Isn't that a problem? Shouldn't we have translations for these?

That's right. I haven't thought of that. I'll create new translation strings. Thank you!

@xovnsi xovnsi force-pushed the malgorzata/kiaw-1468-provide-alt-text-for-images branch from 627b834 to 0541fa3 Compare September 17, 2025 11:12
@xovnsi xovnsi force-pushed the malgorzata/kiaw-1466-list-structure branch from 504803f to a5c2894 Compare September 18, 2025 06:58
Base automatically changed from malgorzata/kiaw-1466-list-structure to master September 18, 2025 07:20
@xovnsi xovnsi force-pushed the malgorzata/kiaw-1468-provide-alt-text-for-images branch from 2936b5f to 140a6c8 Compare September 23, 2025 06:51
@xovnsi xovnsi force-pushed the malgorzata/kiaw-1468-provide-alt-text-for-images branch from 140a6c8 to c4c983e Compare September 23, 2025 07:00
@Fredx87
Copy link
Contributor

Fredx87 commented Sep 30, 2025

A couple of considerations:

  1. I am not sure it makes sense to implement this fix.
    • The Jira story reports the issue in the community posts page, not in the Article page
    • We are talking about content generated by the user, it should be up to the user to provide a valid alt text for the image. The editor should provide a way to define an ALT text. From my testing, it is possible to insert an alt text in articles, in community posts, but for some reason I cannot insert it for comments on posts.
    • An alt text "Image X of Y" is completely useless for the user
  2. The style commit type is not the correct type for these type of changes
    • it should be used for "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)"
    • It is not going to create a new version when the PR is merged
    • It is not going to add an entry in the changelog
    • the correct type is fix or feat

We should fix places where it is not possible to add the alt text, but if the user has the option to add it, I don't think it makes sense for us to add a fallback in the theme

@xovnsi
Copy link
Contributor Author

xovnsi commented Oct 1, 2025

@Fredx87 thank you for the feedback!
Yeah, the changes don't really make sense. I'll flag this to accessibility team, maybe it's okay to close this issue.

@xovnsi xovnsi marked this pull request as draft October 1, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants