Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do <td> elements inside a <thead> get automagically promoted to act like <th> #8650

Closed
patrickhlauke opened this issue Dec 26, 2022 · 6 comments · Fixed by #9552
Closed

Do <td> elements inside a <thead> get automagically promoted to act like <th> #8650

patrickhlauke opened this issue Dec 26, 2022 · 6 comments · Fixed by #9552

Comments

@patrickhlauke
Copy link
Member

patrickhlauke commented Dec 26, 2022

Picking up from an old conversation over here w3c/html#819 there seemed to be some throughs from @LJWatson that, due to the wording for the <thead> element https://html.spec.whatwg.org/#the-thead-element there's a clear indication/implication that a <td> inside a <thead> will also automagically be considered the same as a <th> ?

However, if that is indeed the intention, this concept should be explicitly explained, particularly in the definition for the <td> element itself? https://html.spec.whatwg.org/#the-td-element

/cc @chaals @stevefaulkner

@patrickhlauke patrickhlauke changed the title Do <td> elements inside a <thead> get automagically promoted to <th> Do <td> elements inside a <thead> get automagically promoted to act like <th> Dec 26, 2022
@andrewnicols
Copy link

Anything we can do to help facilitate this discussion and get an outcome?

@patrickhlauke
Copy link
Member Author

Returning to this dangling thread ... I believe the situation touched on in w3c/html#819 is still handwaved/unresolved here. I think it would be worth to unambiguously work out if <td> elements inside the <thead> are to be essentially treated as <th> elements (and that they should be exposed as such in the accessibility tree) due to the wording in the spec

The thead element represents the block of rows that consist of the column labels (headers)

or if there is no such intention of implicitly "upgrading" a <td> to a <th> when it's inside a <thead>, in which case the wording in the spec may need to be expanded to provide more nuance.

/cc @LJWatson @chaals @stevefaulkner

@stevefaulkner
Copy link
Contributor

-1 from me, it is not uncommon the have a <td> element in a <thead> that does indeed represent a <td> not a <th>

@patrickhlauke
Copy link
Member Author

@stevefaulkner so -1 meaning "the phrasing in the spec should be reworded to give more nuance", i assume...

@scottaohara
Copy link
Collaborator

seems like this could be updated to say something like:

...that consist of the column labels (headers) and related cells for the parent table element,...

the first example provided in this section uses td elements to provide a description of what the previous row of actual table header represents - so to me that seems an overt example that td isn't intended to universally become table headers.

@patrickhlauke
Copy link
Member Author

Proposed a small tweak #9552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants