WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: screen readers and empty paragraphs


From: Moore, Michael
Date: Nov 12, 2008 3:00PM

I agree with Yucca, but I did try a short contrived experiment using
JAWS 9 and IE7.

I found that JAWS would report a "blank" for the first occurrence in a
series of <p>&nbsp;</p>. JAWS completely ignored <p></p>. The
interesting consequence of this was that if two headings were separated
by <p></p> or a series of <p></p> then JAWS would read the headings in a
continuous stream when reading by sentence, alt+down arrow, or
paragraph, cntrl+down arrow. Normal behavior would have been to stop
after each heading. Reading was exactly as expected when reading by
line, word, letter, or in say all mode.


-----Original Message-----
[mailto: <EMAIL REMOVED> ] On Behalf Of Jukka K.
Sent: Wednesday, November 12, 2008 3:46 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] screen readers and empty paragraphs

Angela French wrote:

> Can anyone tell me if there are any ramifications (for screen readers)
> for empty paragraphs tags?

You mean empty paragraph _elements_.

According to HTML specifications,
1) Authors should not use empty paragraphs.
2) User agents should ignore them.
But we need to add:
3) User agents don't always ignore them. Visual user agents may leave
empty space. I would not be surprised if some aural user agents treated
as causing some extra pause.

The conclusion is that you should not use empty paragraphs. But if
pages contain them, you should probably spend your time more
than removing empty paragraphs. Beware that they may have been inserted
purpose, for spacing, and they may have that effect, so layout might get

changed. It is of course possible to create spacing using CSS, but
up existing pages is usually waste of time, and risky.

Actually it is probably much more common to have a paragraph that
contains a
no-break space only, <p>&nbsp;</p>. It tends to cause spacing worth of
empty line. It is technically not empty, so in principle HTML specs
say anything specific about them, but the spirit there is clearly that
spacing should be achieved using style sheets, not trickery with dummy

> For example: <p></p>

Or for example the paragraph element in

<h2>Hello world</h2>

The old, 1990-style habit of using <p> as a paragraph _terminator_ often

creates unintended empty paragraphs.

Yucca, http://www.cs.tut.fi/~jkorpela/