Forum Moderators: not2easy

Message Too Old, No Replies

Tables for navigation

Why can't navigation be considered 'tabular data'?

         

thesheep

8:55 pm on Mar 6, 2005 (gmt 0)

10+ Year Member



There are times when it can be a lot more straight forward to style a navigation bar if you use a single row table rather than an unordered list. I know it's not good to use tables for layout but I started thinking about this navigation issue and it occurred to me that books have a 'table of contents' so it seems kind of appropriate that navigation should be in a table.

For accessibility in the table you could have something like

<summary="Main navigation table">

What do people think?

MatthewHSE

10:10 pm on Mar 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I consider navigation to be "lists" of links. Therefore I believe <ul> or <ol> to be the best layout choices.

That said, I can think of instances when tables would be the better choice. But my humble opinion is that these instances should be rare. ;)

createErrorMsg

3:03 am on Mar 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IMO, tables are for data that is best understood when displayed in rows and columns. Although you could say a navbar is a single row table with each link as a column, I think this is a bit of a stretch.

Also, bear in mind that a book's "Table of Contents" has a chapter title and a page number for each "row." That's two columns; i.e., a table. If it were just a list of chapter titles, with no correlating information, I think it would be more accurately described as a List of Contents. Since this is what a nav menu is, I'm with MatthewHSE on this one: a <ul> or <ol> is the better choice.

That said, at least a single row table as a nav bar doesn't violate the main accessibility problems with using tables for layout, namely it keeps the information in the source code linear. If kept in check, this sort of use of tables strikes me as forgivable.

cEM