Page MenuHomePhabricator

AWB shouldn't strip <em>
Closed, ResolvedPublic

Description

AWB suggested that these em tags should be replaced with wikitext italics. I think it should preserve the sense of the emphasis instead by using {{em}} on en.WP, or leaving the tags alone, if elsewhere (or broadly, leave alone).

Event Timeline

Please link to MOS or policy pages to show that this is recommended/preferred behaviour, as I would not want to make a change just because it is your own preference or idea.

Please link to MOS or policy pages to show that this is recommended/preferred behaviour, as I would not want to make a change just because it is your own preference or idea.

[[MOS:DEVIATIONS]] (a part of [[WP:Accessibility]]) has the following:

In general, articles should use wikimarkup in preference to the limited set of allowed HTML elements. In particular, do not use the HTML style elements <i> and <b> to format text; it is preferable to use Wiki-markup '' or ''' for purely typographic italicisation and boldfacing, respectively, and use semantic markup templates or elements for more meaningful differences. The <font> element should also be avoided in article text; use {{em}}, {{code}}, {{var}}, and our other semantic markup templates as needed, to emphasise logical differences not just visual ones.

Emphasis mine (straight letters). [[MOS:EMPHASIS]] (a part of [[MOS:ITALICS]]) has:

The use of italics for emphasis on Wikipedia should follow good English print style. The most accessible way to indicate emphasis is with the HTML <em>...</em> element or by enclosing the emphasized text within an {{em|...}} template. Emphasis may be used to draw attention to an important word or phrase within a sentence, when the point or thrust of the sentence may otherwise not be apparent to readers, or to stress a contrast:
Gellner accepts that knowledge must be knowledge of something.
It may be preferable to avoid the need for emphasis by rewriting a sentence more explicitly. Use of emphasis more than once in a sentence is rarely helpful to readers, unless the emphasized terms are being directly compared.
Other, non-emphasis, uses of italics on Wikipedia should use ''...'' markup, not <em> or {{em}} markup.[3]

Even if it were not somewhere in policy/guideline, I might suggest that we should do what we can to preserve semantic HTML, rather than converting it to non- (or less-) semantic HTML, which is what AWB is doing.

(In case it was not obvious, I would prefer replacement with the template {{em|...}} rather than leaving the HTML tags. That's easier to track and is more wikitext-ish--which is why I would guess AWB does the replacement today.)

Everything that needs to be said about this being an incorrect fix has been said, but this has sat for over a year, so here is the same information but with direct links:

In a brief search I was only able to find one mention from 2012 of why AWB does this in response to concern. There, @Rjwilmsi responded suggesting that {{em}} be used to bypass the AWB edits with the reasoning that using this template demonstrates intentionality.

Multiple MOS pages indicate <em> and {{em}} being equally valid for indicating emphasis, and that these should be used instead of '' for doing so. See:

While the suggestion of {{em}} to demonstrate intentionality isn't terrible (though probably would just result in editors mistaken using the template mistakenly nearly as often as the tag), such a suggestion should be made for the MOS.

Rjwilmsi claimed this task.

rev 12327
T185840: don't alter <em> tags as are valid per MOS:EMPHASIS

Will be included in next release of AWB