Implement MathML <a> element
- Category
- DOM
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: For mathml link click navigation, we have href-click-001.html to href-click-004.html https://wpt.fyi/results/mathml/relations/html5-tree/href-click-001.html?label=experimental&label=master&aligned For the tabindex focus test, we have tab-index-001 to tab-index-002, and tabindex-focus-001.html https://wpt.fyi/results/mathml/relations/html5-tree/tab-index-002.html?label=experimental&label=master&aligned https://wpt.fyi/results/mathml/relations/html5-tree/tabindex-focus-001.html?label=experimental&label=master&aligned
Summary
Introduces the <a> element within the MathML namespace exposed via the new MathMLAnchorElement WebIDL interface which inherits from MathMLElement. This feature aligns MathML hyperlink capabilities with HTMLAnchorElement and SVGAElement to ensure consistent link handling across HTML, SVG, and MathML.
Motivation
Linking is an important web feature and support is highly desired for MathML (e.g. to be able to create links on different parts of a mathematical expression). In the past, href was supported on all MathML elements to allow that (in MathML2 in the XLink namespace, and in MathML3 the default namespace) but some concerns were raised this was a bit too intrusive, because we have to do privacy mitigation ( https://github.com/w3c/mathml-core/issues/142 ), handle it specially in the the sanitizer API. We need a new <a> element for MathML to enable hyperlinks in mathematical expression
Standards & signals
- Specification: https://w3c.github.io/mathml-core/#the-a-element
- Firefox: Positive
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/u/1/issues/510487697
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=mathml%2Frelations%2Fhtml5-tree%2Fhref-click-001
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Implement%20MathML%20%3Ca%3E%20element
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Implement%20MathML%20%3Ca%3E%20element
- Baseline status: https://webstatus.dev/?q=Implement%20MathML%20%3Ca%3E%20element
Docs: https://people.igalia.com/fwang/mathml-a-href
Samples: https://people.igalia.com/fwang/mathml-a-href
Explainers: https://people.igalia.com/fwang/mathml-a-href