Closed
Bug 704465
Opened 13 years ago
Closed 12 years ago
any element pointed @headers attribute should be exposed as table header
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
6.08 KB,
patch
|
tbsaunde
:
review+
|
Details | Diff | Splinter Review |
spun off bug 702978 comment #2-#3.
Assignee | ||
Comment 1•13 years ago
|
||
Steve, but if we are going to expose any element pointed by @headers attribute then we need to decide whether it should be exposed as column header or as row header (that APIs requires us to do). We could exposed those unmapped as relations like labelled_by but I'm not sure. Ideas?
Comment 2•13 years ago
|
||
OK, I was assuming that headers references can/should only be pointing to col/row headers in the same table, as per spec:
http://dev.w3.org/html5/spec-author-view/attributes-common-to-td-and-th-elements.html#attr-tdth-headers
"The td and th element may have a headers content attribute specified. The headers attribute, if specified, must contain a string consisting of an unordered set of unique space-separated tokens that are case-sensitive, each of which must have the value of an ID of a th element taking part in the same table as the td or th element."
Assignee | ||
Comment 4•12 years ago
|
||
Note, bug 877386 has an example, testcase and some discussion.
Assignee | ||
Comment 5•12 years ago
|
||
it seems the best what we can do here is summarized by bug 877386 "Table headers not associated when header is a td element with no scope"
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #757281 -
Flags: review?(trev.saunders)
Comment 6•12 years ago
|
||
Comment on attachment 757281 [details] [diff] [review]
patch
I'll never understand why html was designed this way but I guess we have to deal.
Attachment #757281 -
Flags: review?(trev.saunders) → review+
Comment 7•12 years ago
|
||
To make matters more confusing, HTML 4.01 and HTML 5 say different things about this.
HTML 4.01 says headers can point at either td or th:
> Note that it's not always possible to make a clean division of cells into headers or data. You should use the TD element for such cells together with the id or scope attributes as appropriate.
(http://www.w3.org/TR/html4/struct/tables.html#h-11.4.1)
HTML 5 (as referenced in comment 2) says headers can only point at th:
> The td and th element may have a headers content attribute specified. The headers attribute, if specified, must contain a string consisting of an unordered set of unique space-separated tokens that are case-sensitive, each of which must have the value of an ID of a th element taking part in the same table as the td or th element.
(http://dev.w3.org/html5/spec-author-view/attributes-common-to-td-and-th-elements.html#attr-tdth-headers)
I guess we still need to support HTML 4.01. :(
Assignee | ||
Comment 8•12 years ago
|
||
the example above seems valid (th has styling, td doesn't have so using td to describe other cells seems reasonable and thus it's also reasonable to expose them as headers).
Steve, you know why HTML5 doesn't allow td anymore?
Flags: needinfo?(faulkner.steve)
Assignee | ||
Comment 9•12 years ago
|
||
Flags: in-testsuite+
Comment 10•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Comment 11•12 years ago
|
||
(In reply to alexander :surkov from comment #8)
> the example above seems valid (th has styling, td doesn't have so using td
> to describe other cells seems reasonable and thus it's also reasonable to
> expose them as headers).
>
> Steve, you know why HTML5 doesn't allow td anymore?
I don't know why (wasn't my doing and can't find paper trail). My advice would be to honour the headers relationships whether they point to td or th. The forbidding of headers references being a td should only be for authors not implementers. If this is not clear in the spec [1], please file a bug [2]
[1] http://www.w3.org/html/wg/drafts/html/master/tabular-data.html#attr-tdth-headers
[2] https://www.w3.org/Bugs/Public/enter_bug.cgi?product=HTML%20WG&component=HTML5%20spec&priority=P3
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(faulkner.steve)
Comment 12•12 years ago
|
||
The parts of the spec that were being cited in this bug are the wrong parts of the spec, by the way. Those are the authoring requirements. For a browser, you only want to be looking at the conformance requirements for user agents, which do require that headers="" work whether pointing to a <td> or a <th>:
http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#header-and-data-cell-semantics
You need to log in
before you can comment on or make changes to this bug.
Description
•