WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 4 weeks ago

#54050 new defect (bug)

block editors italic icon inserts <em> tag instead of <i>

Reported by: inigo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords: 2nd-opinion reporter-feedback
Focuses: accessibility Cc:

Description

According to accessibility monitors we had performed on our website the use of em for italic text is a penalty
Could the editor default to using <i>?

Attachments (2)

Capture d’écran 2021-09-02 à 23.37.31.png (34.4 KB) - added by audrasjb 7 weeks ago.
Gmail editor
Capture d’écran 2021-09-02 à 23.39.38.png (67.8 KB) - added by audrasjb 7 weeks ago.
TinyMCE editor

Download all attachments as: .zip

Change History (8)

#1 @audrasjb
7 weeks ago

  • Component changed from General to Editor
  • Keywords 2nd-opinion added
  • Type changed from feature request to defect (bug)

Hello, welcome to WordPress Core Trac and thank you for opening this ticket,

I don't think it's a bad thing to use <em> or <strong> tags here, but the buttons tooltips are indeed misleading: they say "Italic" and "Bold" instead of "Emphasis" and "Strong". By the way, I'm not sure we should change the text of the tooltips as their meaning would probably become less evident for most users.

#2 @audrasjb
7 weeks ago

Below you'll find two examples of Editors using a "Bold"/"Italic" tooltip for <strong> and <em> HTML tags inserters.

#3 @inigo
7 weeks ago

thx Jb Audras for your reply

I agree that em and strong are more semantic and that's probably why they are used instead of <i> and <b>
Personally I do agree with that.
Hassle is that we have to conform to standards by bureau's that monitor our sites.
And this is such an issue.
Maybe we can argue with their criteria.
I will give that a shot.

regards Inigo

Last edited 7 weeks ago by inigo (previous) (diff)

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


6 weeks ago

#5 @joedolson
6 weeks ago

  • Keywords reporter-feedback added

What is the service or tool that's flagging the use of strong and em as an error? In my opinion, while there are absolutely cases where <i> is more appropriate than <em>, it's not a simple "em is always wrong" decision.

If you absolutely must have this fixed for your auditors, I'd recommend using a filter on the_content that just replaces those elements - but I can't see this change as a benefit for most users.

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


4 weeks ago

Note: See TracTickets for help on using tickets.