[wp-trac] [WordPress Trac] #16681: The output from wp_list_bookmarks() fails to validate in Wordpress 3.1
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 26 20:08:38 UTC 2011
#16681: The output from wp_list_bookmarks() fails to validate in Wordpress 3.1
--------------------------+-----------------------------
Reporter: robhogg | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: 3.1
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
When run through the W3C's validator (validator.w3c.org), a page
containing the example code for this function, as shown in the codex, will
generate an error for each link category header, similar to:
>>Error Line 264, Column 36: document type does not allow element "li"
here; missing one of "ul", "ol", "menu", "dir" start-tag
>>
>><li id="linkcat-45" class="linkcat"><h2>Local Campaigns</h2>
The cause of this is that the list lacks an outer set of <ul>...</ul>
tags, meaning that the header list items are not within a list context
(unlike the nested lists for the links themselves).
Adding an outer set of unordered list tags resolves this issue, and the
page will validate successfully.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16681>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list