this post was submitted on 30 Oct 2025
8 points (90.0% liked)

Lemmy

14061 readers
11 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

founded 5 years ago
MODERATORS
 

Currently, "bold" and "italic" markup doesn't actually output bold and italic text (semantically); instead, it outputs strongly emphasized (<strong>) and emphasized (<em>) text. This is completely wrong and semantic markup abuse, since we can't guarantee that bold text will only be used for strong importance or that italic text will only be used for emphasis. HTML output for this markup should be changed to general-purpose elements (i.e. *%text%* (_%text%_) should be <i>%text%</i>, not <em>%text%</em>, and **%text%** (__%text%__) should be <b>%text%</b>, not <strong>%text%</strong>).

top 8 comments
sorted by: hot top controversial new old
[–] dessalines@lemmy.ml 5 points 2 weeks ago* (last edited 2 weeks ago)

You'll need to take this up with markdown-it, which is one of the most popular javascript markdown libraries, and follows the CommonMark spec. They know what they're doing and I'm sure have reasons for rendering it that way.

Edit: https://spec.commonmark.org/0.31.2/#emphasis-and-strong-emphasis

[–] actionjbone@sh.itjust.works 3 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

"Strong" and "emphasis" are used for accessibility purposes.

For example, person blind since birth won't know what "italic" looks like. But they will understand the concept of emphasizing something.

And before you reply to me: I'm talking about compliance standards designed for use throughout the Internet. I'm not just sharing my opinion on this. My opinions are irrelevant. When I work in UX, I follow the standards.

[–] Venat0r@lemmy.world 2 points 2 weeks ago (1 children)

the standards are just a bunch of people's opinions, if this post suggests something contrary to the standards, that just means it's a discussion about the standards themselves. it is valid to point out the standards, but to consider them gospel is foolish.

[–] actionjbone@sh.itjust.works 3 points 2 weeks ago

No. They are tested standards, and were created based on extensive data and research.

[–] onehundredsixtynine@sh.itjust.works 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

used for accessibility purposes

Screen readers do not and should not care about presentation; abusing semantic markup to indicate through emphasis that something is italic or bold is anti-accessibility.

[–] actionjbone@sh.itjust.works 1 points 2 weeks ago (1 children)

Accessibility is about providing equivalent experiences. Presentation absolutely matters because bold, italics, etc. are used to indicate context. Markup exists to indicate context, not the other way around.

How familiar are you with ADA 508 and the latest WCAG standards?

[–] onehundredsixtynine@sh.itjust.works 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

bold, italics, etc. are used to indicate context

How can you guarantee they are? There are no technical restrictions or instructions on how much or where you can use emphasis and strong emphasis in your message. Until that's not the case, "italic" and "bold" should be treated as purely presentational markup.

[–] actionjbone@sh.itjust.works 1 points 2 weeks ago

They're used to indicate context because that's how the English language works, my dude.

Sure, in other languages they may not be. But it's universal in many Western languages.