3 ms·
You can put arbitrary HTML elements inside an SVG element embedded in an HTML page: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject http
by nybble41 6y ago
You can put arbitrary HTML elements inside an SVG element embedded in an HTML page:
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject https://developer.mozilla.org/en-US/docs/Web/SVG/Element/for...
- chryton 6y agoI wonder what the accessibility for html in svg is like. But really, isn't this just an iframe with a different name?
- chrismorgan 6y agoNo. An iframe is a separate browsing context which as a developer you can’t interact with perfectly, and is segregated from the rest as a user, which has implications on keyboard interactivity especially. Essentially, <iframe> is an accessibility headache. <foreignObject> is just the opposite of <svg>, so it’s no trouble at all.