← Back to release summary

Update fallback content's behavior for ImageInputType and HTMLImageElement

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 85)
Intent stage
Shipped

Summary

Previously, there have been inconsistencies on the implementation of fallback content and its treatment as a replaced element for ImageInputType and HTMLImageElement. This led to interoperable issues between implementors. Examples: <input style="display: inline;" type=image alt="ALT"> <img title="foo"> <img src="foo" width=10 height=10 alt> Please see, https://github.com/yuzhe-han/images-fallback-content-1094763, for visual comparison.

Motivation

The behavior of ImageInputType's and HTMLImageElement's fallback content was not very interoperable, and not clearly specified. With this HTML spec PR (https://github.com/whatwg/html/pull/5315) the behavior has been more completely specified. Chrome will implement this modified behavior starting in M85. See https://github.com/whatwg/html/issues/5309, https://bugzilla.mozilla.org/show_bug.cgi?id=1196668, and tracking bugs for more details and conversation.

Standards & signals

Docs: N/A

Explainers: https://github.com/whatwg/html/issues/5309

View on chromestatus.com