E-mail List Archives
Re: <td> Vs <th> tags for use of scope attribute and headers in data tables
From: Jared Smith
Date: Feb 10, 2012 8:21AM
- Next message: Steve Faulkner: "Re: Do any of the web accessibility developer tools visually show ARIA landmarks?"
- Previous message: Birkir R. Gunnarsson: "Do any of the web accessibility developer tools visually show ARIA landmarks?"
- Next message in Thread: None
- Previous message in Thread: Michael Burks: "
Vs tags for use of scope attribute and headers in data tables" - View all messages in this Thread
On Fri, Feb 10, 2012 at 8:04 AM, Michael Burks wrote:
> I am interested in what people think about using the <td> tag instead of the
> <th> tag for row headers when using the scope attribute.
From a standards standpoint, it's a bit ambiguous in the HTML4/XHTML
specifications. Scope is allowed on both <th> and <td>, and the spec
states, "TH is for headers, TD for data, but for cells acting as both
use TD." Nearly all header cells (especially when there are both
column and row headers) could seemingly act as both.
In HTML5, the scope attribute is only allowed on <th> elements, not on <td>.
From a functional standpoint, the presence of <th> elements is a
primary mechanism used by browsers and assistive technologies to
identify and provide functionality for data tables, as opposed to
layout tables. It's been a few years since I tested, but I don't think
screen readers do anything special with scope on <td>s.
In short, if it's a header, use <th>.
Jared
- Next message: Steve Faulkner: "Re: Do any of the web accessibility developer tools visually show ARIA landmarks?"
- Previous message: Birkir R. Gunnarsson: "Do any of the web accessibility developer tools visually show ARIA landmarks?"
- Next message in Thread: None
- Previous message in Thread: Michael Burks: "
Vs tags for use of scope attribute and headers in data tables" - View all messages in this Thread