WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Empty <P> Tags For Spacing

for

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

From: Peter Shikli
Date: Mon, Feb 07 2022 9:47PM
Subject: Empty <P> Tags For Spacing
No previous message | Next message →

The use of empty <p> tags to provide space between paragraphs in a
webpage...Is this a strict violation in the WCAG principles, or is it
something that is just a nuisance and could be “suggested” as a removal
to the owner of the page?

I couldn't find any answers in my resources about CSS and HTML failures.
The closest I came was the technique G115: Using semantic elements to
mark up structure, which specifies: “The objective of this technique is
to mark up the structure of the Web content using the appropriate
semantic elements. In other words, the elements are used according to
their meaning, not because of the way they appear visually.”

Am I looking at this in the correct manner, and/or are there other
techniques, or a hard and fast rule that I can apply when I am examining
a webpage? I really appreciate the help.

Peter Shikli on behalf of analyst
Danielle Cox
Access2online Inc.
www.access2online.com
Prison inmates helping the internet become accessible

From: Steve Green
Date: Mon, Feb 07 2022 11:05PM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

I'm not convinced it's a WCAG non-conformance, and I'm not sure it's even a nuisance. Does it have any impact on anyone?

Empty <P> tags are a big problem in PDFs, though. They cause JAWS (and possibly other screen readers) to say "blank", which we regard as a user experience issue, not a WCAG non-conformance. More importantly, if they occur in lists, they break the list structure, which definitely is a WCAG non-conformance. We see this a lot in PDFs created in Word and PowerPoint.

Steve Green
Managing Director
Test Partners Ltd


From: chagnon
Date: Mon, Feb 07 2022 11:54PM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

I'm under the impression that empty tags, although not explicitly covered by either WCAG or PDF/UA standards, will become better defined in the future.
Steve Green's comments are spot on.

They also disrupt many technologies as they attempt to reflow the content to meet the user's particular technology, preference settings, and needs. They really are a negative for all users, not just those using assistive technologies.

Coming from the professional publishing industry, I can say that they are banned there because of the problems they cause when publishing across multiple media. If they affect those computers, they'll also affect the computers and A T used by those with disabilities. "Machine readable" means all machines and technologies.

—Bevi
— — —
Bevi Chagnon | Designer, Accessibility Technician | = EMAIL ADDRESS REMOVED =
— — —
PubCom: Technologists for Accessible Design + Publishing
consulting ' training ' development ' design ' sec. 508 services
Upcoming classes at www.PubCom.com/classes
— — —
Latest blog-newsletter – Simple Guide to Writing Alt-Text

From: Swift, Daniel P.
Date: Tue, Feb 08 2022 5:36AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

While I don't think it's an accessibility issue, my opinion is that empty paragraph tags should be removed and the spacing should be addressed using CSS.

Daniel Swift, MBA
Senior Web Specialist
University Communications and Marketing
West Chester University
610.738.0589

From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Peter Shikli
Sent: Monday, February 7, 2022 11:48 PM
To: WebAIM Forum < = EMAIL ADDRESS REMOVED = >
Subject: [WebAIM] Empty <P> Tags For Spacing

The use of empty <p> tags to provide space between paragraphs in a
webpage...Is this a strict violation in the WCAG principles, or is it
something that is just a nuisance and could be “suggested” as a removal
to the owner of the page?

I couldn't find any answers in my resources about CSS and HTML failures.
The closest I came was the technique G115: Using semantic elements to
mark up structure, which specifies: “The objective of this technique is
to mark up the structure of the Web content using the appropriate
semantic elements. In other words, the elements are used according to
their meaning, not because of the way they appear visually.”

Am I looking at this in the correct manner, and/or are there other
techniques, or a hard and fast rule that I can apply when I am examining
a webpage? I really appreciate the help.

Peter Shikli on behalf of analyst
Danielle Cox
Access2online Inc.
www.access2online.com<;http://www.access2online.com>;
Prison inmates helping the internet become accessible

From: Karen McCall
Date: Tue, Feb 08 2022 6:02AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

I agree!

Cheers, Karen

From: Duff Johnson
Date: Tue, Feb 08 2022 7:01AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

> On Feb 8, 2022, at 01:05, Steve Green < = EMAIL ADDRESS REMOVED = > wrote:
>
> I'm not convinced it's a WCAG non-conformance, and I'm not sure it's even a nuisance. Does it have any impact on anyone?

…and even if it does have an impact it seems like a AT problem, not a file-format issue.

> Empty <P> tags are a big problem in PDFs, though. They cause JAWS (and possibly other screen readers) to say "blank", which we regard as a user experience issue, not a WCAG non-conformance.

IMO, this is a description of what screen-readers are choosing to do… and they should choose otherwise. That a PDF might include an empty <P> does not force AT to present it.

> More importantly, if they occur in lists, they break the list structure, which definitely is a WCAG non-conformance. We see this a lot in PDFs created in Word and PowerPoint.

Yes; people use paragraphs within lists. It is for this reason that PDF 2.0 includes the concept of a “Continued list” to provide support for this very common use-case.

Duff.

From: Lars Ballieu Christensen
Date: Tue, Feb 08 2022 7:51AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

In my opinion, use of p-elements to achieve a certain visual presentation is a WCAG 2.1 violation (1.3.1); p-elements are intended to define paragraphs.. As blank lines are not semantically paragraphs, such use represents incorrect markup of content.

Venligst/Kind regards

Lars
----
Lars Ballieu Christensen
Rådgiver/Adviser, Ph.D., M.Sc., Sensus ApS
Specialister i tilgængelighed/Accessibility Consultants
Tel: +45 48 22 10 03 – Mobil: +45 40 32 68 23 - Skype: Ballieu
Mail: = EMAIL ADDRESS REMOVED = – Web: https://www.sensus.dk

Vi arbejder for et tilgængeligt og rummeligt informationssamfund
Working for an accessible and inclusive information society



On 08/02/2022, 15.01, "WebAIM-Forum on behalf of Duff Johnson" < = EMAIL ADDRESS REMOVED = on behalf of = EMAIL ADDRESS REMOVED = > wrote:

> On Feb 8, 2022, at 01:05, Steve Green < = EMAIL ADDRESS REMOVED = > wrote:
>
> I'm not convinced it's a WCAG non-conformance, and I'm not sure it's even a nuisance. Does it have any impact on anyone?

…and even if it does have an impact it seems like a AT problem, not a file-format issue.

> Empty <P> tags are a big problem in PDFs, though. They cause JAWS (and possibly other screen readers) to say "blank", which we regard as a user experience issue, not a WCAG non-conformance.

IMO, this is a description of what screen-readers are choosing to do… and they should choose otherwise. That a PDF might include an empty <P> does not force AT to present it.

> More importantly, if they occur in lists, they break the list structure, which definitely is a WCAG non-conformance. We see this a lot in PDFs created in Word and PowerPoint.

Yes; people use paragraphs within lists. It is for this reason that PDF 2.0 includes the concept of a “Continued list” to provide support for this very common use-case.

Duff.

From: Duff Johnson
Date: Tue, Feb 08 2022 8:12AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

That's an interesting perspective.

Do blank lines (zero characters between <p> and </p>) actually constitute... “content”?

I agree - of course - that they aren't best-practice, but it's not obvious (at least to me) why they are relevant to accessibility such that its a WCAG failure to include them.

I would rather expect that the correct thing for AT to do is to ignore them in all cases. If one does not take this view then other nasty possibilities arise… such as authors using “dummy” empty h# elements to “help" with document structure… or using empty <tr> to somehow “separate” tables… and on and on. Yuck.

I'sll toss out a strawman: in order to be represented by AT a given structure element should contain, at minimum, a space character.

Duff.

> On Feb 8, 2022, at 09:51, Lars Ballieu Christensen < = EMAIL ADDRESS REMOVED = > wrote:
>
> In my opinion, use of p-elements to achieve a certain visual presentation is a WCAG 2.1 violation (1.3.1); p-elements are intended to define paragraphs.. As blank lines are not semantically paragraphs, such use represents incorrect markup of content.
>
>
> On 08/02/2022, 15.01, "WebAIM-Forum on behalf of Duff Johnson" < = EMAIL ADDRESS REMOVED = on behalf of = EMAIL ADDRESS REMOVED = > wrote:
>
>> On Feb 8, 2022, at 01:05, Steve Green < = EMAIL ADDRESS REMOVED = > wrote:
>>
>> I'm not convinced it's a WCAG non-conformance, and I'm not sure it's even a nuisance. Does it have any impact on anyone?
>
> …and even if it does have an impact it seems like a AT problem, not a file-format issue.
>
>> Empty <P> tags are a big problem in PDFs, though. They cause JAWS (and possibly other screen readers) to say "blank", which we regard as a user experience issue, not a WCAG non-conformance.
>
> IMO, this is a description of what screen-readers are choosing to do… and they should choose otherwise. That a PDF might include an empty <P> does not force AT to present it.
>
>> More importantly, if they occur in lists, they break the list structure, which definitely is a WCAG non-conformance. We see this a lot in PDFs created in Word and PowerPoint.
>
> Yes; people use paragraphs within lists. It is for this reason that PDF 2.0 includes the concept of a “Continued list” to provide support for this very common use-case.
>
> Duff.
> > > > >
>
>
> > > >

From: Karen McCall
Date: Tue, Feb 08 2022 10:23AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

I would agree. There is "something" in a <P> tag even if it is a "return that indicates the start of a new paragraph and its end.

I train people on how to leverage their software to add space around text that is just part of knowing how to use the software you are trying to use. Whether its Word or CSS in HTML, there are techniques for creating the visual presentation you want that don't involve pressing Spacebar, Tab or Enter.

And I'd like to add: can we PLEASE stop blaming the adaptive technology for EVERYING that doesn't work well! I know there are gaps in how my adaptive technology accesses some things. Its technology. NONE of it is perfect.

If we aren't going to "blame" content authors for creating poorly structured content, we can't "blame" the adaptive technology for trying to accommodate for poorly structured content.

Cheers, Karen

From: chagnon
Date: Tue, Feb 08 2022 10:24AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

The <p> tag itself contains "real content" because it holds Unicode character 000D = CR/carriage return, which is part of the set of control characters in content and Unicode.

It may be invisible, but it's there nonetheless. Select a blank <P> tag in a PDF, expand it to show its yellow content container box, and the hidden character is highlighted in blue. Invisible or not, there's something there inside the <P> tag.

The purpose of our accessibility standards — WCAG, PDF/UA, EPUB, etc. — is to specifically define how to remove ALL barriers for those using assistive technologies. (And for all humans using any other technology, too.)

At a minimum, blank returns are a nuisance to the humans trying to read and navigate the document. But there are technologies where these blank returns cause reflow problems that in turn, create full-blown accessibility barriers to some users.

It's the responsibility of BOTH the accessibility standards AND the assistive technologies to deal with these. Therefore, ban them in the standards and require the A T manufacturers to also deal with them for their users.

— — —
Bevi Chagnon | Designer, Accessibility Technician | = EMAIL ADDRESS REMOVED =
— — —
PubCom: Technologists for Accessible Design + Publishing
consulting ' training ' development ' design ' sec. 508 services
Upcoming classes at www.PubCom.com/classes
— — —
Latest blog-newsletter – Simple Guide to Writing Alt-Text

From: Lars Ballieu Christensen
Date: Tue, Feb 08 2022 10:36AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

Even if the p-element contains a Unicode character 000D, very few people would consider this to qualify as a paragraph.

In my opinion, there are two basic rules for creating accessible content: 1.. Use the tools/technologies/features as intended; and (2) Do not abuse tools/technologies/features for things that they were not intended for.

The p-element was never intended to create (visual) space; it is a structural element intended to span and identify a paragraph. Any other use is, in my humble opinion, abuse.

Venligst/Kind regards

Lars
----
Lars Ballieu Christensen
Rådgiver/Adviser, Ph.D., M.Sc., Sensus ApS
Specialister i tilgængelighed/Accessibility Consultants
Tel: +45 48 22 10 03 – Mobil: +45 40 32 68 23 - Skype: Ballieu
Mail: = EMAIL ADDRESS REMOVED = – Web: https://www.sensus.dk

Vi arbejder for et tilgængeligt og rummeligt informationssamfund
Working for an accessible and inclusive information society



On 08/02/2022, 18.24, " = EMAIL ADDRESS REMOVED = on behalf of = EMAIL ADDRESS REMOVED = " < = EMAIL ADDRESS REMOVED = on behalf of = EMAIL ADDRESS REMOVED = > wrote:

The <p> tag itself contains "real content" because it holds Unicode character 000D = CR/carriage return, which is part of the set of control characters in content and Unicode.

It may be invisible, but it's there nonetheless. Select a blank <P> tag in a PDF, expand it to show its yellow content container box, and the hidden character is highlighted in blue. Invisible or not, there's something there inside the <P> tag.

The purpose of our accessibility standards — WCAG, PDF/UA, EPUB, etc. — is to specifically define how to remove ALL barriers for those using assistive technologies. (And for all humans using any other technology, too.)

At a minimum, blank returns are a nuisance to the humans trying to read and navigate the document. But there are technologies where these blank returns cause reflow problems that in turn, create full-blown accessibility barriers to some users.

It's the responsibility of BOTH the accessibility standards AND the assistive technologies to deal with these. Therefore, ban them in the standards and require the A T manufacturers to also deal with them for their users.

— — —
Bevi Chagnon | Designer, Accessibility Technician | = EMAIL ADDRESS REMOVED =
— — —
PubCom: Technologists for Accessible Design + Publishing
consulting ' training ' development ' design ' sec. 508 services
Upcoming classes at www.PubCom.com/classes
— — —
Latest blog-newsletter – Simple Guide to Writing Alt-Text

From: Karen McCall
Date: Tue, Feb 08 2022 10:46AM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

Exactly!


From: Guy Hickling
Date: Tue, Feb 08 2022 4:15PM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

A couple of comments here have said that screen readers should not
announce "blank" for empty paragraphs (which I see on websites in some
screen readers, as well as in Pdf documents).

But this is the kind of problem that arises when we create bad markup.
Basically, any wrong or non-standard or questionable HTML is likely to
cause assistive devices to produce poor quality results, as in this case.

What a screen reader does is not in our control - and in any case they are
unlikely to change very quickly just because we criticise them here! But
creating good HTML markup is in our control. Rather than pushing the
responsibility for doing right onto others, we should put our own house in
order first!

So to get back to the question, I would advise against empty elements as
best practice, but it isn't a WCAG matter.

From: Max Starkenburg
Date: Thu, Feb 10 2022 9:10PM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

I wanted to throw another variable/perspective into this conversation,
since I hadn't seen it discussed yet, although I don't think it brings
things closer to any kind of "definitive" answer to the OP's question about
WCAG.

I see (via my work) empty paragraphs added to lots of web content as the
result of interaction with the CKEditor WYSIWYG. In some cases I can tell
they were added intentionally to create vertical spacing, and in some ways
I can't always blame folks for doing this, or wanting to, since in many of
the situations (whether due to configuration limitations or users'
technical knowledge) asking them to use CSS instead is a literal or
practical impossibility.

In other cases (especially empty paragraphs at the end of body content), I
suspect it's either editors hitting Enter again after the last paragraph
out of habit (and having little/no awareness this has created a paragraph
in CKEditor's eyes) or perhaps even sometimes CKEditor's fault (since I
think at least in some situations it expects/adds paragraphs in order for
cursors to be placeable).

Even if improvements on this matter could be made in CKEditor (and perhaps
I'm unnecessarily pessimistic in imagining that it could, without running
into too many hurdles of unintended consequences, or opposition, or
backwards-compatibility breakage, or whatever), it wouldn't also update the
millions of documents already published with its help. So in some ways this
feels to me like fighting a losing battle, whose best outcome might be to
hope/advocate screen readers one day ignore/suppress empty paragraphs
(though maybe that could also have unintended consequences?). But I'll
admit that I don't know about what barriers might be caused by them
regarding reflow, as others have mentioned, or with other non-screen-reader
AT.

Max

From: David Engebretson Jr.
Date: Thu, Feb 10 2022 10:08PM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

Curious but aren't the <hr> and <br> semantic elements a good use case for providing visual separation? Empty elements such as <p> seem like a work around bred out of ignorance of WCAG compliant semantic design, in my humble opinion.

I'm not blessed with physical sight anymore but I certainly respect the needs of visually oriented people. Aren't there WCAG guidelines defining how to provide fully WCAG compliant digital documents without using empty elements?

Thanks,
David

From: Christine Hogenkamp
Date: Fri, Feb 11 2022 2:17PM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | Next message →

Hi all,

Just to share a web developer perspective that's not just about
accessibility, there is no reason any developer who codes properly should
be using empty paragraph tags just to provide spacing. There are more than
one ways to code spacing that are far better for the overall state of the
page than empty paragraph tags, whereas most instances of people using
paragraph tags like that come from people who don't know these better
techniques. Or they are using a CMS to generate code for them and the CMS
generates an empty paragraph tag every time they hit the Enter button -
again, not someone coding the page from a place of knowing how to format
the page code properly.

So I would recommend against using paragraph tags for spacing, to encourage
instead creating webpages with code that is not cluttered unnecessarily,
because those extra bits of code can easily become opportunities to
accidentally have a negative effect on the overall page structure aka the
DOM. Each webpage should be lean and neatly ordered, with exactly as much
code as needed to display the content in the correct logical reading order,
the same way we try to limit the payload for loading the page itself and
its linked resources.

And when it comes to PDFs, most of the empty paragraph tags I've seen came
about due to some sort of error when exporting the document - I am most
familiar with InDesign and that's one of the issues we are still actively
trying to reduce in our documents, most likely due to having design files
with an emphasis on complicated design instead of accessibility as the
priority. So again, if I saw a document littered with empty paragraph
tags, I would assume they were being done accidentally by someone who
doesn't know how to fix them.

In both cases, empty paragraph tags suggest a lack of expertise in the
medium being used. So it's just an easy way to avoid looking
unprofessional, I know it's sometimes hard to get rid of empty paragraph
tags in PDF documents but definitely don't go out of your way to add them
in LOL

*x*
*Christine Hogenkamp (She, Her)*
Front-end Developer
ContextCreative.com <http://contextcreative.com/>;

*20 years of purposeful creativity*
* ˟**˟*

From: chagnon
Date: Fri, Feb 11 2022 4:31PM
Subject: Re: Empty <P> Tags For Spacing
← Previous message | No next message

David, your concern about visual spacing needs for sighted users is correct.

But we do that by programming extra white space with the styles in document programs (like Word) and with CSS in HTML. No need for a blank hard return when styles are used.
Faster and easier to format the document and more fully accessible across all media technologies, including assistive tech.

— — —
Bevi Chagnon | Designer, Accessibility Technician | = EMAIL ADDRESS REMOVED =
— — —
PubCom: Technologists for Accessible Design + Publishing
consulting ' training ' development ' design ' sec. 508 services
Upcoming classes at www.PubCom.com/classes
— — —
Latest blog-newsletter – Simple Guide to Writing Alt-Text