Problem
The checkbox component definition marks checkedValue and uncheckedValue as required: false with no default value. This means a checkbox can be authored and validated successfully without specifying what value it submits when checked or unchecked.
When neither property is set, AEM Core Components fall back to submitting the HTML default "on" when the checkbox is ticked. This is silent and non-obvious — the form validates, the field renders, and required: true guards against skipping it, but the submitted value is undefined/unpredictable unless the author explicitly sets checkedValue.
Impact
- Form authors can create checkbox fields that pass schema validation but submit an implementation-specific default (
"on") instead of a meaningful domain value (e.g. "true", "agreed").
- Back-end submission processors that check for a specific string value will silently miss, with no authoring-time warning.
- Tooling that generates component payloads from a spec (e.g. AI-assisted authoring) has no signal to prompt for these values.
Proposed Solution
Mark checkedValue as required: true in the checkbox component definition. Optionally also require uncheckedValue when enableUncheckedValue is true.
This would cause validate-patch and the AEM dialog to surface missing values at authoring time rather than silently falling back to "on".
Component
core/fd/components/form/checkbox/v1/checkbox
Definition field: ./checkedValue — currently required: false, no default
Problem
The
checkboxcomponent definition markscheckedValueanduncheckedValueasrequired: falsewith no default value. This means a checkbox can be authored and validated successfully without specifying what value it submits when checked or unchecked.When neither property is set, AEM Core Components fall back to submitting the HTML default
"on"when the checkbox is ticked. This is silent and non-obvious — the form validates, the field renders, andrequired: trueguards against skipping it, but the submitted value is undefined/unpredictable unless the author explicitly setscheckedValue.Impact
"on") instead of a meaningful domain value (e.g."true","agreed").Proposed Solution
Mark
checkedValueasrequired: truein the checkbox component definition. Optionally also requireuncheckedValuewhenenableUncheckedValueistrue.This would cause
validate-patchand the AEM dialog to surface missing values at authoring time rather than silently falling back to"on".Component
core/fd/components/form/checkbox/v1/checkboxDefinition field:
./checkedValue— currentlyrequired: false, nodefault