Page MenuHomePhabricator

VisualEditor: Cutting (removing) last sections on page, and then pasting them back in, results in increased indentation in Chrome
Closed, ResolvedPublic8 Estimated Story Points

Description

Intention:
Test a bug.

Steps to Reproduce:

  1. Selecting the appendices on the page https://en.wikipedia.org/w/index.php?oldid=588539903&veaction=edit
  1. Cut them out (Control-x), and
  1. Paste them right back where they were.

Actual Results:
The indentation level for all the bulleted lists was increased.

Reproducible: Didn't try

URL: https://en.wikipedia.org/w/index.php?title=User%3AEdgepedia%2FVE%2FS%26D&diff=588777573&oldid=588539903

Details

Reference
bz59849

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:31 AM
bzimport set Reference to bz59849.

I don't know if this is related, or whether it should be a new bug. In this edit:

https://en.wikipedia.org/w/index.php?title=User:Spinningspark/Work_in_progress/Mobility_analogy&diff=626824709&oldid=626823704

VE adds a number of spurious indents. The intended edit was to swap over the order of two blocks of text containing math markup. Very frustrating that the problem could not even be fixed from within VE since indenting does not function in general.

The mess created here is definitely a problem.

However, what's being used there as "indentation" isn't indentation, strictly speaking; that text has been marked as the second half of a term-definition pair in a definition list, which is not semantically meaningful.

I don't know whether VisualEditor is expected to support the presence of only half of a paired list: maybe, because it's (mis)used a lot, but maybe not, because it shouldn't be used that way? (That decision is someone else's problem.)

However, what's represented there like this:

:where,
: ''D'' = 1/''C'' is elastance
: ''C'' is capacitance
: ''S'' is stiffness

probably ought to be (for proper semantic meaning) a standard (non-definition/non-association) list like this:

where,

  • ''D'' = 1/''C'' is elastance
  • ''C'' is capacitance
  • ''S'' is stiffness

(or in a similar format, but without bullet points, which is possible but not as trivial to create in wikitext).

It would be nice if MediaWiki actually supported plain old indentation, similar to pressing the tab key on a typewriter, perhaps along the lines of the request in bug 4521 (from 2006), but so far that request has not been granted.

(In reply to WhatamIdoing from comment #2)

However, what's being used there as "indentation" isn't indentation,
strictly speaking; that text has been marked as the second half of a
term-definition pair in a definition list, which is not semantically
meaningful.

It wasn't so marked by me and I don't see any markup in the edit window so you would appear to mean that VE has generated markup. Generating semantically incorrect markup and then blaming the user for the error is plainly ridiculous. Or perhaps you mean that the colon in wiki markup does not really mean indentation? Well, yes it does, it is used extensively all over Wikipedia (ahem, talk pages) with just that intention so by practice and precedent that is what it means. VE needs to live with that, not garble it because it doesn't like the semantics, otherwise VE will never be ready for prime time.

where,

  • ''D'' = 1/''C'' is elastance
  • ''C'' is capacitance
  • ''S'' is stiffness

No, that is not a good solution. Display maths lines are pretty universally indented for aesthetic reasons. The definitions list following a maths display line are commonly indented as well. Thus not indenting the "where" and using bullets are both not acceptable. Bear in mind that a formula, even a display formula, can be inserted in the middle of a sentence so bullets would break the grammatical punctuation. I can't understand this desire not to allow editors free use of indenting. It is an editorial decision and there is no reason for VE to interfere or impose something different. It is for the style guidelines to thrash out, not for VE to impose.

I don't understand why editors aren't allowed free use of indenting, either. But "free use of indenting" is bug 4521 from eight years ago. "Free use of indenting" is not "using the second half of the markup from a definition list to sort of fake indenting, so that it looks okay on my desktop system but also so that reading the page is irritating to people using screen readers".

The colon is part of semantic markup. Screen readers don't skip over semantic markup. They don't just read the contents of a list. They stop reading content and announce that there is a list, and how long the list is. If you use a colon, then some screen readers (correctly) interpret this as being marked as a long list of definitions, so that your markup:

:where,
: ''D'' = 1/''C'' is elastance
: ''C'' is capacitance
: ''S'' is stiffness

is read as something like "Term with four definitions: where, d = 1/C is elastance, c is capacitance, s is stiffness". Unless you really want the words "Term with four definitions" to be stuck in the middle of that sentence, then you should not define those four lines as being in a definition list (aka association list).

If you just want visual-only indentation, then you have to set span or div tags to provide visual-only changes to the text arrangement. As I said above, I don't know why MediaWiki doesn't have a much simpler method for letting editors provide visual intendations properly, and instead gives them a choice between screwing up accessibility or having to hand-type complicated HTML codes. Using indentation freely been requested for at least eight years. We have a legitimate need for this, but I don't know if we'll ever get it.

TLDR: The colon does *not* actually mean "indent".

TLDR: The colon does *not* actually mean "indent".

Ok, the colon does not mean indent. However, I have had an account on English Wikipedia for seven years, have made 50,000 edits in that time (which must include tens of thousands of colons) but this is the first I have heard of it. We have a page (WP:INDENT) explaining how to use colons for indenting, MOS:MATH requires it for display formulae, and WP:TALK suggests that it may be disruptive to deliberately not use colons. On none of those pages is it explained that, actually, colon does not really mean indent.

I am almost certain that the vast majority of editors do not know this. There are probably hundreds of thousands of articles that use colons. It is simply not going to be acceptable for VE to chew up articles because it does not "like" the markup used by editors and established for many years. A less disruptive way forward would be to make the colon actually mean indent. Definition lists are usually achieved with templates. The few that are not are going to be a much smaller number of pages that need fixing and can easily be found by extracting a list of pages from the database with semicolons in lines beginning with colons. A semi-automated bot could then go through them.

I'm convinced that most editors don't know this. I only learned this a couple of years ago, when talking to someone with WikiProject Accessibility.

https://en.wikipedia.org/wiki/Template:Glossary is only used 101 times, which is almost nothing for the English Wikipedia. I don't believe that I've ever seen a list using it. The normal way to make a definition list is:

;Term
:Definition

or, alternatively:

;Term: Definition

See [[Disease]] for one of several examples I could name off the top of my head. Both formats produce the same end result.

VisualEditor does not support definition lists at all at this time. Support is planned (see bug 37938), but it may be a while. Whenever that happens, this problem should (hopefully) be resolved.

Jdforrester-WMF changed the task status from Open to Stalled.Feb 2 2015, 7:24 PM
nshahquinn-wmf set Security to None.
nshahquinn-wmf subscribed.

I've tested this out and it seems to work correctly now. Feel free to reopen if I've missed something.

Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF set the point value for this task to 8.