Last modified: 2013-08-12 15:20:46 UTC
Gallery generate at the moment an unnumbered list containing the images. In the browser the bullets are hidden by CSS. When you open copy a gallery from web page to a word processing you get a unnumbered list with annoying bullets. The unnumbered list is for semantical reasons not necessary. For HTML4 with div/div instead of ul/li should be satisfactorily and has no disadvantages. For HTML5 the figure element would be the right element: http://www.w3.org/TR/html5/the-figure-element.html#the-figure-element <gallery title="Caption"> File:Image1.jpg|First Image File:Image2.jpg|Second Image </gallery> <figure class="gallery"> <figcaption>Caption</figcaption> <figure> <img src="Image1.jpg" /> <figcaption>First Image</figcaption> </figure> <figure> <img src="Image2.jpg" /> <figcaption>Second Image</figcaption> </figure> </figure>
Related URL: https://gerrit.wikimedia.org/r/62207 (Gerrit Change Ida8ed0436626d3455b7d28ebac7c8fc6e0b47acd)
This is a special case of bug 23932. Apparently, styling such tags (new to HTML5) works pretty much everywhere, except IE before 9 *without JS*. The last consensus at 23932 was that we still need to worry about that. Anyway, we should probably determine a broad course there rather than doing this piecemeal.
I disagree with the part of the premise of this ticket and the solution that was identified. If your copy paste gives you something ugly, then that's a bug in your copy paste, not in the definition of the html structure. If you want to wrap the blocks in figures, then that would be nice, but it doesn't replace the original intent of using ul and li. It's just one of many ways to loose ugly bullet points, but in terms of structure, other then being html5, it's not necessarily better. The gallery is semantically a list in at least Special:NewFiles and Category pages and actually using a list for it has benefits for assistive technology in these cases. Now I guess there could be made a case that inside articles, our gallery aren't really lists but rather groups of images, but then we should split the gallery generator into two modes that can work independent of eachother. Using figure and figcaption are totally independent issues as far as i'm concerned. They are just div's with extra meaning.