This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28728 - fix definition of "palpable content" to mean what it actually should mean
Summary: fix definition of "palpable content" to mean what it actually should mean
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-01 12:49 UTC by Michael[tm] Smith
Modified: 2015-08-28 08:03 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2015-06-01 12:49:45 UTC
The list of "palpable content" elements at https://html.spec.whatwg.org/multipage/dom.html#palpable-content includes some elements that don't belong in that category; in particular, it has some void elements (`input`, `img`, `keygen`) that should be removed from the list. And maybe some others.
Comment 1 Simon Pieters 2015-06-02 14:10:23 UTC
What's wrong with <p><img ...></p>?
Comment 2 Michael[tm] Smith 2015-06-03 05:09:41 UTC
(In reply to Simon Pieters from comment #1)
> What's wrong with <p><img ...></p>?

Yeah I was misreading the spec. I had thought it was defining palpable content elements as elements that must contain some kind of "palpable" content. Instead on re-reading I see it's defining palpable content elements as those elements that themselves constitute palpable content.

Incidentally I also notice that the list in the spec is prefixed with "The following elements are palpable content" and then at the end of that list includes "Text that is not inter-element whitespace" which clearly is not actually an element.

I also don't understand how an element that doesn't contain descendant text that isn't inter-element whitespace can be considered "palpable content". How is that "palpable"?

So I think the spec would still benefit from some further clarification here; I think it could be simplified by saying something like, "An element contains palpable content if it either has descendant nodes with text that is not inter-element whitespace, or if it has descendant nodes that are images (img and canvas elements), or audio or video elements, or non-hidden form controls.
Comment 3 Michael[tm] Smith 2015-08-28 04:32:36 UTC
I don't feel strongly about this to keep it open. I (or somebody) can re-raise it at github if we want to re-pursue it in the future.
Comment 4 Simon Pieters 2015-08-28 08:03:49 UTC
(In reply to Michael[tm] Smith from comment #2)
> I also don't understand how an element that doesn't contain descendant text
> that isn't inter-element whitespace can be considered "palpable content".
> How is that "palpable"?

Such an element, if it allows flow content or phrasing content, should itself also have palpable content. So in the following example, the p has palpable children but the span doesn't:

<p><span></span></p>