web-platform-tests / interop

web-platform-tests Interop project
https://wpt.fyi/interop
318 stars 27 forks source link

Mathematics Rendering #787

Open physikerwelt opened 1 month ago

physikerwelt commented 1 month ago

Description

This proposal seeks to improve the success rate of the already defined MathML presentation tests

https://wpt.fyi/results/mathml/presentation-markup?label=experimental&label=master&aligned

Specification

https://w3c.github.io/mathml-core

Additional Signals

Relatively minor layout problems regarding the size and position of mathematical symbols in MathML core implementations across browsers hinder major websites' wider adoption of MathML. Thus, mathematical expressions are displayed via other mechanisms such as images, as LaTeX source code is to be rendered by JS, or content is entirely provided as PDF. For example, some Wikimedians still prefer images over HTML as the rendering issues (shown in failing tests above) make it difficult to understand the meaning of formulae, as the relative position of mathematical elements determines the semantics. For example, 2 to the power of 2 might look like 22 if the layout is incorrect. People with limited vision are particularly affected.

This request follows #556 and #197 and was endorsed by the W3C MathWG.

Size and Current State of the Feature

Most browsers have a good MathML support. However, small inaccuracies in rendering can make an entire formula unreadable or misleading, which is why browser interop is crucial for successful MathML outcomes.

Browser Bugs

Related browser bugs are linked from the test suite in the section

Relevant links for /mathml/presentation-markup results

Likely Compatibility Impact

Currently, MathJax or image-based rendering seems to be more widely used than HTML with MathML. Fixing the layout issues will foster the adoption of content providers and the development of polyfills on a detailed level if only a few issues remain.

Platform Impact

Accessibility

MathML formulae are more accessible than images.

Internationalization

Embedding international symbols is possible in MathML and is only poorly supported by other techniques.

Privacy

Using JS polyfills that are distributed via CDN poses a significant privacy concern.

Security

The client-side community-maintained JS is more vulnerable than MathML-based formatting by browsers.

Overall Project Balance

While most websites do not use mathematical expressions at all, those websites that do (such as arXiv, Wikipedia, community forums) would significantly benefit from the proposal.

NSoiffer commented 1 month ago

The list of users that benefit should include STEM journal publishers and STEM textbook publishers. For textbooks, the cost of producing braille versions by schools that contain math is prohibitive; eBooks are great accessibility alternative.