SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Table Headers

Hybrid View

  1. #1
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table Headers

    I wanted to discuss table headers since most authors disclude these when marking up tabular data. I know that a lot of the time these attributes aren't needed and can cause more of an annoyance issue with screen readers (thus most people not using these), but some times these are needed and unused.

    I tend to wonder if a lot of authors don't know what these are or just forgetful thinking?

    I use table headers usually for microformatted hcalendar events when I want to import certain headers.

    So my question being is do you guys/girls use header attributes or leave these out(in cases where headers are needed)?

    http://www.webaim.org/techniques/tables/data.php#id
    Last edited by cooper.semantics; Apr 27, 2009 at 16:52.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use the headers attribute, except for really trivial tables.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I haven't used the headers attribute much, because I use scope which works pretty well on regular tables. I used headers once, and if you're going to have id's on all your header elements (th) and first td's anyways then it doesn't hurt, and might help the odd user agent who doesn't use scope correctly (I've heard someone doesn't but dunno who).

    Headers is pretty much necessary when you have an irregular table, though. I also found out JAWS supports axis so this can also work well with headers atty if it's a complicated or weird table.

    Back when headers was left out of the HTML5 spec, there was a lively (um, yes, lively) discussion about the attribute at Juicy Studio. Tommy might have even commented on that one, don't remember. But it had lots of people piping up about when they used headers attys.

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    might help the odd user agent who doesn't use scope correctly (I've heard someone doesn't but dunno who).
    I believe JAWS 6 doesn't support scope, although I can't test it right now. I've been told that newer versions do, but I haven't tried them.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Axis:
    This attribute may be used to place a cell into conceptual categories that can be considered to form axes in an n-dimensional space. User agents may give users access to these categories (e.g., the user may query the user agent for all cells that belong to certain categories, the user agent may present a table in the form of a table of contents, etc.).
    http://www.w3.org/TR/html401/struct/tables.html

    HTML5:
    Table headers can now have headers. User agents are required to support a headers attribute pointing to a td or th element, but authors are required to only let them point to th elements.
    http://dev.w3.org/html5/html4-differences/


Bookmarks

Posting Permissions

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