[Bug 12834] Allow LEGEND element to be wrapped in DIV

https://www.w3.org/Bugs/Public/show_bug.cgi?id=12834

--- Comment #42 from Marat Tanalin | tanalin.com <mtanalin@yandex.ru> 2011-12-11 00:16:28 UTC ---
(In reply to comment #41)

All the listed factors are inessential.

> The negative impact:
> 
>  * It makes determining what the legend of a <fieldset> is harder, because you
> have to go poking around in the DOM to find the legend.

No, it's trivial both for browsers and authors. From browser's perspective,
implementing fieldset.legend should not be harder than existing form.elements,
element.form, etc.

>From author's perspective, it's trivial too. I've have created reference
implementations for getLegend(fieldset) and getFieldset(legend) in JavaScript,
so, from now on, developers can just use these implemented function until
similar functionality is implemented natively in browsers.

For my mentioned implementations, see demo page:
http://tanalin.com/_experimentz/bugs/w3/html/wrap-legend/js/

>  * It increases the complexity of maintaining pages that use <fieldset>,
> because you can't be guaranteed that the <legend> will always be in the right
> place.

No, the essence of the my proposal is that legend should be allowed to be in
any place inside of a fieldset (for exception of inside of a nested fieldset in
which case this nested fieldset becomes legend's owner). Besides, complexity
for implementors is less essential than usability for author (see last
paragraph in my current comment below).

>  * It makes it more likely that authors will make mistakes with <fieldset>,
> because now you have to look all over the place to make sure you haven't
> already given a legend.

One of the most ridiculous arguments. Sounds like "We cannot use nested DIVs
since otherwise you have to look all over the place to make sure you have no
already an open <div> tag".

If fieldset would have more than one legend, validator will point this out as
an validation error. If author don't use validator, the he could have multiple
legends (and in any places) _right now_ regardless of whether it is allowed by
the spec or not.

>  * It makes writing editors and conformance checkers more complicated.

You've probably forgot one of fundamental HTML design principles:

    "consider users over authors over implementors over specifiers over
theoretical purity"
    http://www.w3.org/TR/html-design-principles/#priority-of-constituencies

So complication of implementation cannot be a reason to abandon a change that
would give authors more flexibility/possibilities.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Sunday, 11 December 2011 00:16:38 UTC