Lots of users across the Stack Exchange network have developed a habit of using code markup (backticks in Markdown) to give technical terms special formatting that stands out visually. This only seems to happen on sites that don't actually deal with code snippets, since "there's no other use for it."

For example:

To defeat Gannon's second form you need to use the bow and dark arrows until he turns purple, then use the bombs of time.

which renders into the HTML page* as:

To defeat Gannon's second form you need to use the <code>bow</code>
and <code>dark arrows</code> until he turns purple, then use the
<code>bombs of time</code>.

The problem with this is that code tags are semantic markup in HTML and they're rendered differently than the writer might expect in other contexts. This can result in problems like visually imparied users hearing random words spelled out while the page is rendered by their screen reading software.**

Visual users might like how it looks, but it is abusing the standard in a way that can impair other users to a lesser or greater degree. I know that we can't prevent someone new from mangling formatting, but I would like the support of experienced editors in eliminating this very common abuse of semantic markup. Bold and italics are semantic markup that mean "give this emphasis", which is correctly rendered in the way usually intended for technical terms in all contexts, so we should only ever used bold or italics for technical terms.

The example above using the better markup (if any is needed at all):

To defeat Gannon's second form you need to use the bow and dark arrows until he turns purple, then use the bombs of time.

And another example of correct semantic formatting:

The content of the leaderboard is saved to %appdata%\awesomegame\lb.dat every ten minutes.

Doing this requires no technical changes, only the will of the editing community here to make it standard practice.

Can we, as a community, support the correct use of semantic formatting markup on Arqade?†

* You can verify this in Firefox by highlighting the example and right clicking the selected text, and choosing View Selection Source from the context menu.

** It might seem at first glance as if this problem can be avoided by configuring the screen reader to read code tags as normal text, but then this will mangle text in code tags that is supposed to be spelled out. For a minimal example of a formatted sentence that cannot be correctly rendered by a screen reader under any configuration, consider:

Type xyzzy then use the bow.

Either "xyzzy" will be incorrectly read as a word and "bow" will be read correctly, or "xyzzy" will be read spelled-out correctly and "bow" will also be spelled out incorrectly. There is no way for a screen reader to read the mind of the writer to find out what was intended, which is why code tags were invented in the first place – to tell a computer what meaning is intended. To indicate what we intend the text to mean we can leverage semantic HTML instead of fighting with it, and rewrite the sentence above to any of these:

Type xyzzy then use the bow.
Type xyzzy then use the bow.
Type xyzzy then use the bow.

† This has also been discussed on MSO: Inline Code Spans should not be used for emphasis, right?

  • 8
    +1 I agree, although I'd like to define where we draw the line. technical terms such as 20Gb, RAM, Lag should be bold or italicised (if needed at all), whereas command lines & filepaths should still be in code ticks (such as C:\Program Files or java Example.java). Is this what you were getting at? – Robotnik Mod Jul 26 '13 at 0:34
  • 14
    @Robotnik Exactly! Those are the sorts of things that semantic code formatting are for. Anything intending to be a precise text input to a computer should be in code formatting. – SevenSidedDie Jul 26 '13 at 3:39
  • 9
    @None Is that really an assumption we should be making? There are people who are unable to read text comfortably (so may use screen readers) who can play video games; are they unwelcome? What about people using accessibility software to play text adventures? So there are two off the top of my head. Does misusing code formatting provide so much benefit that it's worth frustrating even one gamer with a disability? – SevenSidedDie Jul 26 '13 at 15:29
  • 3
    I don't see what the problem is. – Nick T Jul 26 '13 at 17:14
  • 5
    @NickT Hah, sighted person joke. Very funny. – SevenSidedDie Jul 26 '13 at 17:29
  • 4
    @NoneOfYourBusiness It's not about the users, it's about complying with the standard that is set. The users are merely the reason the standard exists and should be followed to begin with. – user98085 Jul 26 '13 at 18:02
  • 22
    @NoneOfYourBusiness For the same reason that we don't use bold for headers, don't use <br><br> for paragraph breaks, and don't make something an empty link just to get a pretty blue colour. HTML tags have meanings, and misusing them makes the Internet worse. Our mission is to make the Internet better. – SevenSidedDie Jul 26 '13 at 18:03
  • 18
    @NoneOfYourBusiness Please make your comment an answer so I can downvote it. – Sterno Jul 26 '13 at 18:20
  • 8
    @NoneOfYourBusiness Markdown is converted into HTML for the browser to display. What you type is not the actual output - the actual output is what concerns us, though. – user98085 Jul 26 '13 at 18:40
  • 2
    @NoneOfYourBusiness You seem to care strongly about this, but you haven't yet articulated what your stake in this is. Is there a compelling reason you see to use HTML <code></code> tags (aka, Markdown backticks) for non-code on Arqade that I'm missing? – SevenSidedDie Jul 26 '13 at 19:32
  • 6
    @JackAidley - It's a problem so long as there is a single vision-impaired person on this planet. It's the same reason why new buildings are now mandated to have easy access for wheelchairs. There aren't as strict guidelines on the internet, however we should be doing everything within our power anyway to make the web a more accessible place. Avoiding backticks for emphasis is a small but powerful way this site can bring better access to this site for those with impaired vision. – Robotnik Mod Jul 29 '13 at 3:56
  • 2
    @TrentHawkins - I haven't used a screen reader myself, but I daresay it's probably closer to: "...you need to use the Begin code block. Bee-Oh-DoubleU. End Code Block until he turns purple..." – Robotnik Mod Jul 30 '13 at 6:41
  • 4
    @Trent It depends how it's configured. The problem is that the reader isn't psychic and relies on the tags, so it will always read "type xyzzy then use the bow" wrong, because xyzzy should be spelled and "bow" should be pronounced as a word. With both in code ticks, every screen reader configuration will mangle one or the other because garbage in, garbage out. It should be "type xyzzy then use the bow" so they can be handled differently if the user wants them handled differently. – SevenSidedDie Jul 30 '13 at 15:56
  • 4
    Heh, I only just saw this. Let it be known that on (Meta) Stack Overflow I'm incredibly vocal about this: meta.stackexchange.com/questions/137755/… – BoltClock Jul 31 '13 at 21:02
  • 3
    Here's a query to find your posts that contain <code>. Go nuts. – MBraedley Aug 9 '13 at 11:05

<em> and <strong> are in the list of whitelisted tags that can be used on Stack Exchange. Go mad. If you want more, I suggest you ask for your specific tag to be whitelisted on MSO.

While you're at it, please destroy all misuse of backticks for emphasis, because they're an abuse of formatting. MBraedley has provided a query to check your own posts that contain code markup.

  • 6
    I know it's not an Arqade-only problem, but the local Metas are where a site's active editors will see it, and it's them that I want to reach rather than those who follow the rarified policy discussions of MSO. They're not rank-and-file editors who can make a practical difference on a site. – SevenSidedDie Jul 25 '13 at 23:56
  • 3
    This is a problem specific to non-technical sites. Arqade being one of those, I find this very appropriate here. Of course there are other sites where it also applies, but it's surely not a problem that should be dealt with on an overreaching capacity. – user98085 Jul 26 '13 at 0:19
  • @FEichinger That's an excellent point. In an old discussion of this on RPG.SE, the fact that there was no other use for code formatting was used as an argument for reappropriating it to visually format game technical terms. – SevenSidedDie Jul 26 '13 at 0:22
  • 1
    @FEichinger - As long as we continue to support troubleshooting, I would still consider us a technical site. – Robotnik Mod Jul 26 '13 at 0:35
  • 2
    @Robotnik At the core, we are not. Technical questions on Arqade - unlike SO, SU or SF - are secondary. There's also no harm in using backticks for actual code (f.e. the process name, a console command, etc) - not for jargon. – user98085 Jul 26 '13 at 0:38
  • 1
    @FEichinger - At the core, we provide expert answers to questions. (at least, that's our mission). This would be a very different place if it were more similar to SciFi & Fantasy, or Movies & TV - in that we only answered gameplay/storyline problems. There is a level of technical knowledge needed to be a gamer - stuff like knowing how a computer works, what a stacktrace is and what it means (and how to fix or work around it) - It's that knowledge which I believe plays a big role in this site, and for that reason I would still consider us a technical site. – Robotnik Mod Jul 26 '13 at 0:48
  • All of this is really irrelevant. If you want to add a tag to the whitelist you're going to have more luck on MSO. Editors can't do that for you and editors already know better from what I've seen than to abuse backticks. Technical or not technical, any site may benefit from having, say, em whitelisted. – badp Jul 26 '13 at 2:24
  • 4
    @badp I'm not sure what you're referring to when you mention whitelists. It sounds like some kind of SE platform feature? What I'm proposing isn't something the platform can help with, so perhaps we have a misunderstanding? As for editors knowing better, I see it semi-regularly here. Today's inspiration for this post was a 1k user's answer misusing code ticks, then a 10k user who did a formatting edit on it but left the code ticks intact. – SevenSidedDie Jul 26 '13 at 3:42
  • @SevenSidedDie You ask "Can we support the correct use of semantic formatting markup on Arqade?" That is a platform feature. You can see the whitelist of supported tags here. – badp Jul 26 '13 at 10:18
  • 4
    @badp You're misunderstanding the post here. This isn't about adding a tag/markup, it's about editing posts to ensure appropriate use of an existing tag/markup. – user98085 Jul 26 '13 at 14:15
  • 3
    Yes, I think we misunderstand each other. :) em and strong are already what * and ** produce, so we're already using semantic tags and don't need any others made available. We just need to use them for their intended purposes to respect the spec. – SevenSidedDie Jul 26 '13 at 15:58
  • 4
    @badp I think you're confused with your first paragraph. He's not asking to have any new tags whitelisted, or to start using <em> or <strong> in posts (that's already being done - *text* and <em>text</em> produce equivalent output, as do **text** and <strong>text</strong>). "Please destroy all misuse of backticks for emphasis" is, however, exactly what he's asking for, for the reason you mention and also because it apparently confuses screen-readers. – BlueRaja - Danny Pflughoeft Jul 26 '13 at 19:29
  • 1
    @BlueRaja-DannyPflughoeft: The claim that it confuses screen readers is, however, totally unsupported and isn't any more true for this use of the code ticks than for their correct use. If it is an issue for screen readers - which I doubt - then it's a bug that needs correcting in either screen reader or the StackExchange code base. The Screen Reader issue is a total red herring. – Jack Aidley Jul 27 '13 at 7:55

I personally don't use code ticks in this wrong manner, atleast not that I can recall - it could've happened by mistake :P. Sure, I can get behind a campaign to try and stop abusing code tags, and I do support this idea in principle.

But frankly, if we're worried about screen readers then a major problem in Arqade and other sites is how often useful nuggets of data are buried deep in comments or across multiple answers. This is probably far more frustrating for listeners than having to put up with a few words being spelled out.

As an obvious example, the question and answers above : how much context would be lost if you ignored the parade of comments attached? I have also often added answers that reference existing ones (via a link) and just expanded on them with more information.

In summary, while its a nice idea in principle I'm unconvinced of actual usability benefits; people with visual readers don't have a problem while those using screen readers have far worse structural challenges to deal with before running into this.

  • 6
    Comments on meta are not comparable to comments on main. Do we have a problem with good info buried in comments on main? It's standard procedure to edit those into the questions/answers and then flag them as obsolete, so you can just do that when you find them. – SevenSidedDie Aug 9 '13 at 3:43
  • @SevenSidedDie Didn't know the policy is to edit them into answer, does this apply to all sites? Because yes, I have noticed this problem but mostly on Arqade (because I frequent it more often, no idea if main SE site is better or worse) – Alok Aug 9 '13 at 23:00

Hmm.. if the problem you claim - "visually imparied users hearing random words spelled out while the page is rendered by their screen reading software" - is real (there's absolutely zero support for it in your link) then it should be a problem that is occurring with StackOverflow and the original usage of the code ticks too. There's no reason int should be fine but zorg breeder should cause a problem.

That being the case then this is either a problem that needs to be solved at the software level for the good of StackExchange overall, a bug in a specific screen reader, or your given reason isn't actually a reason at all.

Without an accessibility reason not to do so this simply comes down to subjective preference and that, frankly, is the kind of thing for the community to settle on standards for rather than something that needs imposing.

  • 14
    HTML is a semantic markdown language. It's as simple as that. The tag is called "code" because it is supposed to contain exactly that: code. Various software relies on this to be correct. A bunch of tags were even deprecated and replaced by new tags to enhance this part of the language (b -> strong and i -> em being prominent examples). It does not matter whether the specific example given is an issue, it is a matter of complying with existing standards of the underlying architecture. There is nothing wrong with SE's implementation of Markdown, it's the usage that is incorrect. – user98085 Jul 26 '13 at 23:06
  • 14
    @FEichinger is exactly right. It's not a bug, it's misuse. It would be like a blind user making a page with white text on a white background: both colour choices are valid, and they can read it, but it is not a good choice because it makes it inaccessible to visual readers. – SevenSidedDie Jul 27 '13 at 3:32
  • 3
    Unless the semantics are actually causing a problem though - something @SevenSidedDie has simply failed to demonstrate, it's completely irrelevant. Correctness on this point is just pedantry. It does not matter to the operation of the site one jot. Therefore, the only question is whether the misuse is useful to members of the site. – Jack Aidley Jul 27 '13 at 7:53
  • 1
    @FEichinger: If, as SevenSidedDie claimed unsupported by the link they gave, Screen Readers are misreading code tags then that is a bug either in the screen reader or SE's code. Even if I right int - a semantically correct usage of the code ticks - then the screen reader will read it in an exactly the same way as if I use it for zorg breeder - a semantically incorrect way - thus any issue with screen reader software is not a problem with the misuse of the tag but a bug in either SE or screen reader. – Jack Aidley Jul 27 '13 at 9:12
  • 12
    @JackAidley They are not misreading the code tags. They are interpreting code tags as code. "zorg breeder" is not code and should not be in there. What's so hard about that? – user98085 Jul 27 '13 at 9:18
  • @FEichinger: SevenSidedDie in the opening message claimed "visually imparied users hearing random words spelled out while the page is rendered by their screen reading software" - this is misreading the code tags. It is also totally unsupported by the link given. If it occurs then it's a problem but it's not a problem that is unique to the misuse of code ticks. That being the case it does not provide support either way to whether code ticks should be used here for non-code since it's a bug with semantically correct use of code ticks too. – Jack Aidley Jul 27 '13 at 9:42
  • 11
    @JackAidley No, that is the intended behavior for code - Code cannot - and should not - be "read" like normal text. But as I said before, this is completely irrelevant. This is about complying with existing standards. This neither affects only screen readers, nor does it primarily affect screen readers - they are just one type of thing that relies on the correct usage of semantic HTML. – user98085 Jul 27 '13 at 9:51
  • 1
    The code ticks tag is intended to be read inline e.g. "No, you need to make mGigglyBits an int array for that to work". That's the entire point of the code tick tags. Again if (no actual evidence of a problem has yet been presented) they're being wrongly dealt with by screen readers then that is either (a) a bug in SE or (b) a bug in the screen reader. It is categorically not a Arqade specific problem. That being so bringing it in the argument is a complete red herring because it's a problem for their intended usage as well as the Arqade specific usage. What's so hard about that? – Jack Aidley Jul 27 '13 at 10:46
  • 10
    Why would this be a bug in SE? Markdown turns backticks into <code></code>, which is perfectly correct. Screen readers then interpret this as code - Arqade, however (and a lot of other non-technical SE sites) misuse backticks for emphasis. That is semantically incorrect. Code is neither emphasised, nor is it interpreted by semantic-safe parsers as such. Google published a note on this just as well. The problem is caused by content creators, not by the software. – user98085 Jul 27 '13 at 10:55
  • 3
    @FEichinger: Does it cause words to be read out of order? That being the claim made in the original post that I'm responding to. That IS A BUG BECAUSE IT'S WRONG IN THE INTENDED USE AS WELL. – Jack Aidley Jul 27 '13 at 11:07
  • 13
    That is completely irrelevant, though. It may be incorrectly worded, but it has no bearing whatsoever on the fact that we should be complying with semantic HTML. – user98085 Jul 27 '13 at 11:10
  • It's the argument being put forth. It's completely irrelevant then that's SevenSidedDie's fault for raising that particular - rather weak - argument in the first place. – Jack Aidley Jul 27 '13 at 18:11
  • 18
    @Jack You misunderstand the argument being put forth. I'm not saying the screen reader software malfunctions. I'm saying that lying to software has unintended consequences. Using code tags for non-code is lying to software. (We don't mistag questions, so why text?) It is incorrect usage now; it's also not future-proof to mistag content that is intended to be consumed by unknown software years and decades from now. As a second prong to the argument, right now this may be causing problems for minorities, which is something we should avoid doing for the mere convenience of the majority, right? – SevenSidedDie Jul 27 '13 at 20:45
  • 1
    I couldn't care less about screen readers and "usability" of the the tags. Using the monospaced font for random terms (Sword of 1000 Truths) just looks god-awful ugly. – Nick T Jul 28 '13 at 18:26
  • 16
    @JackAidley Are you, perhaps, fixating on the phrasing "[...]random words spelled out[...]"? Because I doubt given the context it is meant to indicate that words are randomly being spelled out. But rather that to the person using a screen reader, words in the middle of a sentence are being spelled out for no discernible reason. For those of us with vision, the reason is rather obvious - code ticks make the text look different. But if we are using code tics to merely emphasize text, we are doing it wrong. – Trent Hawkins Jul 30 '13 at 7:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .