Make WordPress Core

Opened 5 months ago

Closed 6 days ago

#54050 closed defect (bug) (wontfix)

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

Reported by: inigo Owned by:
Milestone: 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 5 months ago.
Gmail editor
Capture d’écran 2021-09-02 à 23.39.38.png (67.8 KB) - added by audrasjb 5 months ago.
TinyMCE editor

Download all attachments as: .zip

Change History (10)

#1 @audrasjb
5 months 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
5 months ago

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

#3 @inigo
5 months 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 5 months ago by inigo (previous) (diff)

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


5 months ago

#5 @joedolson
5 months 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 months ago

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


6 days ago

#8 @ryokuhi
6 days ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This ticket was reviewed today during the accessibility team's bug-scrub.

As there hasn't been any further feedback on this ticket for the last few months, we're closing this ticket as wontfix: changing the HTML element added when pressing the Italic button doesn't seem to impact accessibility significantly and we haven't been able to identify any standard according to which the i element would be better than the em element.

Note: See TracTickets for help on using tickets.