Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate <none> element in Core #173

Closed
dginev opened this issue Nov 10, 2022 · 11 comments
Closed

Deprecate <none> element in Core #173

dginev opened this issue Nov 10, 2022 · 11 comments

Comments

@dginev
Copy link

dginev commented Nov 10, 2022

Hi @fred-wang !

In the MathML Full meeting today (November 10, 2022), the group had consensus that we should explore further a deprecation for the <none> element, based on my issue #428 in the MathML issues.

I was tasked by the group to also open a mirroring issue in the MathML Core repository, and ask you (Frédéric) if the existing implementations of MathML Core are in full compliance with the text describing <none> in the Core spec, or if there are any special implementation details we should be aware of.

If no further changes are needed, we are likely to proceed with a deprecation step. Does that sound good on your end? Thanks!

@fred-wang
Copy link
Contributor

Yes, <none> does not seem to be used anywhere in WebKit, Chromium, Firefox for layout or accessibility. Its only use in Firefox seems to be to display a special warning message when used outside in mub/msup/msubsup.

I believe it can just be removed from MathML Core (and so treated as unknown element) so it continues to be laid out as an <mrow> when it has display: math.

For browsers, this will also allow to get rid of automatically generated code for declared tags.

@dginev
Copy link
Author

dginev commented Nov 11, 2022

Got it, thank you for the fast reply!

We can continue the discussion in the meeting next Thursday and move things along.

fred-wang added a commit that referenced this issue Nov 25, 2022
This makes clearer that `<none>` is not involved at all in the layout of
`<mmultiscripts>`. The corresponding example relies on empty `<mrow>`
elements instead. The note for `<none>` is tweaked too to recommend
empty `<mrow>` elements.

#173
@fred-wang
Copy link
Contributor

So actually in Firefox, a <none/> child of msub/msup/msubsup, or as the first child of the mmultiscripts, was causing the element to be rendered as "invalid". This special handling is removed in https://bugzilla.mozilla.org/show_bug.cgi?id=1802336

If <none> is removed from MathML Core, as I suggested above, I understand this means validator would not allow that element in MathML markup. So I guess for now we can just recommend to use and empty <mrow> instead. Note that MathML Core does not use the term "deprecated". Elements/attributes are just not included, or mentioned without defining "any observable behavior" ; and there are non-normative notes explaining this is for backward compatibility.

I'll upload a PR to propose a change: #177

@dginev
Copy link
Author

dginev commented Nov 25, 2022

If is removed from MathML Core, as I suggested above, I understand this means validator would not allow that element in MathML markup. So I guess for now we can just recommend to use and empty instead.

Indeed, removal leads to <none/> being unknown in HTML. And then getting the unknown treatment of falling back to <mrow/>. Which is what makes the removal so tempting.

I believe the group discussion last week was explicitly OK with an immediate removal from Core, for what that's worth. The consensus was to mark the deprecation in MathML 4 Full (+removal in MathML 5 if nothing changes), together with a simple removal in MathML Core. Everyone liked the benefit of some harmless simplifying of the Core subset, just before it hits the CR milestone.

Now, I must say that I am personally still learning the fine differences in the processes here, and I was originally expecting a slower timeline than the one currently unfolding. So I feel obliged to tag @davidcarlisle to clarify any misstatements I may have made in my summary here. David has taken up the action item to mark the deprecation in the Full spec.

@NSoiffer
Copy link
Contributor

@dginev: even once something moves to CR, it can be removed. Indeed, if some feature doesn't get two implementations, it has to be removed. There's nothing magical about CR in that sense.

@fred-wang
Copy link
Contributor

To reiterate, for browser implementations, removing <none/> from MathML Core is totally fine, I'm happy to take that way, if that's not a problem for non-browser implementations.

@NSoiffer
Copy link
Contributor

Core is focused on browsers (definitions use CSS). Also, I think only browsers have implemented core so far, so nothing breaks.

There is not even a need for a polyfill since <none/> is treated like <mrow/>.

fred-wang added a commit that referenced this issue Nov 28, 2022
Currently, it's strictly equivalent to using an <mrow>. Removing it from
the spec make it an unknown MathML Core element and so it continues to
be treated as an `<mrow>`. The <mmultiscripts> example is updated to
rely on an empty `<mrow>` instead of an empty `<none>` element.

#173
@fred-wang
Copy link
Contributor

Alternative PR, removing none completely: #178

The Firefox's commit has landed and tests merged in WPT already: web-platform-tests/wpt#37173

@fred-wang
Copy link
Contributor

<none> is listed on MathML AAM too, we likely want to remove it and provide a default mapping for unknown MathML Core elements: https://w3c.github.io/mathml-aam

@fred-wang
Copy link
Contributor

We'll also need to update MDN pages e.g. https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mmultiscripts

@NSoiffer
Copy link
Contributor

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants