(bug 368) Allow alt= attribute for images
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 8 Oct 2008 16:33:36 +0000 (16:33 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 8 Oct 2008 16:33:36 +0000 (16:33 +0000)
commitbc65c6bb129f93bc16bd2f1c349b3a0a30a38d52
tree19feefe80c5f7a0e60b28fb8bb06abf7f1190f89
parent4e4494e47d988bae8b626912f198a5fa6b2ae083
(bug 368) Allow alt= attribute for images

Alt text is now set in the following ways, in decreasing priority:

1) Set to the alt= parameter if present.
2) Set to the unnamed (caption) parameter if present, and if the image does not have the thumb or frame option set (i.e., if the unnamed parameter is not actually being used for a caption -- using it as both caption and alt text would just lead to text being repeated).
3) Set to the empty string.

Title text and captions should not be affected in any case.  The only backward-compatibility effect (i.e., on images not using the new alt= syntax) should be that if previously the same text was repeated in the alt text and then again in the caption, the alt text will now be empty.  Setting the alt parameter should never change the HTML output compared to not setting it, except of course changing the alt text.

All parser tests pass, except the usual ones.
RELEASE-NOTES
includes/Linker.php
includes/MediaTransformOutput.php
includes/parser/Parser.php
languages/messages/MessagesEn.php
maintenance/parserTests.txt