WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Legend wrap (or not)


From: Stephanie Sullivan
Date: Aug 28, 2007 4:40PM

On Aug 28, 2007, at 4:12 PM, Keith Parks wrote:

> So to clarify, in Safari you're seeing the text within a Fieldset
> Legend does not wrap when the width of the Fieldset is specified in
> EMs? Or is it the width of an element enclosing the Fieldset that has
> a specific width applied? (Just trying to replicate.)

Nope... in Safari it DOES wrap (which is causing the problem when I
use the <br> element to force the wrap in the browsers that won't do
it automatically)... in Safari (and Opera), it wraps automatically (a
word before the <br) and then wraps again where the BR is. Ug-ly!

On a Mac, legends will wrap automatically in Opera, Safari,
Explorer ... the do not in Netscape, Mozilla, FireFox ... (Obviously
the Moz-based browsers) On a PC, they don't wrap in Netscape,
Mozilla, FireFox, IE ... Someone said that you could use a width on
the legend in IE to force the wrap, but I didn't find that to be true
in my case.

For my situation, the form has a width of 34em ... the fieldset has
no border or styling really -- it's just used for semantics. It does
not have a width, but I've also tried it WITH a width with no
difference in rendering ... The legend is styled with a fairly large
font (it used to be an h2) and the lines where there is too much to
fit on a line and need to wrap are where I'm running into trouble due
to the above wrap/no wrap issues...

Does that help? :)

Stephanie Sullivan
Dreamweaver Task Force for WaSP