WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Empty <P> Tags For Spacing

for

From: Max Starkenburg
Date: Feb 10, 2022 9:10PM


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