2012-01-16 23:08:59: Created issue 'Allow wrapping LEGEND (or new iLEGEND) in non-FIELDSET elements' nickname legend-placement owned by Sam Ruby on product HTML 5 spec, description 'Raised on behalf of Marat Tanalin and
Section: "The legend element"
Wrong spec part: "Contexts in which this element can be used: As the first
child of a fieldset element."
This is bad and harmful requirement. LEGEND should be allowed to be placed
inside DIV (_common_ container element) as well as after any other element.
"First child" requirement makes many visual designs unimplementable. For
example, DIV-wrapping might be needed to place something to the left of legend
with arbitrary paddings and so on.
Currently, web developers are forced to just _drop_ LEGEND element in such
cases and just use another element (e.g. H2-H6 element) instead of LEGEND when
exactly LEGEND would be more appropriate than H2, but is not allowed just
because "validator said this is invalid".
Spec should not force web developers to use wrong semantic solutions. Using H2
(or any other element) in place of LEGEND (where actually LEGEND is
semantically appropriate) is wrong.
Probable correct description for contexts in which LEGEND can be used:
"First _structural_ (semantic) parent element of LEGEND should be FIELDSET".
This means that FIELSET can contain any number of nested DIV elements, and
LEGEND may be inside one of them as well as (but NOT only allowed) direct
child of FIELDSET, and order of elements (including LEGEND) inside FIELDSET
can be _any_ that is necessary in a specific case (LEGEND should NOT be needed
to be exactly first semantic child of FIELDSET).
Otherwise, LEGEND will be just dropped by web developer in cases when LEGEND
just cannot be exactly first child according to specific visual design layout.' non-public [Sam Ruby]