W3C home > Mailing lists > Public > www-validator@w3.org > June 2020

Nu-HTML checker - <details> as child of <figure>?

From: Joseph Polizzotto MA <jpolizzotto@berkeley.edu>
Date: Mon, 1 Jun 2020 16:34:09 -0700
Message-ID: <CAGQNLEUAvA_hYSGV9A8mCMhY9wb-9b_n_n3FVZinW5gHkGSmEQ@mail.gmail.com>
To: www-validator@w3.org, "Michael[tm] Smith" <mike@w3.org>

I would like to use <details> as a child of <figure> but get an error
message when running the Nu-HTML checker.

error: Element “details” not allowed as child of element “figure” in this
context. (Suppressing further errors from this subtree.)

I believe my use of <details> as a child of <figure> is flagged because I
am also using <figcaption> within the same <figure>. When <details> is a
child of <figcaption> within the <figure>, the error goes away.

I also noticed that when I use <details> as a child of <figure> that does
not have <figcaption>, there is no error.

I am wondering why the Nu_HTML validator allows <details>1) as a child of
<figcaption> and 2) as a child of <figure> when there is no <figcaption>,
but not 3) as a child of <figure>, which also has <figcaption>.

Note: I have tested <details> as a child of <figure> with a <figcaption>
with Firefox, Chrome, and Edge and noticed that these browsers do support
this combination.

Thanks for your help,


*Alternate Media Supervisor*
Disabled Students' Program
University of California, Berkeley
(510) 642-0329
Received on Monday, 1 June 2020 23:34:59 UTC

This archive was generated by hypermail 2.4.0 : Monday, 1 June 2020 23:35:00 UTC