[wp-trac] [WordPress Trac] #13340: wpautop breaks inline MathML

WordPress Trac noreply at wordpress.org
Fri Dec 16 18:57:57 UTC 2022


#13340: wpautop breaks inline MathML
------------------------------------------+----------------------------
 Reporter:  nicholaswilson                |       Owner:  (none)
     Type:  defect (bug)                  |      Status:  reopened
 Priority:  normal                        |   Milestone:  6.2
Component:  Formatting                    |     Version:  2.9.2
 Severity:  normal                        |  Resolution:
 Keywords:  needs-refresh needs-dev-note  |     Focuses:  accessibility
------------------------------------------+----------------------------
Changes (by ryokuhi):

 * keywords:   => needs-refresh needs-dev-note
 * type:  enhancement => defect (bug)
 * milestone:  Awaiting Review => 6.2


Comment:

 This ticket was reviewed today during the weekly bug scrub of the
 Accessibility Team.

 The `math` element has a `display` attribute that can be set to either
 `block` or `inline`, allowing the user to decide how the element should be
 treated. By applying the `wpautop` function to all `math` elements,
 WordPress is overriding a choice that should be left to users, displaying
 all `math` elements as block ones.

 After a quick check, it appears that the `math` element, if no `display`
 attribute is set, is displayed as an inline element in Chrome, Edge, and
 Firefox on Windows. If this is the standard behavior, then simply removing
 `math` from `$allblocks` in the `wpautop` function might break the styling
 on websites, as all `math` elements displaying as blocks would be shown as
 inline.

 After a short discussion, the team decided that this should not be a
 blocker to moving this ticket forward: the ticket is now milestoned for
 the next major release, but we're already adding the `needs-dev-note`
 keyword so that users will be aware of this possibly breaking change in
 their layouts.

 I'm also transforming this ticket to a bug since there currently are no
 other ways to add adding formulas to a website that are also accessible.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/13340#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list