Skip to content

respect alt text translation method from the start#19067

Open
i-just wants to merge 1 commit into
5.11from
feature/translatable-alt-text-amends
Open

respect alt text translation method from the start#19067
i-just wants to merge 1 commit into
5.11from
feature/translatable-alt-text-amends

Conversation

@i-just

@i-just i-just commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR changes how the translation method for asset alt text is processed.

Up until now, when you first added alt text to an asset, it was propagated to all sites, not just those defined by the selected translation method. The translation method was respected from the second save. This behaviour was intentional, but after issue #19052 was raised, we discussed it internally and decided to change it for 5.11 (and 6) as it’s not the best from the accessibility point of view.

From now on:

  • the alt text translation method is respected from the first time alt text is added to an asset;
  • the assets.alt column is ignored and will be removed in v6
  • this PR contains a migration that:
    • ensures all assets have all the site-related rows in the assets_sites table
    • for the rows where assets_sites.alt is NULL (or where the assets_sites row doesn’t exist), it copies over the value from assets.alt
    • this migration is the last point where the global value might be used for sites that don’t match the chosen translation setting; I chose this option over copying the assets.alt to assets_sites.alt according to the chosen translation setting, as it ensures we’re not changing the alt text developers might expect during the update, but at the same time allows us to no longer use the assets.alt column.

(Separate PR for v6: #19072)

Related issues

#19052

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.

1 participant