Last modified: 2011-03-13 18:06:38 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 T4443, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2443 - Image alt text should be compulsory
Image alt text should be compulsory
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Lowest normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 368
Blocks: 367
  Show dependency treegraph
 
Reported: 2005-06-18 07:13 UTC by Chris Wood
Modified: 2011-03-13 18:06 UTC (History)
7 users (show)

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


Attachments

Description Chris Wood 2005-06-18 07:13:56 UTC
Despite what some people think, *every* image should have an alt text. These are
the W3C specs (http://www.w3.org/TR/WCAG20/#text-equiv), aimed at making the web
more accessible for people using non-visual browsers, text-based browsers, or
browsing with images disabled. Wikipedia is supposed to be an encyclopedia for
everyone - including the blind, the colour-blind, and people with limited
connections and devices.

Either the markup for including an image in a page should require alt-text, or
alt text could be made compulsary on the image page, and automatically included
in all pages using the image.

This is a MediaWiki issue, because making alt text compulsary is the only way to
make MediaWiki pages validate for basic accessibility.

For a fuller explanation, see
http://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Alternative_text_for_images#All
images should have alt text . Please keep comments here technical rather than
idealogical; otherwise comment at Wikipedia.
Comment 2 Brion Vibber 2005-06-18 07:32:31 UTC
And, indeed, all images get alt text. The default is the filename (remember,
uploaded filenames are supposed to be descriptive).
Comment 3 Chris Wood 2005-06-18 08:51:33 UTC
Post 1.4.5? (it isn't working at Wikipedia now, eg.
http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax)
Comment 4 Chris Wood 2006-02-22 00:52:48 UTC
The change, whenever it was made, wasn't retroactive, because there are many
images without alt text (eg. the above link). Missing alt text (or alt="alt
text") should not be possible ever.
Comment 5 Brion Vibber 2006-02-22 00:58:57 UTC
There was no "change". Images have always had an alt attribute stuck
on them ever since they were supported.
Comment 6 Chris Wood 2006-02-22 03:15:07 UTC
Then why do some of the images on that page have no alt text?
Comment 7 Brion Vibber 2006-02-22 19:25:05 UTC
Provide specific examples, please.

(Note that an *empty* alt text may be perfectly legitimate for non-functional
content, and is in fact recommended by the document you gave above, so that
should be possible when needed.)
Comment 8 Chris Wood 2006-02-23 08:48:45 UTC
http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax
The second image on the page has the alt text "alt text". Every image on the
page without a caption, except the two after "text text text text text text",
have no alt text.

In other words, every image without a caption specified in the wikisyntax (eg.
[[Image:Westminstpalace.jpg|right|50px|]]) and also some with a hidden caption
(eg. [[Image:Westminstpalace.jpg|thumb|This text is not
displayed.|70px|left|]]), have no alt text.
Comment 9 Jesús Martínez Novo (Ciencia Al Poder) 2008-01-12 21:08:28 UTC
If the user explicitly ants to remove the alt text of an image, inserting an empty caption, then no alt text should be rendered.

I'll show you the problem:

On <http://es.pokemon.wikia.com/index.php?title=Lista_de_Pok%C3%A9mon_del_directorio_ranger&oldid=11918>, the first image of each cell has the description, with a x1, x2 or x3 depending on how many images are there. I don't want alt text for the rest of the images because the first of all does what I want.

The list was showing perfectly in text-browsers, copying and pasting the table in a text program or disabling images. Now the name of the image is shown in all of the images, so there's no sense to the list when the images are not shown. The names of the image are descriptive, but the same title of the image repeated two or more times makes no sense and puts too many text inside a cell.


The possible solution:

[[Image:Blah.png]] must show the name of the image as alt text.

[[Image:Blah.png|]] or [[Image:Blah.png| ]] must NOT show any alt text because the user EXPLICITLY doesn't want an alt text to be put there. Put a empty alt, or no alt at all.


Yeah, I know that I could use a composed image so instead of two same images I would use one, but i don't want to upload a bunch of repeated images on the wiki.

Also, split the alt text between the images is really stupid.


The actual behavior (in my example) is against #367. This is the reason for opening the bug.
Comment 10 Mormegil 2008-03-19 18:20:31 UTC
(In reply to comment #9)

Note that the problem is not the alt attribute of <img>, but the title attribute of the wrapping <a> (linking to the image description page), which is automatically set to the file title in case the alt attribute is empty (see function getDescLinkAttribs in includes/MediaTransformOutput.php).
Comment 11 Robert Leverington 2008-03-19 19:13:38 UTC
I can confirm this bug, images without captions have alt="" -- the actual hover text is coming from the title attribute of the link to the image description page.  Alt text is desired in all default circumstances so I presume that a patch for this would get accepted into the code, however I don't see that a method for not having alt text needs to be created. [[Image:Example.png| ]] would do this AFAIK (providing a work around), and it is required that at least some text be in the alt tag on images.  Since this is not to big of a change I will work on a patch if one is not made before I get round to it.
Comment 12 Andrew Garrett 2008-08-08 10:24:48 UTC
Fixed in r38876.
Comment 13 Brion Vibber 2008-08-08 21:52:01 UTC
Reverted in r33956. This broke four test cases:

   4 previously failing test(s) now PASSING! :)
      * Right-aligned image  [Fixed between 08-Aug-2008 21:37:38, 1.14alpha (r38954) and now]
      * Centre-aligned image  [Fixed between 08-Aug-2008 21:37:38, 1.14alpha (r38954) and now]
      * None-aligned image  [Fixed between 08-Aug-2008 21:37:38, 1.14alpha (r38954) and now]
      * Width + Height sized image (using px) (height is ignored)  [Fixed between 08-Aug-2008 21:37:38, 1.14alpha (r38954) and now]

Please recommit with fixes to the existing test cases and some new test cases to cover cases where an empty caption is explicitly requested, as in comment #11.
Comment 14 MZMcBride 2008-10-09 09:52:16 UTC
The first line of comment 13 is incorrect; this was reverted in r38956.
Comment 15 Chad H. 2010-04-20 08:49:59 UTC
Have been discussing this off-and-on with some of the other developers, and I don't see a huge reason to do this.

1) There are legitimate times to not use alt text for images, regardless of what the W3C says on the issue.

2) Forcing people to specify and alt text will just end up with people writing useless alt texts in order to meet the requirement enforced by the software.

While specifying a default alt text is useful, it's already covered by bug 19906. Closing this one WONTFIX.

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


Navigation
Links