Page MenuHomePhabricator

Allow default alternate text for images to be provided on the file description page
Open, LowPublic

Description

This is a web accessibility issue. We ought be providing alt text for images (especially those whose only content is a link, otherwise it outputs the file name as alt text). It has also recently become a requirement for FA. See http://en.wikipedia.org/wiki/Wikipedia:Alternate_text_for_images

Rather than reproducing the alternate text every time the image is called, it would be useful to provide it at the file description page, with a magic word or template and for it to be provided as the default alt text whenever it the image is displayed.

When I asked at the village pump, MZMcBride told me "It sounds as though you want a modification made to the image table to store alt text in a column."

Ideally, we should be able to override the alt-text contained at the image page with local code. So, say at [[File:Foo.png]], we had something like

{{DEFAULTALT:A picture of a typical sized foo on a blue background.}}

Whenever Image:Foo.png was called, this would be the alt-text provided for screen readers and the like. However if you needed some different alt text (perhaps this is an article on Foo in general and you need to describe each foo at greater length), you could provide it in the usual way.

[[File:Foo.png|alt=A typical sized foo on a blue background. This particular foo is shaped like a bar.]]

The alternative is having bots editing every page that uses the image and inserting the alt-text, obviously this way would make things much, much easier.


This is about a generic MediaWiki feature. See T166094: Allow editors to provide default alt text on Wikimedia Commons file description pages about doing the same thing on Wikimedia Commons (or more generally on wikis which are Wikibase repos with the WikibaseMediaInfo extension installed).

Details

Reference
bz19906

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:42 PM
bzimport set Reference to bz19906.
bzimport added a subscriber: Unknown Object (MLST).

I strongly oppose this idea. Alt text depends heavily on context, as explained in
our guidelines for alt text.
http://en.wikipedia.org/wiki/Wikipedia:Alternative_text_for_images#Context

That is why I have asked for the option to over-ride the default provided at the image page.

The current method of including it when the image is called clearly isn't scaling.

There are certain images used on over thousands of pages. Take, for example, a medal. Does the alt text of an image of a medal change with context? Probably not. So, you would rather edit thousands of pages to include a boilerplate alt-text for the medal? This is sub-optimal.

Still disagree. Concerning icons, the best solution for both usability and accessibility is to remove the link and leave an empty alt. What should we do if a general alt text is added ? It would't do any good.

Plus, many decorative thumbnail images contain enough description in the caption. And, concerning the thumbnails only, alt text should not duplicate the caption. In those cases, we should only add some short alt text, only to prevent a screen reader from reading the filename. Again, what should we do if some longer alt text is added ?

You can only remove the link for public domain images, otherwise you run into a cc-by-sa attribution violation.

I think it would be eminently useful and in the cases where context matters, it can be overridden. Else, we would need a bot to propagate the alt text for frequently used images.

You may disagree with turning this feature on for en.wiki; that's not something we should debate here. The developers can program this feature and then individual mediawiki installations can enable it or not, at their discretion. I'm fine with this feature not being enabled by default, and having a community discussion once it is ready.

Ok, but this feature should be disabled for images containing a "|link=" parameter. Because if the image links to another page, a general alt text can't be used, it needs a special alt text. Plus, if the image contains an empty "|link=" parameter, then it should be disabled too. :-)

I would endorse both those contingencies.

As I understand it, "link=" (empty) is generally used to denote entirely an decorative ( public domain! ) image that doesn't require alt text.

agr wrote:

I would like to endorse the above suggestion. If you read Wikipedia:Alternative text for images, you'll see that the requirements for alt text generally do not depend on the image's use. A local override can deal with the exceptions. Having the alt text associated with the image makes it easy to find images that lack alt text and would enable a maintenance project to systematically add them.

Elonka wrote:

Strong endorsement as well. When an image is used in several locations, it's cumbersome to have to manually reproduce the alt text on each article, rather than have it be automatically drawn from the central image file. Local overrides can handle any cases where the alt text needs to be different.

  • Bug 22726 has been marked as a duplicate of this bug. ***

As suggested by [[en:user:Iridescent]], the {{DEFAULTALT}} magicword should also accept a language parameter.

{{DEFAULTALT:en:This is a foo}}

{{DEFAULTALT:fr:Il s'agit d'un truc}}

Archduk3 wrote:

Very strong endorsement.

M8R-cyc3n3 wrote:

(In reply to comment #0)

When I asked at the village pump (provided URL), MZMcBride told me "It sounds
as though you want a modification made to the image table to store alt text in
a column."

would or wouldn't sites need to $wgEnableScaryTranscluding to access the default
alt-text of images on a shared repository viz. commons? :s

(In reply to comment #12)

(In reply to comment #0)

When I asked at the village pump (provided URL), MZMcBride told me "It sounds
as though you want a modification made to the image table to store alt text in
a column."

would or wouldn't sites need to $wgEnableScaryTranscluding to access the
default
alt-text of images on a shared repository viz. commons? :s

Not sure. We already 'scarily' transclude description pages from commons, so obviously there's something going on there already without scaryTransclusion being enabled.

I also strongly agree with this proposal, but I would also take it one step further: if no DEFAULTALT is specified, the file description should be used as alternative text. I think that using the file description is generally better than having no alt text at all, and in cases where the general description is no good (for example, per being too long for a mere icon) then the community pressure will be strong for adding a DEFAULTALT to the image, thus propelling us towards better alternative text for images.

Tgr renamed this task from Provide a method to allow alternate text for images to be provided at the file description page to Allow default alternate text for images to be provided on the file description page.Jan 5 2020, 3:39 AM
Tgr removed a project: Commons.
Tgr updated the task description. (Show Details)
Tgr subscribed.

Modified this a bit to be about the core MediaWiki use case as we already have T166094: Allow editors to provide default alt text on Wikimedia Commons file description pages about Wikimedia Commons / SDC.

There are good reasons for not having a default "alt" attribute for images; and for not using machine-generated values such as those copied from media legends or file descriptions. These are already referenced in part in T21906.

[[Wikipedia:Alternative text for images]] was misquoted here ten years ago as "the requirements for alt text generally do not depend on the image's use". That is explicitly not the case. The current version of that page includes a whole section on the importance of context:

https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Accessibility/Alternative_text_for_images#Importance_of_context

At the very least, please do not progress this proposal without first consulting with screen reader users and/or accessibility professionals.

@Pigsonthewing Are you arguing that making sure that there absolutely is no alt-text is better than one which is easy to locally override and that only might be slightly off-topic?

@Pigsonthewing Are you arguing that making sure that there absolutely is no alt-text is better than one which is easy to locally override and that only might be slightly off-topic?

No.

Note least because being "off topic" is not the issue.

Then please explain why then in this thread, because that's what the English Wikipedia manual of style seem to suggest.

Then please explain why then in this thread, because that's what the English Wikipedia manual of style seem to suggest.

Explain what?

What is suggested by the English Wikipedia MoS? Citation, please.

It doesn't really matter what the English Wikipedia Manual of Style says, since this is something that affects all the projects and anything added could be overwritten locally. If it's has an argument of great weight, that should be added into this thread so that no one need to guess what on that page is vaguely referred to.

It doesn't really matter what the English Wikipedia Manual of Style says, since this is something that affects all the projects

I'm not suggesting that the English Wikipedia Manual of Style has special authority; I'm citing a specific section of it, just 133 words in length (half of which is quoted from the World Wide Web Consortium), as a source of good advice.

It is you who said "that's what the English Wikipedia manual of style seem to suggest.", and - since that is vague - I asked you to clarify what you mean.

I asked you to clarify what you mean.

What I was referring to is the captions in the image with the queen that seems to suggest that if the text is not exact, it shouldn't be set at all. But perhaps I am reading to much into that sentence. But if I am, then I don't understand at all why you are arguing against the functionality of this issue to be implemented.

FWIW the same discussion happened in T166094: Allow editors to provide default alt text on Wikimedia Commons file description pages and the various on-wiki discussions linked from there, and the general feeling was that having a fallback that is sometimes not adjusted to the context is better than not having anything.

Any chance the priority of this could be raised - I am getting fed up of having to always write alt text on Wikipedia. Also I sometimes add pics on a Wikipedia for which I am not a native speaker so it would be very hard for me to write alt text there.

Conversely as a native English speaker if I write the alt text once then those with poor English can easily benefit later when they add the same pic to another article