Last modified: 2014-07-24 06:44:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26586, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24586 - Add title= option for images
Add title= option for images
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.17.x
All All
: Low normal with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.org/wiki/Benutzer...
: accessibility
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-29 15:24 UTC by Daniel Kinzler
Modified: 2014-07-24 06:44 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2010-07-29 15:24:56 UTC
whether an alt-attribute (and a title-attribute) is created at all, and if it's empty or what it contains, appears to be completely inconsistent between different ways of including images (thumb,framed,frameless,etc): <http://de.wikipedia.org/wiki/Benutzer:Raymond/alt>. 

The alt-attribute (and the title attribute on the link surounding the img) are used by screen readers to convey the image's meaning to people who can't see them. There are three cases to consider:

* the image is part of the content. In that case, the image caption is what the user needs to know. However, it should be presented only once - not as alt, title, and visible caption below the image. Otherwise, screen readers etc would read it twice or even three times.

* the image is functionla/navigational. This is true for many images in the user interface, and some in the content. The latter would have a link= attribute, specifying where a click on the image should lead. In this case, the alt-attribute should probably be empty, but the title-attribute of the link should inform the user of the link's target. There should however be a way to explicitly specify the alt-text of the image.

* purely decorative images, e.g. shadows in the skin, parts of pretty buttons used in the fundraising banner, etc. These should probably have an empty alt-attribute, since they can and should be ignored by text-only interfaces. HTML5 recommends: "As a last resort, implementors should either set the alt attribute to the empty string, under the assumption that the image is a purely decorative image that doesn't add any information"

Finding a good solution for this needs some careful considerations. However, the goal should be to have consistent behavior that results in the relevant information being conveied to the user in a non-redundant way.


This report results from feedback from the German Central Library for the Blind
(DZB). Please see 
http://www.mediawiki.org/wiki/Accessibility#Feedback_from_the_DZB.2C_June_2010
for some background.
Comment 1 Maria Schiewe 2010-07-30 07:35:13 UTC
Please note: Because images are always surrounded by links they either need and alternative text or another text also included in the link. If neither of this is true, the screenreader will read the URL of the images to give the user some indication what kind of link this is, else the output would onyl be “link” which won’t be of any use. Please see Techniques for WCAG 2.0: [http://www.w3.org/TR/WCAG20-TECHS/F89.html F89: Failure of 2.4.4, 2.4.9 and 4.1.2 due to using null alt on an image where the image is the only content in a link].
Comment 2 Derk-Jan Hartman 2010-07-30 16:45:07 UTC
Ok, so cases:

[[File:image|alt=|link=|caption]]

Thumb
* normal link target
** default: empty <img> alt attribute, requires <a> title attribute ("Description page of Filename" ????)
** alt= explicitly sets an alt text
* (explicit link target is not possible/allowed in thumbs currently. Bug 17398)

Framed
* normal link target
** default: <img> alt attribute is the caption, <a> title attribute ("Description page of Filename" ????)
** alt= explicitly set an alt text (possibly empty value)
* (explicit link target is not possible/allowed in frames currently. Bug 17398)

frameless
* normal link target
** default: <img> alt attribute is the caption, <a> title attribute ("Description page of Filename" ????)
** alt= explicitly set an alt text (possibly empty value)
* explicitly set link target (Likely navigational element)
** default: <img> alt attribute is the caption, use the caption for the <a> title attribute.
** alt= explicitly set an alt text (possibly empty value)
* NO link (link=) (Likely decorative)
** default <img> alt attribute == caption, no title attribute
** alt= explicitly set an alt text (possibly empty value)

Or do you want a default of no alt for link=explicit elements ? (I thought we recently changed this around)

This isn't so different from the current setup I think. Should be easy to fix. I note that most problems from content here are probably an issue of authors not knowing what syntax to use at what times, less a bug in the software.

Other issues are using decorative/navigational images that require attribution, under our current Attribution policies, such images require links to their description pages when used. The English wikipedia for that reason is trying to use as many public domain images for decorative and navigational links as possible. Not sure what the status is of skin images, and likely the WikiEditor needs quite some work.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-12-05 21:05:01 UTC
This is all for elaborate historical reasons.  I wanted to rationalize it a few years ago, but Brion didn't let me, on the basis that there might be people depending on it.
Comment 4 vlakoff 2012-01-23 08:38:13 UTC
|link= is now recognized by thumbs and frames. (Bug 17398)

Should we consider adding a |title= parameter? One use case would be for providing tooltips for decorative frameless images. For example see http://en.wikipedia.org/wiki/Template:Increase
Comment 5 C. Scott Ananian 2014-05-29 20:26:38 UTC
Retitled bug to reflect comment 4, since as comment 3 states, the existing alt/title defaults are historical.  But sure, we should be able to arbitrarily override alt and title if desired.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links