The definition lists that are used to display gallery content do not validate if an image does not have a caption associated with it. The image caption is normally placed within the list’s <dd> element. If the caption is not present, the <dd> element is not rendered, causing the list to not validate.
One solution owuld be to change the gallery thumbnail and image layouts to something other than definition lists. Otherwise, we could simply render out an empty or “untitled” <dd> element.