Skip to content

New defaultindeterminate attribute for <input type=checkbox> - #13224

Open
AtOMiCNebula wants to merge 5 commits into
whatwg:mainfrom
AtOMiCNebula:Input-DefaultIndeterminate
Open

AtOMiCNebula wants to merge 5 commits into
whatwg:mainfrom
AtOMiCNebula:Input-DefaultIndeterminate

Conversation

@AtOMiCNebula

@AtOMiCNebula AtOMiCNebula commented Nov 9, 2026 •

Copy link
Copy Markdown

Fixes #6578, which identified a gap where indeterminateness could not be specified statically, blocking static HTML generators and server-side rendering processes from being able to use indeterminate checkboxes without resorting to invoking JavaScript. To fill this gap, I'm adding a defaultindeterminate content attribute that is reflected by a defaultIndeterminate IDL attribute (not the existing indeterminate IDL attribute). A dirty indeterminateness concept is added, and parallels the existing concept of dirty checkedness, to allow interaction and usage of the indeterminate IDL attribute to separate the control from the "default" value.

The name choice is in line with other groups' recent decisions, such as Open UI choosing initiallyopen over a live open content attribute (see openui/open-ui#311 (comment)). It also helps address confusion around the (lack of) liveness between the content attribute and the actual value of the control.

Additionally, introducing a new dirty indeterminateness concept instead of overloading dirty checkedness better matches existing user agent behavior, where the indeterminate IDL property doesn't establish dirty checkedness. User interaction would establish dirty indeterminateness, in addition to dirty checkedness.

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


  • At least two implementers are interested (and none opposed):
    • Chromium
    • …
  • Tests are written and can be reviewed and commented upon at:
    • …
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): …
    • Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): …
  • Corresponding HTML AAM & ARIA in HTML issues & PRs:
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


/acknowledgements.html ( diff )
/indices.html ( diff )
/input.html ( diff )

@agammann agammann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkbox activation step changes indeterminateness from “set to false” to “set to its opposite value.” For an ordinary checkbox starting with indeterminate === false, the first click would set it to true, making normal checkboxes appear mixed after activation. Could activation continue to clear indeterminateness and only mark the new dirty flag?

@AtOMiCNebula

Copy link
Copy Markdown
Author

Could activation continue to clear indeterminateness and only mark the new dirty flag?

Yes, this was an accident on my part, I misinterpreted some of the early commentary in the original issue. Will revert this section's changes today.

Separate the Checkbox and Radio Button applicability cells and move defaultindeterminate handling into the centralized input attribute change steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

New indeterminate attribute for <input type=checkbox>

2 participants