Page MenuHomePhabricator

Put useful alt text on main <img> on image: page
Closed, ResolvedPublic

Description

In commons, don't say alt="". If we don't download the file for
various reasons, we scratch our heads at what we are supposed to be
seeing.

Say alt="[example.jpg]" perhaps.

</ul><div class="fullImageLink" id="file"><a
href="http://upload.wikimedia.org/wikipedia/commons/4/43/example.jpg"><img
border="0"
src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/example.jpg/420px-example.jpg"
width="420" height="599" alt="" /></a><br />


Version: 1.7.x
Severity: minor

Details

Reference
bz8231

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:29 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz8231.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

Where's the contextual information?

What's "in commons" mean? Is there some _particular place_ where this
behavior appears, in contrast to other places where it does not?
It would be helpful if bug reporter would provide complete information.

Ok, I think he's referring to the <img> which displays the actual file
or resized/rendered image on an Image: page.

Currently these specify an alt attribute, but with no text.
IIRC XHTML 1.0 Transitional requires the alt attribute to be present,
hence the empty attribute when there's no useful text.

It might be nice to put some alt text in there. For rendered images
it might say "download full-size image", but that's already repeated
in an explicit text link below. For non-rendered images, no download
link is actually present... though it might be nice to change that
for consistency.

ayg wrote:

If someone is seeing the alt text, surely odds are they won't be able to make
use of a downloaded full-size image? Since the image is kind of the entire
point of an image page, appropriate alt text would be more like "{{PAGENAME}}
cannot be displayed".

robchur wrote:

There are reasons other than being unable to see/see well for switching off
image downloads.

ayg wrote:

Yes, okay, and you're probably right that this is the majority nowadays.
Regardless, there's still that "click to download full version" link, so it
would be redundant.

ayg wrote:

Added in r18502: alt text is now the equivalent of "{{FULLPAGENAME}}".