Issue Bug Closed

#104682Streamline checkbox and radio rendering - irregular nesting of radio-inputs

Ayke Halder 08/21/24, 14:38 updated 10/06/26, 15:23

Description

The checkboxes and radio-inputs were streamlined in
https://review.typo3.org/c/Packages/TYPO3.CMS/+/78547

However there is a difference how the label-input nesting is implemented now.
I marked if the nesting was changed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/78547

——

typo3/sysext/form/Resources/Private/Frontend/Partials/Checkbox.html:
Nesting unchanged.

        <div class="form-check">
            <label class="… form-check-label">
                <f:form.checkbox …/>
                <span>LABEL</span>
            </label>
        </div>

typo3/sysext/form/Resources/Private/FrontendVersion2/Partials/Checkbox.html:
Nesting unchanged.

        <div …> <!-- (<-- via Field/Field.html) -->
            <label …>
                <f:form.checkbox …/>
                <span …>LABEL</span>
            </label>
        </div> <!-- (<-- via Field/Field.html) -->

——

typo3/sysext/form/Resources/Private/Frontend/Partials/MultiCheckbox.html:
Nesting unchanged.

                <div class="form-check">
                    <label class="form-check-label">
                        <f:form.checkbox …/>
                        <span>VALUE</span>
                    </label>
                </div>

typo3/sysext/form/Resources/Private/FrontendVersion2/Partials/MultiCheckbox.html:
Nesting unchanged.

                    <div …>
                        <label …>
                            <f:form.checkbox …/>
                            <span …>VALUE</span>
                        </label>
                    </div>

——

typo3/sysext/form/Resources/Private/Frontend/Partials/RadioButton.html:
*Nesting changed.*

                        <div class="form-check">
                            <f:form.radio … id="{element.uniqueIdentifier}-{idIterator.index}" class="… form-check-input" …/>
                            <label class="form-check-label" for="{element.uniqueIdentifier}-{idIterator.index}">VALUE</label>
                        </div>

typo3/sysext/form/Resources/Private/FrontendVersion2/Partials/RadioButton.html:
Nesting unchanged.

                    <div …>
                        <label …>
                            <f:form.radio …/>
                            <span …>VALUE</span>
                        </label>
                    </div>

——

Whats the intended nesting of label-input for radio-inputs?
Does typo3/sysext/form/Resources/Private/Frontend/Partials/RadioButton.html need to be reverted to the old nesting?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-06T15:23:02+00:00" > 10/06/26, 15:23 </span>

    fixed with #106596, issue can be closed