tags:

views:

52

answers:

2

I need to markup a ladder for upcoming tournaments, and I can't find any way to mark it up semantically. The only way I've seen so far is to mark it up as a table, and I'd like to avoid that at all costs.

Any ideas?

+1  A: 

I've found one example at Accessible NCAA Tournament Bracket which uses a mix of ul/li to achieve it. It's far from perfect (it could uses li + li instead of the "top/bottom" classes, but it's a start.

fserb
What exactly do you mean by '`li + li` instead of the "top/bottom" classes'? The list does use `li` tags for that. Great example though, thanks!
Ryan McCue
I meant you could have css rules for `li` with `li` sibling to separate the first li from the second, instead of having to mark them `<li class='top'>` as they do on the example.
fserb
A: 

I'd do it like this, although would also maybe add title attributes to the list items also in order to make the horizontal relationship more accessible

eg <li class="gameThree" title="winner of round One game 2 vs winner of round one game 5">

<ol id="tournamentLadder">
<li id="roundOne">
<ul class="matches">
    <li class="gameOne>
        <ol class="teams">
            <li class="home">Teamname1</li>
            <li class="visitors">Teamname2</li>  
        </ol> 
    </li>
</ul>

</li>
<li id="roundTwo">

</li>


<li id=final">
</li>

</ol>
wheresrhys
I disagree with using a `ul` for `.matches`, as it should be ordered. Thanks though!
Ryan McCue