- From: Neil Soiffer <soiffer@alum.mit.edu>
- Date: Tue, 8 Apr 2025 15:36:50 -0700
- To: "www-math@w3.org" <www-math@w3.org>
- Message-ID: <CAESRWkDbNabWpt3win-PqAui1eReuP-v1MhmFJ=QV9mMAa+6fg@mail.gmail.com>
Someone told me that the W3C validator
<https://validator.w3.org/detailed.html> refused to accept <input> inside
of leaf elements. I tried it with both <mi> and <mtext> -- the example
below uses <mi>. The page seemed to work fine in Chrome and Firefox.
Did I do something wrong? If not, is there anything we can do to get the
validator fixed?
Neil
==================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Input element in MathML</title>
<script type="module">
import { _MathTransforms } from '
https://github.com/w3c/mathml-polyfills/common/math-transforms.js'
import 'https://github.com/w3c/mathml-polyfills/menclose.js'
document.head.appendChild ( _MathTransforms.getCSSStyleSheet() );
window.addEventListener("DOMContentLoaded", () => {
_MathTransforms.transform(document.body)
})
</script>
</head>
<body>
<h1>Input Field in MathML</h1>
<p>Adding the 'input' element breaks parsing in the W3C validator</p>
<math display='block'>
<mrow>
<mn>3</mn><mo>+</mo><mn>4</mn><mo>=</mo>
<menclose notation="box"><mi><input type="text" size="2" id="answer"
name="answer/></mi></menclose>
</mrow>
</math>
</body>
</html>
Received on Tuesday, 8 April 2025 22:37:12 UTC