Add some CSS rules to select MathML annotations and alttext - by FredWang_

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

ID 812595 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 12/31/2013 8:00:36 AM
Access Restriction Public


There does not seem to be any plan to add MathML support in IE soon. This is becoming critical now that MathPlayer is no longer supported in Internet Explorer 11 and that large websites like MDN are starting to use MathML content.  Hence an alternative for the short term would be to implement MathML annotation / alttext so that Web developers can still provide alternate content for Internet Explorer. I already reported that for IE9 but the issue was fixed "by design" without further explanation so I hope this one will get more attention. At least support for semantics annotations and altext can be done very easily with CSS-only rules, as shown in the testcase I'll attach. So I hope Microsoft will consider integrating these rules in the IE user-agent stylesheet. I already reported a bug for Chromium and plan to submit a patch there.

For more information, see

UPDATE 2014/03/18:
1) A restricted version of the stylesheet landed in Chromium:
2) An alternative would be to use to get support for a limited number of math constructions.
Sign in to post a comment.
Posted by Microsoft on 3/18/2014 at 1:59 PM
Thank you so much for the feedback.

Unfortunately, we are not able to address this feedback in our upcoming release. We will consider your feedback for a future release.
We will keep this connect feedback bug active to track this request.

Every piece of feedback we receive is important to us and helps us improve the quality of Internet Explorer.
We continue to welcome more feedback, so please don't hesitate to report other ways that we can improve Internet Explorer.

Best regards,
The Internet Explorer Beta Team
Posted by FredWang_ on 3/18/2014 at 4:52 AM
FYI, a stylesheet to do such CSS fallback landed in Chrome today.

I'm trying to think how Wikipedia could rely on these UA rules to provide SVG fallback in the future, so it would be great if we had something consistent on all browsers without MathML support.

So I'm thinking that something like this could be possible:

1) Use the original stylesheet or a restricted version like the one in Chrome. Normal MathML will render badly, but it will be replaced with the annotation fallback, if specified by the author.

2) Use the advanced stylesheet but adapt it so that the basic math rendering will be used for normal MathML but it will be replaced with the annotation fallback, if specified by the author.

Than you to keep be updated about your plans so that I can coordinate with MediaWiki Math developers.
Posted by FredWang_ on 3/11/2014 at 3:55 PM
FYI, I've published on GitHub a CSS3 stylesheet based on Presto's former MathML stylesheet (

This could be an alternative to display basic MathML constructions.
Posted by Microsoft on 1/31/2014 at 8:30 AM
Thank you for your feedback. We will be investigating this issue further.

Best regards,

The Internet Explorer Team
Posted by FredWang_ on 1/1/2014 at 9:24 AM
I just upload a test case. Here are more pages from MDN:
Posted by FredWang_ on 1/1/2014 at 8:47 AM
I just submitted a patch to implement this in Blink. I realized that there was a mistake in my previous attachment. Some CSS selectors should use "+" rather than "~" since we only want the first annotation to be displayed. Here is the user agent stylesheet I ended up writing:

--- mathml.css ---
@namespace "";

/* By default, we only display the MathML formulas without any formatting other than the one specified by the display attribute. */
math {
    display: inline;
math[display="block"] {
    display: block;
    text-align: center;

/* We only display the second child of a <semantics> element, which is its first annotation. */
semantics > * {
    display: none;
semantics > *:first-child + annotation,
semantics > *:first-child + annotation-xml {
    display: inline-block;

/* If an alttext attribute is specified, we replace the MathML formula with that text. */
math[alttext] * {
    display: none;
math[alttext]::after {
    content: attr(alttext);
Posted by FredWang_ on 12/31/2013 at 8:14 AM
I attached a mathml.xml file showing a testcase and CSS implementation.
See also for a HTML version.