Page MenuHomePhabricator

Do not permit blank lines between list elements (== do not permit adjacent lists with no intervening elements)
Closed, DeclinedPublic

Description

Please do not permit this:

* One
* Two

* Three
* Four

under any circumstances, even if it seems like these are "supposed to" be two separate lists. If you need two separate lists, then you should put some text or other content between the two lists (at minimum, two blank lines). If the "correct" wikitext rendering is going to involve a blank line, then that line should be removed and a single list created.

(Also, please improve accessibility for people using screen readers by making this change retroactive/to clean up the thousands of incorrectly formatted lists already on wiki.)

Event Timeline

Whatamidoing-WMF raised the priority of this task from to Needs Triage.
Whatamidoing-WMF updated the task description. (Show Details)
matmarex subscribed.

It sounds like you're actually requesting a change to the parser's behavior, to merge consecutive lists into one even if they are separated by a blank line. Which might be a good idea.

Jdforrester-WMF set Security to None.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.
Jdforrester-WMF claimed this task.
Jdforrester-WMF subscribed.

On reflection, I can't imagine any way in which this kind of huge breaking change to how all wikis everywhere work can be justified by the gains we'd get.

James, do you understand the accessibility problem this creates?

This:

* One

* Two

* Three

is read by a screen reader in these words: "List of 1 items: (bullet) One, list end. List of 1 items: (bullet) Two, list end. List of 1 items: (bullet) Three, list end."

With correct formatting:

* One
* Two
* Three

the user only hears "List of 3 items: (bullet) One, (bullet) Two, (bullet) Three, list end."

That's a pretty big gain for these readers.

I've never seen a good use of multiple adjacent lists; have you? And, especially, I've never seen a good use of multiple adjacent lists that only has *one* blank line between the list items, which produces a rendered formatting difference that is barely visible.

It would also completely solve the problem of unintentionally splitting lists when you're trying to add a bullet in the middle of a list, which you can see at https://en.wikipedia.org/w/index.php?diff=690536710&oldid=690522879 and this screenshot.

Screen Shot 2015-11-13 at 4.46.15 PM.png (392×815 px, 86 KB)

The list looks correctly formatted in VisualEditor, but the wikitext produces three separate lists, and correcting it is a significant hassle, especially in nested lists.

Points well taken here but let us not lose sight of the fact the "blank lines" between list-items are only an issue under the wiki mark-up. In a "normal" html5 world, it doesn't matter how many so called "blank lines" exist between list-item elements (depicted below)....

<ul>
<li>Terrestrial planets</li>

<li>Other planets</li>


<li>Giant planets
<ul>
<li>Gas giants</li>
<li>Ice giants</li>
</ul>
</li>
</ul>

... the top-level list of planet types will render as a 'single list' regardless. This difference in "behavior" I'm guessing is because a "blank line" is not considered a 'new-line-start' normally as it seems to be the case under the wiki mark up.

In other terms, this...

* One

* Two

* Three

... is, at some point, 'on the way' to final rendering (during the wiki-markup processing), 'seen' as...

* One
<p></p>
* Two
<p></p>
* Three

... and that's why a single list of three items is broken up into three separate lists with one item each. Those empty Paragraph tags get stripped by the end of the process however; they just happen to exist at the wrong time and in the worst place in the current approach is all.