Opened 17 years ago
Closed 15 years ago
#6368 closed enhancement (fixed)
Gallery display enhancements
Reported by: | tellyworth | Owned by: | matt |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Gallery | Keywords: | has-patch |
Focuses: | Cc: |
Description
This makes the [gallery] output more configurable and useful. Changes include:
- 'Description' (excerpt) is now 'Caption'
- Captions are displayed below thumbs in the main gallery display
- Thumb gallery markup is improved (dl/dd/dt for icon and caption display, tags are configurable by attributes like [gallery itemtag="div"] if necessary)
- Parent id is selectable, e.g. [gallery id=123]
- Icon size is selectable, [gallery size="medium"]
- Column count is selectable, [gallery columns=4]
- Order is selectable, [gallery orderby="post_title"]
I think some of these attributes should have a UI, where you click on the Insert Gallery Into Post button, but that's not included in this patch.
The dl/dd/dt method of marking up images with captions is discussed and recommended here:
http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/
http://www.tjkdesign.com/articles/how_to_style_thumbnail_and_caption.asp
Attachments (2)
Change History (13)
#2
@
17 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
after [7496], when i insert a gallery into a post, i get this:
Fatal error: Call to undefined function tag_escape() in C:\www\wordpress\wp-includes\media.php on line 367
#6
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I have to disagree with using definition lists in the gallery, a list of one does not make sense, either logically or how HTML is intended to be used.
For example, assistive technologies like screen readers provide navigation short-cuts for lists (and headings, links etc). So you would get to a gallery, and oh, it's a list, great. I'm not that interested in the list so you try and skip over it... to another list, and another etc.
The reason I re-opened this bug rather than just rely on [bug 6927] is that the 'itemtag' option doesn't allow you to use, for example, a proper list. I.e. where the gallery is a list (e.g. ul) and each item is a list item (li).
Would it be possible to change this to defining the top item (e.g. dl, ul, div), and have the function automatically pick the right per-image element? (e.g. dt, li, div).
At the moment I've hacked together a gallery shortcode replacement to output simplified code (including alt text), but it is a hack (I'm not a programmer), it would be better if the core could output accessible code by default.
I included two examples of desired output here:
http://alastairc.ac/notes/web-applications/wordpress/clean-gallery/#code-changes
I'm happy to work on the front-end code stuff, but I'm not the person for PHP changes...
(In [7496]) Gallery display enhancements from tellyworth. fixes #6368