Last modified: 2011-05-06 06:50:01 UTC
Images have an alt= attribute, so one can describe the image and allow handicaped people to get audio information.
[[Image:Pic.jpg|alt=This is displayed if the image isn't shown! Furthermore, IE may show this as tooltip.]]
But it is impossibe with <gallery></gallery>.
I hope we could have somethig similar to the following:
<gallery caption="Sample gallery" widths="100px" heights="100px" perrow="6">
Image:Drenthe-Position.png|[[w:Drenthe|Drenthe]], the least crowded province.|alt=This is displayed if the image isn't shown! Furthermore, IE may show this as tooltip.
Image:Flevoland-Position.png|alt=This is displayed if the image isn't shown! Furthermore, IE may show this as tooltip.
I hope someone can fix this bug, I believe it is quite important for the accessibility.
Given that there's a caption and a link to a detail page, can you provide an example of what might be used for alt text in a gallery?
A french user tried to use alt text here : http://fr.wikipedia.org/w/index.php?title=Cantine&oldid=40547077#Importance_sociale_de_la_cantine
Is this the example you are asking ? I have translated it quickly here http://fr.wikipedia.org/wiki/Utilisateur:Dodoïste/bac_à_sable_perso
Those seem like fairly decent alt texts, pretty rare! :D Not a bad use.
We should probably consider better ways to deal with alt text though -- perhaps these should be centralized to the image generally? If the file is used in multiple places, a description of its ''content'' will probably tend to be the same in most cases.
But being able to override it in a gallery as well as an indidivual usage makes sense. Parsing of additional parameters would need to be added; currently I believe gallery just splits the lines into name and caption pieces.
That's a great idea Brion, one that I actually just proposed at https://bugzilla.wikimedia.org/show_bug.cgi?id=19906
Please reconsider, Brion. 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
A centralized description could be stored nonetheless and used as default alt text. The override feature would guarantee that the alt text can be modified to better fit with the context in each case.
(In reply to comment #3)
> We should probably consider better ways to deal with alt text though -- perhaps
> these should be centralized to the image generally? If the file is used in
> multiple places, a description of its ''content'' will probably tend to be the
> same in most cases.
Note that this was requested as bug 19906.
Re-waking this bug as there's been some interest lately.
Here's a shorter example usage, using the same style as the page linked above:
File:Wiki.png|Wikipedia's logo|alt=A gray globe made of puzzle pieces, labeled with letters from many different writing systems.
The usage of the |s pretty much matches existing [[File]] tags; should be pretty easy to adapt, perhaps using the same functions as used there if it's not too deep in the parser.
Hello. Sorry for my bad English. Other examples of articles in which I took around the "bug" in describing the images into notes: http://fr.wikipedia.org/wiki/Boite_de_conserve#Notes_et_r.C3.A9f.C3.A9rences, http://fr.wikipedia.org/wiki/Cuisine_de_la_pomme_de_terre, http://fr.wikipedia.org/wiki/Conservation_de_la_viande
These descriptions have encountered criticism from French users when I submit the articles to the quality label because they add to the page and are unpleasant to people without disabilities. Technically, I cannot help, but as a writer, I very much hope that you can find a solution. Sincerely, Égoïté
I know that moaning won’t get this bug fixed, but I am desperate. I was quite happy when galleries were finally free of layout tables (#3276). However, gallery is as useless as before without the possibility to add alternative text to the images. The more images you have in an article, the more missing alt texts are annoying. And usually articles containing a lot of images (e.g. about paintings) are using galleries.
Is this bug too hard to fix? As an outsider it seems fairly easy to me adding the |alt=. Are there other reasons preventing this bug to get fixed? Or is it just not important enough? It do is for all the screen reader users!
Created attachment 8444 [details]
This fixes the problem while not breaking existing captions with |s in it. Passes existing parser tests, and adds a new line to a parser test for checking this behaviour.
Apply patch to trunk/phase3.
(In reply to comment #11)
> Created attachment 8444 [details]
> This fixes the problem while not breaking existing captions with |s in it.
> Passes existing parser tests, and adds a new line to a parser test for checking
> this behaviour.
> Apply patch to trunk/phase3.
Cool. I'll have a look at it tonight & will commit it if don't see any problems.
As an aside, it'd be cool if we could support all the normal thumbnail params (or the one's that make sense anyways). As it stands, you can't do thinks like specify show page 5 of a pdf in a gallery, or use lossless/lossy (whichever is not the default) thumbnail for a tiff file
(In reply to comment #13)
> As an aside, it'd be cool if we could support all the normal thumbnail params
> (or the one's that make sense anyways). As it stands, you can't do thinks like
> specify show page 5 of a pdf in a gallery, or use lossless/lossy (whichever is
> not the default) thumbnail for a tiff file
The only sane way imo, would be to split the param parsing stuff from makeImage() into a separate function & use it for the gallery stuff as well. Afterwords just ignore those params that don't apply.
Patched in r86749, Bawolff do want to open a new bug or edit this ones summary?
and reverted in r86752
Created attachment 8451 [details]
This patch again only adds the alt= tag, no other tags that normal images do have, as I'm not yet familiar enough with the parser to confidently do that. ;)
Also includes suggestions by diebuche (some cleanup) and Duplicatebug (correct magic word, wikitext inside caption, extra parser tests), and fixes a notice in MagicWord.php.
Patch to trunk/phase3.
> Patched in r86749, Bawolff do want to open a new bug or edit this ones summary?
It really should be a separate bug I suppose. In any case worrying about that shouldn't stop you from fixing this, just if there was an easy way to do all of them, that'd be really awesome. There's also bug 8480.
Committed by DieBuche in r86859.
*Bulk BZ change: -bugsmash from closed bugs. (7 Bugs)*