Issue Bug Under Review Stale

#105459wrong structural order of checkbox and radiobutton elements in ext:form Bootstrap 5 templates (FrontendVersion2)

David Menzel 10/25/24, 08:03 updated 08/06/26, 16:02

Description

The default ext:form Bootstrap 5 templates(FrontentVersion2) have the wrong order of elements in the partials which breaks the style when using Botstrap 5 and have to be rewritten by an integrator.
The current ext:form Bootstrap 5 partials use <input> elements within a

From the Bootstrap 5 “Checks and radios” documentation: https://getbootstrap.com/docs/5.3/forms/checks-radios/#approach

Structurally, our <input>s and <label>s are sibling elements as opposed to an <input> within a <label>. This is slightly more verbose as you must specify id and for attributes to relate the <input> and <label>.

This is an issue since TYPO3 11.5 and is still an issue in the current main-branch

For example:
https://github.com/TYPO3-CMS/form/blob/main/Resources/Private/FrontendVersion2/Partials/Checkbox.html#L13
https://github.com/TYPO3-CMS/form/blob/main/Resources/Private/FrontendVersion2/Partials/MultiCheckbox.html#L17
https://github.com/TYPO3-CMS/form/blob/main/Resources/Private/FrontendVersion2/Partials/RadioButton.html#L17

Reviews 1

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". The changes above were merged or abandoned: read them before you start. How to create a patch

Commit message
[BUGFIX] wrong structural order of checkbox and radiobutton elements in ext:form Bootstrap 5 templates (FrontendVersion2) Resolves: #105459 Releases: main

History 26

  1. David Menzel commented <span data-processor="relativetime" data-value="2024-10-25T08:40:21+00:00" > 10/25/24, 08:40 </span>

    The labelClassAttribute has also the value form-check-wrapping-label defined but this is nowhere used or defined as far as I can see.
    There seems to be no CSS (either custom or Bootstrap 5) so this can be removed I would say.