fieldsets need legends
this post refers to the "Write" interface from WordPress utilized to post comments to WHATWG blogs.
there is well-intentioned, but mis-implemented markup in the edit form; namely, improper implemetation of the FIELDSET
.
for a proper FIELDSET
, one needs to do 4 things:
- open the
FIELDSET
(which this form does) - define a
LEGEND
for theFIELDSET
(which this form does NOT); the natural candidates forLEGEND
are the level 3 headers (H3
) classed dbx-handle so instead of repeatedly hearing "click to open this box", i would also get the pseudo-box (which i would call sub-forms)LEGEND
as an indicator of what i am about to open or close. i would also make the alt text device independent - instead of "click here to open this box", i would propose "show sub-form" and "hide sub-form" - bind individual
FORM
controls to their textual labels by use of theLABEL
element and thefor/id
mechanism that ties the form control (which takes the "id") to aLABEL
(which takes the "for") or multiple labels; theLABEL
should contain the actual, textual label, and NOT theFORM
control, as in this form; this form has the attribute set set correctly to bind theLABEL
to theFORM
control, but since theLABEL
element is opened PRIOR to theINPUT
element, no labeling is available to the user - in my case (i use a screen-reader) the sub-forms that appear when one opens aFIELDSET
to reveal aFORM
appear unlabeled to my screenreader, because of invalid markup. - close the
FIELDSET
(which this form does)