Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts

    Links... lists or not?

    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.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Quote Originally Posted by _Aerospace_Eng_
    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...

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    "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.

  • #5
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •