Elementary Standards
HTMLCSSWeb StandardsSEOBlogStart reading
Home / Blog / HTML-in-Canvas Ships in Chrome 157
Browsers

HTML-in-Canvas Ships in Chrome 157 — Safari and Firefox Aren't Running It

For the first time, a canvas can hold a real, accessible, selectable DOM element instead of a flat bitmap of one — if your users are on Chromium.

Chrome 157 reached stable on November 3 carrying a feature that quietly closes a twenty-year gap between canvas-based apps and everything else on the web: the HTML-in-Canvas API lets you draw a live, interactive DOM element — not a snapshot of one — directly into a 2D, WebGL, or WebGPU canvas. The element you draw stays selectable, focusable, translatable, and visible to the accessibility tree, because it is the element; the canvas is just placing it at the coordinates and transform you choose. For teams whose product is a canvas-heavy tool — a design surface, a map, a data viz dashboard, a game HUD — that used to mean building a parallel, hand-rolled accessible layer on top of the bitmap. Shipping that kind of interactive surface well is exactly the kind of cross-browser, standards-aware work a team that can build an MVP fast without boxing you into a Chromium-only product needs to plan for from day one.

drawElement()SafariFirefox

What actually changed

Before Chrome 157, anything you drew into a canvas — whether with the 2D context or a WebGL/WebGPU texture — was pixels. Text inside a canvas couldn't be selected, translated by the browser, found with Ctrl+F, or read reliably by a screen reader; developers who cared had to re-implement an invisible accessible shadow layer by hand, duplicating every piece of text and keeping it in sync with the drawing. HTML-in-Canvas removes that duplication. On the 2D context, ctx.drawElement(element, x, y) renders a real DOM node into the canvas; on WebGL and WebGPU, canvas.updateElementGeometry(element, { canvasTransform }) keeps that element's hit box and transform in sync with a texture. The browser's own accessibility tree, translate, autofill, and Find-in-Page machinery all keep working, because the node sitting inside the canvas boundary is the same node the rest of the page would otherwise render normally.

Framework integrations landed alongside the API rather than after it: Three.js, Babylon.js, PlayCanvas, and PixiJS all added support ahead of the Chrome 157 stable release, which is one reason this shipped as a usable feature rather than a developer-trial curiosity.

The part that matters more than the API: who doesn't run it

HTML-in-Canvas is on by default in Chrome and Edge 157. Safari and Firefox implement neither context method, and neither engine has a public origin trial running for it, a gap independently tracked by the community browser-support page for the API. That's not a temporary rollout lag — WebGL and WebGPU accessibility gaps have historically taken years to close across engines, and this API touches rendering, accessibility tree composition, and input hit-testing simultaneously, which is a slow combination to standardize. Until that changes, any canvas-based product that leans on drawElement() for its primary content is a Chromium-only experience unless it ships a fallback.

Where this actually bites

What this means for developers

Treat drawElement() and updateElementGeometry() as progressive enhancement, not baseline behavior, for at least the next several release cycles. Feature-detect before relying on them ('drawElement' in CanvasRenderingContext2D.prototype), and keep whatever DOM-overlay or ARIA-live fallback you already ship for Safari and Firefox users rather than retiring it. If you're building a canvas-heavy product from scratch and want the accessibility win without a two-tier experience, design the overlay-based fallback first and layer HTML-in-Canvas on top as the enhanced path for Chromium — not the other way around. Teams validating a canvas-centric product idea should budget explicitly for this dual-path work in scope and timeline rather than discovering the cross-browser gap after a demo only works on the founder's laptop.

When does this close

There's no published timeline from WebKit or Mozilla for implementing HTML-in-Canvas as of this writing, and no entry for it in either engine's public standards-position trackers yet. Treat it as a multi-release-cycle gap rather than something to plan a launch date around; re-check browser support before committing a roadmap to it being universal.

Back to the blog
More notes

Keep reading