[Pro] lh (List Header) Tag Question

Hi All . . . I have spent some time with Freeway and how it handles lists. After quite a bit of work I have finally been able to establish a successful workflow that lets me leverage Freeway and still end up with clean semantic markup.

I would like to use the lh tag for my ul headings but don’t see a way to do this as Freeway seems to only output the ul with li items. is there a way I can change the first li to be a lh in freeway?

Kind Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The LH tag was a part of the HTML 3.0 format, and it was dropped before 3.2 became a standard. I just tested with HTML5 and HTML 4, and got similar results to this:

Error: Element lh not allowed as child of element ul in this context. (Suppressing further errors from this subtree.)

From line 14, column 3; to line 14, column 6

y>↩

    :leftwards_arrow_with_hook: Test</

    Content model for element ul:
    Zero or more li and script-supporting elements.

Walter

On Dec 7, 2013, at 3:02 PM, TeamSDA wrote:

Hi All . . . I have spent some time with Freeway and how it handles lists. After quite a bit of work I have finally been able to establish a successful workflow that lets me leverage Freeway and still end up with clean semantic markup.

I would like to use the lh tag for my ul headings but don’t see a way to do this as Freeway seems to only output the ul with li items. is there a way I can change the first li to be a lh in freeway?

Kind Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter . . .

Thank you for the reply. Currently I am just styling the first li differently then creating a child list under the li but it does not seem like this is semantically correct. Is there a better way to add a heading to a list that is semantically correct?

I did notice that all the documentation on the lh tag seemed to be older. Also I am building the set using HTML 5.

Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What about using a definition list?

Todd

Is there a better way to add a heading to a list that is semantically correct?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you want to build a multi-level list, then a nested UL is totally fine. As Todd mentioned, a DL is another good choice, although that only allows for one level of hierarchy, while the nested UL is indefinitely nestable.

You can make the styling whatever you like, the semantic value will be there if you do something like this:

<ul>
	<li>Top Level
		<ul>
			<li>Second Level</li>
			<li>Second Level</li>
		</ul>
	</li>
	<li>Top Level
		<ul>
			<li>Second Level</li>
			<li>Second Level</li>
		</ul>
	</li>
	<li>Top Level
		<ul>
			<li>Second Level</li>
			<li>Second Level</li>
		</ul>
	</li>
</ul>

If you make a set of styles like this:

li {  font-weight: bold }
li li { font-weight: normal }

Then all of your nested LIs will have normal weight text, and all your top-level LIs will be bold.

You can adjust the bullet style and indenting to suit your layout, too. But this gets you proper hierarchical outline format for free.

Walter

On Dec 7, 2013, at 3:18 PM, TeamSDA wrote:

Hi Walter . . .

Thank you for the reply. Currently I am just styling the first li differently then creating a child list under the li but it does not seem like this is semantically correct. Is there a better way to add a heading to a list that is semantically correct?

I did notice that all the documentation on the lh tag seemed to be older. Also I am building the set using HTML 5.

Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

True, but since there can be multiple

tags couldn’t those be used in a similar fashion to nested ul lists?

<dl>
        <dt>Title or Header</dt>
                <dd>List Item</dd>
                <dd>List Item</dd>
        <dt>Title or Header</dt>
                <dd>List Item</dd>
</dl>

Todd

As Todd mentioned, a DL is another good choice, although that only allows for one level of hierarchy, while the nested UL is indefinitely nestable.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you Both . . .

Walter your example is exactly what I currently have, I was just thinking that using something like a lh would give the list more semantic meaning.

As for an dl I don’t believe this would be the right solution as my list is being used for a change log, e.g. Task name and then the changes made to that given task. I am under the understanding that dl are used for definitions. My main goal is to create clean markup that is semantically correct.

Kind Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sure, but the nested UL can be nested ad nauseam – can you nest DLs like that? My example was only one level deep, but you can just keep nesting as far as you want, and if you don’t style the bullets, they actually take on the same sort of behavior as the Word outline tool, with different bullets as you go deeper for visual confirmation what you’re doing.

Walter

On Dec 7, 2013, at 3:35 PM, Todd wrote:

True, but since there can be multiple

tags couldn’t those be used in a similar fashion to nested ul lists?

<dl>
       <dt>Title or Header</dt>
               <dd>List Item</dd>
               <dd>List Item</dd>
       <dt>Title or Header</dt>
               <dd>List Item</dd>
</dl>

Todd
http://xiiro.com

As Todd mentioned, a DL is another good choice, although that only allows for one level of hierarchy, while the nested UL is indefinitely nestable.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The “definition” meaning was explicitly changed to ‘description’ in HTML5 – you can use them for anything where there is a name or names followed by values. Sounds like it would be perfect for what you’re doing, as you’ll never get beyond one layer.

http://html5doctor.com/the-dl-element/

I might be tempted to put separate lists interspersed with Hn tags. That’s another way.

Walter

On Dec 7, 2013, at 3:38 PM, TeamSDA wrote:

Thank you Both . . .

Walter your example is exactly what I currently have, I was just thinking that using something like a lh would give the list more semantic meaning.

As for an dl I don’t believe this would be the right solution as my list is being used for a change log, e.g. Task name and then the changes made to that given task. I am under the understanding that dl are used for definitions. My main goal is to create clean markup that is semantically correct.

Kind Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I use a dl to group similar items. For example:

<dl>
        <dt>Why I like Milk</dt>
                <dd>It’s full of fat</dd>
                <dd>It’s creamy</dd>
                <dd>It goes well with chocolate</dd>
</dl>

Todd

I am under the understanding that dl are used for definitions. My main goal is to create clean markup that is semantically correct.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Super… and thank you for the resource, most helpful as always.

Just to confirm, in my testing it appears that what Freeway calls “Unbulleted” actually outputs the list as a DL?

Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I haven’t tested this in a while, but what I remember is that it outputs a dl, but with a twist (and this makes it invalid according to that article I linked to):

// Freeway's "unindented list" produces: 
<dl>
	<dt>One</dt>
	<dt>Two</dt>
	<dt>Three</dt>
</dl>

// Freeway's "unbulleted list" produces: 
<dl>
	<dd>One</dd>
	<dd>Two</dd>
	<dd>Three</dd>
</dl> 

Technically, a DL should always contain both DT and DD children.

Walter

On Dec 7, 2013, at 3:47 PM, TeamSDA wrote:

Super… and thank you for the resource, most helpful as always.

Just to confirm, in my testing it appears that what Freeway calls “Unbulleted” actually outputs the list as a DL?

Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

HMMM… So it would seem I am back to my first question but with a greater understanding of the DL. So how would I go about keeping this in a Freeway Pro workflow (or as least as much as possible) and use the DT Tag?

Kind Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Worst case, use a markup item and hand code it.

Todd

HMMM… So it would seem I am back to my first question but with a greater understanding of the DL. So how would I go about keeping this in a Freeway Pro workflow (or as least as much as possible) and use the DT Tag?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I understand the desire to do this, but I should point out that a normal
header (h1, h2, etc) before the list works just fine. Think like this:

You use an appropriate level header (h1) and follow it with paragraph(s) of
descriptive content… you do not require some extra association between
header and the content for that pairing. The same should hold true for
lists as well. Arguably, normal p content following a header can all be
wrapped in a sectioning element (like html5 section) to semantically
isolate their relationship from other content on the page - I think you can
also do that with header/list pairs to underscore their relationship.

I do understand the compulsion to treat a list like a table, to give it a
title tag or something to define the list content as a whole. Usually if I
take a breath or two, the simpler approach will win out.


Ernie


Ernie Simpson


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It doesn’t seem possible (just tried).

Walter

On Dec 7, 2013, at 3:57 PM, TeamSDA wrote:

HMMM… So it would seem I am back to my first question but with a greater understanding of the DL. So how would I go about keeping this in a Freeway Pro workflow (or as least as much as possible) and use the DT Tag?

Kind Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK… Thank you for trying Walt, much appreciated. Everyone here has given some great input. Freeway is a great tool, it can just be a little challenging to accomplish some things if the end desire is to keep the markup lean and semantically correct.

Lists have proved to be a huge challenge but once I got my head around what Freeway was doing I have had great success keeping things in Freeway but styling them in a manner that is lean and in keeping with good semantics, e.g. not using br tags, p tags and such to separate list items and add styling.

Kind Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Pseudo classes can be especially useful with lists, I use ‘em all the time for all sorts of stuff. It’s a great way to avoid adding unnecessary classes and ids to the html. Pseudos to the rescue!

Todd - the :nth-child kid

but styling them in a manner that is lean and in keeping with good semantics, e.g. not using br tags, p tags and such to separate list items and add styling.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello Walt…

I gave the DT action you baked up a go and it seems to work as expected. In my application I am in need of the DD to have a bullet. I tried applying the “list-style-type:disc” but it does not seem to work. Is this style property not able to be used with the DL?

Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You can create a style that adds the bullet (disc) to your dd elements:

dd { list-style-type: disc }

But you cannot mix and match list elements within a container element. The UL > LI combination natively creates the list-style-type: disc.

Walter

On Dec 7, 2013, at 5:50 PM, TeamSDA wrote:

Hello Walt…

I gave the DT action you baked up a go and it seems to work as expected. In my application I am in need of the DD to have a bullet. I tried applying the “list-style-type:disc” but it does not seem to work. Is this style property not able to be used with the DL?

Regards,
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options