Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Listitem title, subtitles, links should be marked up with class names, not implied #580

Closed
@gitToad

Description

@gitToad

Currently list items are marked up with a mixture of implied and explicit markup.

For example, the first A tag is used to markup a linked list
The second A tag is used in a split button list
P tags are marked as subtext
H1-H6 tags are marked as main text
the first IMG tag triggers a list to be a thumbnail list

However,
count indicators are done by adding a ui-li-count class
supplemental right hand side information is supplied by adding a ui-li-aside class
inset lists and icons (vs thumbnails) are also done via explicit class names

  1. This is somewhat inconsistent
  2. explicit class names for A,P,H,IMG would be more readable code, even if slightly longer
  3. the enhance code in the listview plugin (Navigation from one page back to multi-page template #2406 - Fixes #2541 — Properly applies “disabled” styling and logic to custom form inputs. #2711) does a "deep" lookup of the A, IMG etc .tags. So if you want to include ANY image (like rating stars or a RSS feed icon next to your text etc.) it will interpret that as signaling that you want a thumbnail list item.
    I think this kind of markup enhancement is very error prone and inflexible.

At least do positional markup so only direct descendants of the LI trigger the various list item modes ie LI > IMG and LI > P etc.

Preferable imho would be explicit semantic markup in the LI direct descendants:
<IMG class='ui-li-thumbnail' ...>
<A class='ui-li-link' ... > for "where clicking on the li should take me"
<A class='ui-li-link-alt'....> for "alternate right hand side split button list link"
This means that you can then also create collapsible list items, whose content can be independently marked up and will not cause bogus li style changes just because deep down there is a IMG or A

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions