Open mikey00001 opened 2 years ago
Thanks for submitting!
Thx for bringing this up. Please be aware that in most cases you should not autogenerate the text for an alt-tag. The corrent text of an alt-tag is highly dependend of the context and surounding infos like caption, a headline and so on. https://webaim.org/techniques/alttext/
In Plone 6 classic ui the default behavior has changed to not autogenerate alt-text in output filter. The user has to set it or it will be empty, which can be the right choice depending on the context.
But in some cases, meanly listings, a fallback alt-text stored on the image object could be useful.
Maybe let's add this via add-on?
Images have an alt-tag (which contains the text alternative for the image), which is generated inconsistently, depending on how an image is inserted and which fields are used and/or available.
Proposal 1: every image object should have a field "text alternative", which is not context-dependent. The field should be a property of the image and not of the context in which the image is used.
Proposal 2: the field should be renamed from "alternative text" to "text alternative" because semantically the former name suggests that the text is an alternative to another text, which it is not. It is an alternative to the image.
This differenciates the field "text alternative" from the "caption"-fields, which can be context dependent: an image can be used in multiple contexts with different captions. This is not true for the text alternative because the purpose of the text alternative is to neutrally describe the contents of the image.
If the text alternative field is empty, there should be a consistent and transparent fallback. The fallback rules need to be documented and readily accessible for the users. Here is a list of some permutations / examples and the inconsistent behaviors they currently produce: