fix: `description` being used as alternative text for images

Merged
DO
4mo ago
+48-41

Proposed changes (including videos or screenshots)

Introduces a dedicated image_alt field on image attachments to hold accessibility alternative text, separating it from description

Previously the "Alternative text" input from the upload modal was stored in description and used both as the <img alt> and as a visible caption for old messages. Splitting the concerns keeps alt text accessibility-only and frees description to render old messages.

How to test the changes

  1. Upload an image and fill in the Alternative text field
  2. Confirm the rendered <img> uses it as alt (inspect element / screen reader)
  3. Confirm the alt text is not shown as a visible caption under the image
  4. Repeat with an E2EE room to verify the encrypted path

Issue(s)

Steps to test or reproduce

Further comments

SUP-1039

Summary by CodeRabbit

  • New Features

    • Image attachments now support dedicated alt text for improved accessibility.
  • Updates

    • File upload, preview, and composer UIs now use alt text instead of description.
    • Editing and metadata flows updated to store and display alt text consistently.
  • Tests

    • End-to-end tests updated to validate alt text on uploaded images.