I found my self using unordered lists for breadcrumbs, menu bars, thumbnails, blog article lists, form fields, etc.
I strip the decoration of the <li>
, change its display
for horizontal-vertical positioning, insert text, links, spans, imgs, links, paragrahs, titles, form inputs, etc. between the <li>
, and a bunch of css styles are applied that do not correspond to the spirit of the original concept
I add the semantics in its classes.
And lately I have started to include roles here and there, so I have role="list"
or role="menu"
.
Even if I consider, for example, the breadcrumbs as a list (there are a lot of discussion about it), whats the point?, if I am denaturalizing the original behavior of the original HTML tag!
The only moment I see them as a "list" is when css styles are not properly loaded. But as they are not intended to be "real lists", the resulting HTML is somehow wrong, isn't it?
So I am tempted to convert all <ul><li>
to <div>
, unless I need a "real list".
What can I find in <ul><li>
syntax or behavior that prevents me to do that?
UPDATE:
The question is almost answered in Why should I use 'li' instead of 'div'? but I want to insist, for future readers, in something I have learned reading that answer: A list is a list. It doesn't matter that the plain html design of a list seems like a grocery list. A list is a list.
Nevertheles, some abuse can happen, for example using lists to layout a form.
Instead replacing lists by divs, I am going to replace some divs by lists.
` is an *un*ordered list.
– JJJ Apr 23 '15 at 11:31