Currently, there is a major difference between the two specs on how to add attribution to blockquote elements. Ignoring the fact that the W3C allows the attribution to be _inside_ the blockquote and the WHATWG doesnât, the two specs allow the figure element to be used as a way to give attribution, but differ in how.
The WHATWG recommends the usage of the figcaption element to give the attribution:
https://html.spec.whatwg.org/multipage/semantics.html#the-blockquote-element
Here a
blockquoteelement is used in conjunction with afigureelement and itsfigcaptionto clearly relate a quote to its attribution.
The W3C explicitly abolishes this:
https://www.w3.org/TR/html/grouping-content.html#the-blockquote-element
In the example above, the citation is contained within the
<footer>of a<figure>element, this groups and associates the information, about the quote, with the quote. The<figcaption>element was not used, in this case, as a container for the citation as it is not a caption.
I believe that the W3C has the best interpretation of the figcaption element; it should be used to describe the figure, which an attribution is clearly not doing. A footer, however, should be used to contain data about itâs containing section (such as an attribution). Both specs clearly state that _âthe footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the likeâ_.
If continuing to allow the figcaption element to be used to give attribution is highly preferred by the WHATWG, then I believe it should at least be noted in the spec that using a footer is also accepted; so to allow authors to write HTML documents that conform to both specifications.
Can you make your arguments without reference to the fork? I.e., do they stand on their own merits, independent of what another group has done?
It's a fact of life that after forking our work the W3C has changed the document conformance requirements in ways that make it hard to write documents that conform to both. But that's not something that's under our control, or something we intend to use as input to our decisions. Anyone can make up requirements that contradict the HTML Standard, and we're not interested in changing the HTML Standard to be compatible with such requirements.
In fact, I believe this needs to be closed, since we have no intention of associating footers with figures. They are part of the sectioning model, and as such are associated with their _section_, not with any figure.
If you put a footer inside a figure element, what you are stating is that the footer itself is the figure contents, and figcaption (if any) is used to caption the footer. This will not be changing.
@domenic
Can you make your arguments without reference to the fork? I.e., do they stand on their own merits, independent of what another group has done?
Yes, as I said, the caption of a figure should describe it, which an attribution is clearly not doing.
In fact, I believe this needs to be closed, since we have no intention of associating footers with figures.
They already are associated with figures:
The
footerelement represents a footer for its nearest ancestor sectioning content or sectioning root element.
Itâs important to note that figures are sectioning roots.
Yes, as I said, the caption of a figure should describe it, which an attribution is clearly not doing.
Great. In the future, your bug reports could be as short as this :).
However, that is not what a figcaption represents. "The figcaption element represents a caption or legend for the rest of the contents of the figcaption element's parent figure element, if any." There's no restriction on what an author might want to put in their caption or legend; attribution is a very legitimate thing to put in there. I imagine you could find many figures in textbooks, papers, or books that are captioned with attribution information.
Note how the blockquote section you cite gives the figure/figcaption method of showing attribution as one of many possibilities. In that case, the author clearly thought that making a figure out of the quotation, and captioning it with attribution information, was a good way of representing their intended semantics. But in the other examples, the author thought differently.
Itâs important to note that figures are sectioning roots.
Thanks, I clearly missed that!
Great. In the future, your bug reports could be as short as this :).
Haha, fair enough :stuck_out_tongue_closed_eyes:. I just wanted to give some context, though :smile:.
There's no restriction on what an author might want to put in their caption or legend
I canât argue against this, it seems to be a matter of opinion. I believe itâs best to use figcaptions only to describe the figure and use more semantical elements (such as footer) to associate other kinds of information with the figure. As I said, I think itâd be best to at least mention the usage of footer as legitimate way to give attribution.
I'm not sure exactly what using a footer inside a figure means what you think it means. I could use some help from other editors (or anyone, really) on this. Given:
<figure>
<img src="foo.jpg" alt="Foo">
<footer>Posted two days ago</footer>
</figure>
It seems like there are two contradictory things going on:
I guess part of the problem is the lack of examples of using footer where the nearest ancestor sectioning content or sectioning root is a sectioning root, but is not sectioning content. I am not sure what that scenario is supposed to mean.
Given the high amount of real-world insertion of attribution into figure captions, I agree that trying to draw a distinction between "stuff that goes in FIGCAPTION" and "stuff that goes in a FOOTER inside of FIGURE" is mostly going to be semantic wankery. Those sorts of hair-thin distinctions don't tend to serve authors well, and instead promote confusion among people who care deeply about accessible standardized markup, and get ignored by people just trying to get pages written.
The important question to ask is "is the distinction between A and B actually important for machines (and people who are viewing the page with the aid of machines, like screen-readers) to understand"? I think the answer here is "no, or at least pretty low value".
@domenic
So, what youâre saying is that the footer, according to the spec, would be both the container for information for the figure and part of the content of the figure?
@tabatkins
It doesnât feel like a âhairâthinâ distinction to me. For me, itâs pretty clear: the caption of a figure should describe the figure. If it doesnât describe the figure, then it shouldnât be inside figcaption.
@Zambonifofex I believe so, but I'm not sure.
I tend to agree with @tabatkins that trying to tell people what content they are allowed to put in figcaptions (beyond just "a caption for the figure") will cause more harm than good.
@Zambonifofex You're not providing a _reason_ to separate them. Semantics for semantics sake is "semantics wankery", as I rudely alluded to; it doesn't help anybody and just produces confusion. You get the best bang for your buck (well-authored pages that people actually bother to write) by having a small, maximally useful set of expressible semantics.
Which semantics you choose to expose should be based on what is _useful in practice_ to expose: if you're using a page via a screen reader, how much does it help to have your screen reader distinguish between "text describing the image" vs "attribution for the image"? If this _is_ a useful distinction, why haven't books made such a distinction today, in ways that are parsable visually? (In general, if something isn't typically visually distinguishable, it's _usually_ not a sufficiently useful semantic to be worth encoding; if it's not worthwhile to convey to sighted readers, it's probably not useful to convey to machine-assisted readers.)
(For example, the attempt to slice the semantics of italics up very finely is mostly a failure; people still use mostly <i> for everything, or (unfortunately) use <em> for everything. The meaning of italics is typically clear from context; we don't visually indicate the difference between a french word and a ship name and a Latin species name and some emphasized text - they're all just italicized, and we understand what that style is indicating in each instance. It can be argued that <em> is still useful to slice out from the other uses of <i>, both because emphasis is sometimes communicated in ways other than italics, and because emphasis is _spoken_ differently than the other uses, but that's about the most I think that can be reasonably argued for.)
So, back to figures. What benefit do readers - sighted, screen-reading, search-engine, etc - gain from separating the description from the attribution, and why is that benefit not sufficiently worthwhile for print books to make the separation visually obvious?
I think @Zambonifofex has conceded that his preference against using figcaption for attribution captions is just a personal preference. What remains is the confusion about what putting a footer inside a figure even means. (Or more generally, what putting a footer inside any element that is a sectioning root but is not sectioning content.) It might be worth straightening that out, to see if his preferred alternate pattern of using a footer makes any sense.
@tabatkins
I think what bothers me most is that the normative definition of figure and figcaption of both standards are effectively the same. What makes both standards differ is the nonânormative examples. I think that this comes from the fact that the definition of figcaption is really vague. It simply says that _âthe figcaption element represents a caption or legend for the rest of the contents of the figcaption element's parent figure element, if anyâ_ without ever defining what âa caption or legendâ is supposed to be.
Iâm simply suggesting saying that itâs supposed to describe its respective figure because itâs to my understanding closer to the W3Câs interpretation. Itâs also what makes more semantical sense _to me_.
Closing since there doesn't appear to be an action item here.
@domenic
Sorry for asking so plainly, but is it, then, conforming to use a footer to represent attribution for a blockquote in a figure?
It's certainly conforming. Whether it conveys the semantics to those reading your code in a way that others will understand is unclear; if I was reading that code, I would be thinking that you were trying to display a figure with no caption, but whose contents were a footer.
Most helpful comment
Given the high amount of real-world insertion of attribution into figure captions, I agree that trying to draw a distinction between "stuff that goes in FIGCAPTION" and "stuff that goes in a FOOTER inside of FIGURE" is mostly going to be semantic wankery. Those sorts of hair-thin distinctions don't tend to serve authors well, and instead promote confusion among people who care deeply about accessible standardized markup, and get ignored by people just trying to get pages written.
The important question to ask is "is the distinction between A and B actually important for machines (and people who are viewing the page with the aid of machines, like screen-readers) to understand"? I think the answer here is "no, or at least pretty low value".