[wp-trac] Re: [WordPress Trac] #4969: Lists within lists
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 13 16:41:16 GMT 2007
#4969: Lists within lists
-------------------------------------------+--------------------------------
Reporter: pishmishy | Owner: pishmishy
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.4
Component: General | Version: 2.3
Severity: normal | Resolution:
Keywords: accessibility has-patch lists |
-------------------------------------------+--------------------------------
Comment (by Otto42):
Replying to [ticket:4969 pishmishy]:
> The sidebar template typically uses lists of lists to prettily display
lists of pages, categories and bookmarks. Lists of pages, categories and
bookmarks are forced to be items of lists themselves as the functions
wp_list_pages(),wp_list_categories() and wp_list_bookmarks() wrap the
output of functions in <li>..</li> tags by default.
>
> Lists are intended to indicate something about the structure of the
document where as these forced <li> tags appear to be intended to provide
pretty indentation. Nested-lists can also provide confusion for non-visual
readers.
The purpose of these lists is not for indentation, it's for document
structure.
Generally speaking, the entire sidebar can be considered one big list of
items. Each "item" is a whole sidebar entry. This is a perfectly
acceptable structure, you have a big list of entries. The fact that each
entry is large vertically does not make the unordered list structure
incorrect. And indentation is not a factor here either, generally
speaking, as the entire sidebar is styled to a specific position.
Now, the individual elements of that sidebar might contain list
information themselves, such as a list of pages or list of bookmarks or
what have you. But the content of that sidebar list item is irrelevant, it
can be anything desired.
> wp_list_bookmarks() provides the ability to override this with
category_before and category_after options.
wp_list_bookmarks is a special case, as it generates *multiple* list items
intended for inclusion into a sidebar. By default, each category becomes a
separate sidebar entry, instead of the entire unit being one sidebar entry
with multiple subentries.
Because of this multiple nature, it needs these extra before and after
options because not all themes use lists for the entire sidebar. I've seen
sidebars that use nested divs, for example. These themes would have a div
around each sidebar section, and so the wp_list_bookmarks would need to
know those div elements in order to wrap each one in a div instead of a
list.
>wp_list_pages() and wp_list_categories() should offer similar options.
wp_list_pages and wp_list_categories do not actually generate multiple
sidebar, and so they do not need these similar options.
Recommend closing this as wontfix.
--
Ticket URL: <http://trac.wordpress.org/ticket/4969#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list