VisualEditor makes it easy to create partially linked words, when the user expects a fully linked one
Open, LowPublic

Description

In wikitext, [[foo]]bar will turn into <a href="foo">foobar</a> assuming bar matches the linktrail regexp, so it is very hard to end up with partially linked words (such as <a href="foo">foo</a>bar). VisualEditor on the other hand makes it easy, which is a problem as such partial linking conflicts with basically all style guides and usability guidelines, and also look ugly and confusing in wikitext ([[foo]]<nowiki/>bar or something like that).

There are two ways in which one can end up with such markup:

  • There is a linked word, and an editor tries to add a suffix to it (e.g. someone wants to edit [[word]] to become [[word]]s). VisualEditor offers a visual cue for this: when one is about to type a character which will be part of the link, the link is highlighted, otherwise it's not (and moving the cursor towards/away from the link can be used to switch between those states). While this sounds intuitive, in practice it seems that many editors (even experienced ones) fail to figure it out.
  • There is an unlinked word with a suffix, and someone wants to link it by selecting the word root and clicking on the link button (ie. they want to turn words into [[word]]s). This presumably seems more convenient than selecting the whole word and then deleting the suffix in the link dialog; but it ends up with VisualEditor only linking part of the word.

Unlinked characters at the end of a link are, as far as I know, never used. So VisualEditor makes it very easy to create misformatted text, while with the old editor it's practically impossible.

This is a major problem in agglutinative languages where suffixes are used a lot; on Hungarian Wikipedia most experienced editors refuse to use VisualEditor because of this (and the advice gets passed down in editathons and other outreach events, which impacts the ability of those events to quickly introduce newbies to editing). Seems to be a frequent issue elsewhere, too - see e.g. T35091, T53173, T54044, T95272 which are all about the same issue.

Maybe VisualEditor could automatically make linktrail characters part of the link as they are typed (in the ultra-rare case of not wanting that, the user can enter the trailing part as a separate word and then backspace it onto the link), or some kind of warning should be shown when one adds unlinked trailing characters.

(Originally reported at huwiki:Wikipédia:Kocsmafal_(egyéb)#VisualEditor-hibák)

Tgr created this task.Feb 25 2016, 10:37 AM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 25 2016, 10:37 AM
Elitre added a subscriber: Elitre.Feb 25 2016, 12:49 PM

T39939 seems related.

Elitre added a comment.EditedFeb 25 2016, 1:14 PM

I need to make sure I understand what you are saying. It seems to me that there may be different outcomes,

  1. [[Hatvan|Hatvanban]] (ban is added later and becomes part of the wikilink)
  2. [[Hatvan]]<nowiki />ban
  3. [[Hatvan]]ban

Which one is the desirable one? It seems to me you are pointing toward #1?

Samat added a subscriber: Samat.Feb 25 2016, 3:00 PM
Samat added a comment.EditedFeb 25 2016, 3:13 PM

The first and third form result the same rendered text, while at the second option the ban part will be unlinked.
Usually we used the 3rd form in wiki code: easier to write and it results simpler code.
If an article used the first form, bots (like AWB in the frame of general fixes) change to option 3.

See my comment here: https://hu.wikipedia.org/w/index.php?title=Wikip%C3%A9dia%3AKocsmafal_%28m%C5%B1szaki%29&type=revision&diff=17247830&oldid=17247648

Tgr added a comment.Feb 25 2016, 7:29 PM

[[Hatvan]]ban is maybe nicer than [[Hatvan|Hatvanban]] but there is little practical difference, and I imagine the first would be significantly more complex to implement.

I don't think the practical difference is all that matters, and I think we may want to solve this problem effectively also for other languages. See T128349 too.

Jdforrester-WMF renamed this task from VisualEditor: characters typed at the end of link should become part of it if they match the linktrail regexp to Come up with a design to make it easier for users to see that there is no space after a link (just the cartouche) and so you probably want to add one.Mar 7 2016, 8:43 PM
Jdforrester-WMF triaged this task as Low priority.
Jdforrester-WMF updated the task description. (Show Details)

(Stumbled upon T101917, possibly related?)

jhsoby added a subscriber: jhsoby.Oct 15 2016, 9:40 PM
Tgr updated the task description. (Show Details)Jun 19 2018, 6:21 PM
Tgr renamed this task from Come up with a design to make it easier for users to see that there is no space after a link (just the cartouche) and so you probably want to add one to VisualEditor: characters typed at the end of link should become part of it if they match the linktrail regexp.Jun 26 2018, 4:24 PM
Tgr updated the task description. (Show Details)

I've reverted the title and description of this task as it wasn't even remotely related to the issue it was originally about. In case someone wants to file a separate bug, here's the pre-revert version:

Come up with a design to make it easier for users to see that there is no space after a link (just the cartouche) and so you probably want to add one

The visual representation of <a href="foo">foo</a>bar is a bit too close to how <a href="foo">foo</a> bar should look. This leads to users creating odd edits which they almost certainly don't intend.

Tgr renamed this task from VisualEditor: characters typed at the end of link should become part of it if they match the linktrail regexp to VisualEditor makes it easy to create partially linked words, when the user expects a fully linked one.Jun 26 2018, 4:48 PM
Tgr updated the task description. (Show Details)
Restricted Application added a subscriber: jeblad. · View Herald TranscriptJun 26 2018, 4:48 PM

Part of the problem is that the construct of linking part of a word appears to be used in some wikis as a feature, such as the Basque Wikipedia. So, implementing this task might make things better for one group and worse for others.

I wonder if this really is intended this way on the Basque Wikipedia, though?

If I'm understanding correctly, this request centres around the complaint that wiki communities don't want people partially linking words or introducing this syntax. That's fair enough. However, people frequently do things in a good faith effort to improve things that wiki communities don't want them to do; the correct response is normally to tell the user what they've done wrong, why it's bad, and how to correct it, rather than using software to force conventions on people. I'm unconvinced that changing the visual editor is the correct solution to this, compared to the social solution of telling users that they should link the whole word. In fact, changing the link text and link target separately from each other in the visual editor will be easier soon, with T124305 now being fixed.

Now, as an aside... I did some research, and it's not really true that this syntax isn't used. Syntax like [[word]]<nowiki/>ending, to create a word that is partially linked, is used in over 2,000 pages on the Basque Wikipedia, and over 9,000 on the English Wikipedia. That said, it's debatable whether the user really intended to do it...

P.S. "It's over 9000!" joke not intended.