Repository navigation
Description
Description
(split from #147)
This focus-area would aim for improving test scores/support for MathML-Core Level 1 in all browsers.
MathML-Core is, itself, a specification about interoperability and providing a platform integrated definition (subset) of MathML to be supported by browsers. This focus area would specifically target the remaining integration gaps (some CSS integrations, for example) for Level 1.
Rationale
Despite its origins, the web has not prioritized the needs of integrating mathematical text into the platform. The situation has been complex for a long time. All browsers supported the integrations done with the HTML parser, and we had 2 implementations (WebKit and Gecko) with very rough edges, strange oddities and some guesswork where things were unclear. MathML-Core provides stricter definition, clarifies and explains platform integration (IDL/CSS, etc). There is an intent to ship in Chromium currently scheduled for release 109 and have been numerous PRs and work in other engines to align. Without good support, authors are left to rely on significantly large JavaScript libraries in order to render mathematical text, or use images. Neither is a solution that we would encourage for any other kind of text, and both disconnect from all of the other text, layout, scripting, accessibility and other integrations of the platform.
While many users will not encounter them in the 'waft and weft' of daily web use, support for it is critical and important. Students online need good math support. Our ability to share so many things is affected - there are millions of math equations in Wikipedia alone.
It is currently the 4th most starred Blink issue (up from 5th not long ago), see https://bugs.chromium.org/p/chromium/issues/list?can=2&q=component:Blink&sort=-stars&colspec=ID%20Stars%20Pri%20Status%20Component%20Opened%20Summary.
It would be ideal to make sure that in 2023 we focus on making this very highly interoperable.
Specification
W3C https://w3c.github.io/mathml-core/
Also a few bits in WHATWG https://html.spec.whatwg.org/
and https://www.w3.org/TR/css-fonts-4/
Tests
https://wpt.fyi/results/mathml?label=master&label=experimental&aligned&view=subtest&q=mathml
(note that at least a small number of these tests are testing things that were dropped from L1)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsProposed
Activity
NSoiffer commentedon Oct 31, 2022
Specific ask
To bridge the gap between full MathML and MathML Core, I have written a number of "polyfills". These polyfills assume MathML Core support exists in the browsers. Additionally, the MathML full spec (which we hope to advance to CR late next year), assumes MathML core is implemented in the browsers in which people read the spec. The spec uses the polyfills to illustrate the element.
One feature the transforms assume is that CSS support on MathML elements exists. However, Firefox and Safari are both missing that support.
The polyfill support for
mencloseheavily relies on CSS (example page).Chrome
In Chrome, before clicking "apply transform", it looks like:

After clicking, it looks like:

Firefox and Safari
Firefox and Safari implement a lot, but not all, of the MathML full menclose options. The polyfill tests for a number of features before running, so the before version doesn't look too bad. However, arrows (the second row) are not implemented. So in Firefox (Safari is similar), after clicking on "Apply Transform", you see:

Notice the lack of arrows in the second row.
Specifics
The CSS used for menclose can be found at the start of the menclose JS file.
Elementary math also makes use of CSS. The CSS needed for that is at the start of the elementary math JS file.
There are some wpt tests for MathML CSS, but they don't cover all the uses found in the polyfills.
fred-wang commentedon Nov 3, 2022
The original report only mentions MathML tests, but we should really also include related CSS tests. The MathML Core spec actually uses a different link includes
mathml,cssandhtmlfolders. The HTML contains the majority of the tests (~21400) but most of them are just testing HTML entity names, so they are a bit overrepresented. Moreover, most of remaining failures in the HTML tests seem unrelated to MathML Core. I think we can focus on MathML and CSS tests instead.html/canvas (2)
font-family: mathin canvas are failing in Safari (OffScreenCanvasnot supported yet)html/syntax (42)
<math><script src=...and<math><font>...failing in Chrome/Safari (Chrome and Safari don't (fully) implement speculative parsing).html/the-xhtml-syntax (21356)
css/css-contain (1)
css/css-content (1)
content: none)css/css-display (17)
display: mathon ::before and ::after failing in Chrome (TODO: analyze why)display: mathis not implemented in Firefox and Safari)css/css-fonts (28)
math-depth/math-stylenot fully implemented in Firefox and Safari)css/css-text (19)
text-transform: math-*not fully implemented, blocked on CSSWG discussions)mathml/crashtests (86)
mathml/presentation-markup (699)
mathml/relations/css-styling (1214)
attribute-mapping-001.html (160)
attribute-mapping-002.html (128)
clip-* (2)
color-* (5)
default-font-family.html (1)
font-family: mathdefault-properties-on-semantics-and-maction.html (2)
default-properties-on-the-math-root.html (8)
display-2.html (17)
display: mathignored-properties-001.html (298)
lengths-*.html (7)
mathcolor-mathbackground-css.html (1)
rgb(...)syntax not supported for mathcolor/mathbackground attributes.mathsize* (3)
mathvariant-*.html (22)
text-transformabove.mathvariantattribute not fully implemented)mi-fontstyle-fontweight.html (1)
not-participating-to-parent-layout.html (158)
padding-border-margin (208)
presentational-hints-001.html (1)
scriptlevel-001.html (15)
transform.html
transformproperty works on MathML.width-height-001.html (48)
width/height/inline-size/block-sizeproperties are ignored, as described in the spec.writing-mode (31)
mathml/relations/html5-tree (558)
mathml/relations/html5-tree
display-1.html (11)
dynamic-childlist-* (69)
href-* (3)
hrefattribute.math-global-event-handlers.tentative.html
tabindex-*.html (64)
mathml/relations/text-and-math (4)
basic-mathematical-alphanumeric-symbols-with-default-font.html
use-typo-metrics-1.html
bkardell commentedon Nov 7, 2022
The href-* (3) and tabindex-.html (64) ones should not be part of this as they are not part of Level 1. Likewise the css/css-text (19) mathvariant-.html (22) as well - but the rest of this is the list I was suggesting that focus on MathML-Core L1.
nairnandu commentedon Feb 1, 2023
Thank you for proposing Math ML Core for inclusion in Interop 2023.
We wanted to let you know that this proposal was not selected to be part of Interop this year. We had many strong proposals, and could not accept them all. This should not be taken as a comment on the technology as a whole, and resubmitting a proposal for this feature as part of a future round of Interop would be welcome.
For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023!
Posted on behalf of the Interop team.
[mathml] Update WPT tests that assume CSS width/height are ignored
[mathml] Update WPT tests that assume CSS width/height are ignored
[mathml] Update WPT tests that assume CSS width/height are ignored
[mathml] Update WPT tests that assume CSS width/height are ignored
Bug 1815063 [wpt PR 38361] - [mathml] Update WPT tests that assume CS…
Bug 1815063 [wpt PR 38361] - [mathml] Update WPT tests that assume CS…
[mathml] Update WPT tests that assume CSS width/height are ignored