WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: nobr

for

Number of posts in this thread: 4 (In chronological order)

From: Penny Roberts
Date: Tue, Dec 06 2005 8:20AM
Subject: nobr
No previous message | Next message →

Greetings list,
Leaving aside the fact that <nobr> is not valid I would imagine that it
could have some accessibility/usability problems: for instance if it
were used on a very long section of text it would require horizontal
scrolling. Would there be any accessibility issues with it being used
on a few words or as part of a form to keep form elements together? (No,
I'm not using it, someone else might be.)

Penny




From: Jukka K. Korpela
Date: Tue, Dec 06 2005 9:00AM
Subject: Re: nobr
← Previous message | Next message →

On Tue, 6 Dec 2005, Penny Roberts wrote:

> Leaving aside the fact that <nobr> is not valid

It is not valid when DTDs defined by the W3C are used. It is valid if you
use a suitable DTD; see
http://www.cs.tut.fi/~jkorpela/html/nobr.html#valid

> I would imagine that
> it could have some accessibility/usability problems:

It could. So could lack of it. When a string is broken into two lines in
an appropriate way, it can be difficult to many and impossible to some to
recognize the intended meaning. For example, if the string "-42", where
the hyphen is meant to act as a minus sign, is broken into "-" and "42",
difficulties arise.

> for instance if it were
> used on a very long section of text it would require horizontal scrolling.

That is correct. Here the basic question is prevention of line breaks, not
the technique used for it. The <nobr> markup is the technique that works
often and has no side effects, but there are many other techniques,
such as the nowrap attribute in a table cell, the no-break space, and
the word joiner (WJ) character

> Would there be any accessibility issues with it being used on a few words or
> as part of a form to keep form elements together? (No, I'm not using it,
> someone else might be.)

It's always possible that anything that creates a lower limit for the
canvas width causes problems to some users. The risk is negligible,
however, if you use <nobr> or other line break prevention technique to
"glue" two short words together. Besides, such "glueing" may improve
readability. Form fields are a different issue, and the prime rule for
forms fields should be: one field on one line, with label before the field
(or after it, for radio buttons and checkboxes). This is useful for
clarity and helps people with cognitive disabilities. Therefore, the idea
of forcing two fields to stay on one line is very questionable. On the
other hand, it might be a good idea to try to ensure that the label and
field are on the same line. They should normally be so short that this
should not be a problem.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/





From: Penny Roberts
Date: Tue, Dec 06 2005 10:20AM
Subject: Re: nobr
← Previous message | Next message →

Jukka K. Korpela wrote:
> On Tue, 6 Dec 2005, Penny Roberts wrote:
>
>> Leaving aside the fact that <nobr> is not valid
>
>
> It is not valid when DTDs defined by the W3C are used. It is valid if
> you use a suitable DTD; see
> http://www.cs.tut.fi/~jkorpela/html/nobr.html#valid

Thanks, I'll bookmark that.

> It could. So could lack of it. When a string is broken into two lines in
> an appropriate way, it can be difficult to many and impossible to some
> to recognize the intended meaning. For example, if the string "-42",
> where the hyphen is meant to act as a minus sign, is broken into "-" and
> "42", difficulties arise.

From your article I gather that inappropriate line/word division is an
IE (and older Opera) bug. Does anyone know whether it is in the IE7 fix
list? (I don't recall seeing it on Chris Wilson's list of "bang your
head on the desk" bugs.) Is Opera 8 better behaved?


> for clarity and helps people with cognitive disabilities. Therefore, the
> idea of forcing two fields to stay on one line is very questionable. On
> the other hand, it might be a good idea to try to ensure that the label
> and field are on the same line. They should normally be so short that
> this should not be a problem.

I think that it will be to glue together label, field and submit button
so it seems that it will be an acceptable use.

Thanks for the reply, that helps a lot.

Penny





From: Tim Beadle
Date: Tue, Dec 06 2005 11:40AM
Subject: Re: nobr
← Previous message | No next message

On 06/12/05, Penny Roberts < = EMAIL ADDRESS REMOVED = > wrote:
> I think that it will be to glue together label, field and submit button
> so it seems that it will be an acceptable use.

Penny,

in your style sheet, apply white-space: nowrap; to the element that
encloses the elements in question (possibly a fieldset?)

Regards,

Tim