Many Wikimedia images lack alt text, causing accessibility problems. While the ability to provide an alt text in the image thumbnail syntax is valuable, it is unrealistic to expect that it could be used all the time; also there are various ways in which an image can show up without being associated to thumbnail data such as caption and alt text (e.g. on category pages, or the file page itself). There should be a way to provide a default alt text that can be used automatically when there is no better, context-specific alt text. With Structured Data on Commons available, that would be the obvious option.
(Structured data has the disadvantage that it's only available on fairly complex Wikibase-enabled wiki farms, so there is some value in a different solution that can be used on a vanilla MediaWiki, but that's unlikely to happen soon and as such outside the scope of this task; it's discussed in T21906: Allow default alternate text for images to be provided on the file description page.)
There are two SDC-based approaches:
- use a dedicated property (which would have to be created first), or
- use P2096 (media legend) with an appropriate qualifier (e.g. P3831 (object has role) with the value Q1067764 (alt attribute) or Q60844786 (alt text)).
Given how much we expect this information to be used both internally and by external software (which is less prepared to handle qualifier-based intricacies), the dedicated property seems vastly preferable.
There have been two property proposals in the past:
- alt - had some objections about alt text being context-dependent (which per above is not a good reason not to have default alt tags), about alt-text being language-dependent and about the property name. Rejected with "might be relevant to propose it again once structured data is available on Commons".
- alt tag - largely the same discussion
(There is also has alt-text which sounds similar but was actually intended for describing images not hosted by us.)
The alt text is multilingual so this is blocked by T86517: [Story] Add a new datatype for multilingual text (although Wikidata does allow property proposals for planned item types, they are added to Wikidata:Property proposal/Pending for the time being.