Changeset d18c60e in Klonkt for src/services/i18n.js


Ignore:
Timestamp:
07/01/2026 06:55:46 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
0688b5f
Parents:
43273c9
Message:

feat(fediverse): alt text for images (accessibility → AS2 attachment name)

Media federated to the fediverse now carries a description (AS2 name on the
attachment), which Mastodon shows and screen readers read. The cover gets an alt
field in the editor; inline images keep their own <img alt="…">. Also used as the
cover's on-site alt.

  • src/config/database.js — posts.cover_alt column.
  • src/services/ActivityPubService.js — buildNote carries alt per media URL (cover_alt + inline <img alt>) and emits it as the attachment name (and on the image fallback).
  • src/routes/posts.js — capture/store cover_alt on create/save and pass it to the federation hooks.
  • src/services/Scheduler.js — carry cover_alt when a scheduled post goes live.
  • src/views/pages/post-edit.ejs — "Alt text (description)" field under the cover URL.
  • src/views/pages/post.ejs — the on-page cover <img> uses cover_alt.
  • src/services/i18n.js — pedit.f_cover_alt + pedit.cover_alt_placeholder (nl/en/de).
  • test/media-alt.test.js — cover alt, inline alt, and no-alt = no name.
  • CHANGELOG(.nl/.de).md — "Alt text for images" under Unreleased.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/i18n.js

    r43273c9 rd18c60e  
    637637    'pedit.f_cover_url': 'Cover URL',
    638638    'pedit.cover_url_placeholder': '/media/…  of https://…  (of upload met de knop)',
     639    'pedit.f_cover_alt': 'Alt-tekst (beschrijving)',
     640    'pedit.cover_alt_placeholder': 'Beschrijf de afbeelding voor schermlezers',
    639641    'pedit.cover_upload_btn': 'Upload nieuwe cover',
    640642    'pedit.s_content': 'Content',
     
    15551557    'pedit.f_cover_url': 'Cover URL',
    15561558    'pedit.cover_url_placeholder': '/media/…  or https://…  (or upload with the button)',
     1559    'pedit.f_cover_alt': 'Alt text (description)',
     1560    'pedit.cover_alt_placeholder': 'Describe the image for screen readers',
    15571561    'pedit.cover_upload_btn': 'Upload new cover',
    15581562    'pedit.s_content': 'Content',
     
    24732477    'pedit.f_cover_url': 'Titelbild-URL',
    24742478    'pedit.cover_url_placeholder': '/media/…  oder https://…  (oder per Schaltfläche hochladen)',
     2479    'pedit.f_cover_alt': 'Alt-Text (Beschreibung)',
     2480    'pedit.cover_alt_placeholder': 'Beschreibe das Bild für Screenreader',
    24752481    'pedit.cover_upload_btn': 'Neues Titelbild hochladen',
    24762482    'pedit.s_content': 'Inhalt',
Note: See TracChangeset for help on using the changeset viewer.