Community Wishlist Survey 2021/Editing/Writing a : in visual editor shouldnt add a blockquote but a : to the source code

Writing a : in visual editor shouldnt add a blockquote but a : to the source code

  • Problem: Writing a : and getting a blockquote is not intuitive and breaks with the convention of being able to write source code in the visual editor. There is also no other way to get an : into the source code. Equations are always indented with a : so it's an important feature to have.
  • Who would benefit: Everybody who needs an : indent aka everybody who writes equations.
  • Proposed solution:
  • More comments:
  • Phabricator tickets:
  • Proposer: Nabloodel (talk) 19:17, 19 November 2020 (UTC)[reply]


  • @Nabloodel: Note : is not intended to be used for indentations in article text. : creates a definition list (which is why VE maps it to blockquote instead, which is a proper indentation). This is a very unfortunate and longstanding habit that grew out of talk page discussions, but it is VERY bad for people relying on screenreaders to read an article
  • but character : is used in discussions and there are pages, where is allowed visual editr on talkpages or forum chats. JAn Dudík (talk) 16:39, 20 November 2020 (UTC)[reply]
  • This is most often used with equations, which look weird with no indentation. I know of no other ways of indenting them. So maybe add a paragraph style for equations instead (and use a bot to change millions of :<math> to the new style)?
  • I notice that under the dropdown menu for   there are two options that I normally can't click on, even in articlespace: Decrease indentation and increase indentation, both of which have keyboard shortcuts. Any clue as to why those may have been disabled? Tenryuu (talk) 04:23, 24 November 2020 (UTC)[reply]
    @Tenryuu, I did a quick test: increase/decrease indentation were enabled when the cursor is in a list item and disabled when it's a normal paragraph. (When I changed a paragraph to a bullet-item, I needed to click away somewhere else then put the cursor back into the changed block for the menu to update.) Hope that helps, Pelagic (talk) 22:38, 16 December 2020 (UTC)[reply]
    Ah, that explains a lot. Thanks @Pelagic! Tenryuu (talk) 22:40, 16 December 2020 (UTC)[reply]
  • The :<math> issue is phab:T111712. As mentioned here and on that task, it would be better to not (ab)use the : syntax for this. ESanders (WMF) (talk) 16:44, 24 November 2020 (UTC)[reply]
  • Equations can be indented by <math display=block> instead of :<math> so :-indentation is not really required for that. Threading of discussion pages is a bigger issue. —David Eppstein (talk) 18:01, 26 November 2020 (UTC)[reply]
  • Wikimarkup : does not do a <blockquote>, it does a <dd> (which is actually invalid markup in most circumstances). This problem does need to be fixed, but it is to use a <div>, <article>, or something else (especially on talk pages, perhaps with IDs for thread-building). The short version is that <dl> markup is only valid if there is a <dl>...</dl> that contains at least one <dt> followed by either another <dt> or a <dd>; and at least one <dd> preceded by either a <dt> or another <dd> (that is, at least one each of <dt> and <dd> must be present, and in that order). Thus, every use of : markup that is not preceded by a ; instance (either immediately or with one or more other intervening : instances) is invalid. Same goes for any ; that isn't followed by a :, either immediately or with an intervening additional ;. If these conditions are not met, then ;... should be converted to ''...''[blank line here] (or directly into <p style="font-weight: bold;">...</p>). There's been a ticket open about this, in every MW bug-tracker, since the dawn of time, and the devs just never do anything about it. This is probably the no. 1 HTML-compliance problem in MW, and it's what makes talk pages (and many articles) a confusing hellhole of invalid list gibberish for users of screen readers. It's utterly shameful that this has not been fixed yet.  — SMcCandlish ¢ >ʌⱷ҅ʌ<  06:34, 15 December 2020 (UTC)[reply]
    I heartily agree with you about the abuse of definition lists, @SMcC. Which might be why they mapped the ':' magic key in VE to <blockquote> instead of the <dd> that you would get from literal wikitext :. Most of the other magic keystrokes are the same as their wikitext equivalents, but this is an exception. Maybe the key could be '>' instead of ':', or they could require the space after ': ' like they do with '# ' and '* '.
    Note that on mobile VE, which has fewer toolbar buttons than desktop VE, these secret keys are the only way to do block formatting. For a list, see mw:User:Pelagic/Mobile keyboard shortcuts for Visual Editor. Pelagic (talk) 23:09, 16 December 2020 (UTC)[reply]
    Thanks for the counter-correction. I had no idea that VE was doing something different here. But ARGH! It's just trading one spec-violating markup abuse for another one. The <blockquote> element is reserved for actual quoted material (only, not even include citation information for it). WhyTF can't they just get it through their heads that <span>, <div>, <article> and other generic, non-semantic elements exist for a reason? It's like their development is being directed by Basil Fawlty.  — SMcCandlish ¢ >ʌⱷ҅ʌ<  00:34, 17 December 2020 (UTC)[reply]
  • Part of the problem is that we don't have a standard, agreed way to "do indentation" in HTML. Blockquote adds extra vertical space, and a grey left bar, and has specific semantics. Naked DD is so wrong that I almost have an apoplexy every time I think on it. Then we nest them 10 deep?! What would be useful is a set of classes like "mw-indent-1", "mw-indent-2", with a new wikitext symbol that maps to those. Maybe '.' at the beginning of a line? ..My indented comment isn't a big leap from ::My indented comment, and ties in with a traditional use of dots as leaders. Only problem with that is if someone wants to start a line with an ellipsis. Perhaps ',' instead? It's not something that would normally appear at the beginning of a line, even singly. ,,My indented comment. It looks weird, but so does '''''bold italic'''''. Pelagic (talk) 23:47, 16 December 2020 (UTC)[reply]
    Yes, this is essentially what the devs have been told by us (with actual HTML compliance experience) for nearly 20 years, and they just don't do it. It's like arguing with a cat.  — SMcCandlish ¢ >ʌⱷ҅ʌ<  00:37, 17 December 2020 (UTC)[reply]