← Back to release summary

<input type="checkbox" defaultindeterminate>

Category
Miscellaneous
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Adds a "defaultindeterminate" attribute to <input type="checkbox"> to allow specifying indeterminateness statically. Today, the IDL attribute must be invoked via JavaScript, which blocks static HTML generators and server-side rendering pipelines from being able to make easy use of indeterminate checkboxes.

Motivation

Checkboxes today cannot be statically defined to have an indeterminate state, and can only reach that state post-creation through JavaScript invoking a property setter. It is possible to represent indeterminateness to Assistive Technologies (ATs) via the aria-checked=mixed content attribute value, but that only applies to Assistive Technologies. The discussion in whatwg/html#6578 identified several situations where this gap is made apparent today, and adding this attribute will allow filling those gaps.

Standards & signals

Ecosystem

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/DefaultIndeterminate/explainer.md

View on chromestatus.com