...

View Full Version : Links... lists or not?



rmedek
05-28-2005, 04:55 AM
So, yes, we all know that the hip and mostly semantic way to code a menu is as a list of links. But, lets say we have the de facto "text links" at the bottom of a page as an alternative to graphic rollovers:

home (#) | about us (#) | faqs (#) | links (#) | contact (#)

Is it still necessary to code this as a list? It seems that the CSS necessary to mark this up would be sort of silly considering we could just say it's a paragraph of links.

_Aerospace_Eng_
05-28-2005, 05:09 AM
I think it would be fine, but if you care about accessibility then use a list, because its easier for screen readers to read the links because there is a noticeable seperation of space between them.

rmedek
05-28-2005, 05:17 AM
I think it would be fine, but if you care about accessibility then use a list, because its easier for screen readers to read the links because there is a noticeable seperation of space between them.
How so? I would think a screen reader wouldn't care about space, only definition.

I don't have a screen reader--I'm using the Fangs beta plug-in for FF) but supposedly a list of links gets read off something like this:


"List of five items. Bullet. Link. Home. Bullet. Link. About Us. Bullet. Link ... (etc.) ... List end."

Of course, since I don't use a screen reader I could be horribly wrong. But I still don't see why space would make any difference in a non-visual renderer...

jkd
05-28-2005, 05:44 AM
"link1 | link2" is fine. If you were deadset on using lists, the required css would look like:

ul, li { display: inline; margin: 0; padding: 0; }
a::after { content: " | "; }
a:last-child::after { content: ""; }

Which won't even work in Win/IE. As long as you provide some sort of textual separation between links in source code, you are fine.

Graft-Creative
05-28-2005, 08:37 AM
I'd go with your idea Richard. After all the point of these links is to provide a quick jumping point to the other pages, without having to scroll back up to the main nav.

Marking it up as a list would obviously (in text only mode, and/or with CSS switched off) have the user scrolling down a bit more.

I can't really see a big accessibility payoff between having a *list* of such links, or having a *bunch* ( <p> ) of such links - a link is obviously a link, whether it be part of a list or not.

Maybe <a> is semantic enough, on it's own - inside or outside a list?

Kind regards,

Gary



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum