#18083·cakephp

RFC - 6.0 - Don't nest input inside label by default for checkboxes/radios

Author: ADmadCreated Dec 13, 2024Updated Aug 11, 2026
Labelsenhancement

Description

IIRC we started the nesting by default as that's what Bootstrap did (the dominant CSS lib at the time).

As of Bootstrap 5.0 it no longer expects inputs to be nested inside the label tag. The UI world's current darling, Tailwind CSS, also doesn't seem to expect checkboxes/radios nested inside labels.

So this default nesting adds additional burden on the devs to remove, if they are using one of the current popular CSS libs. Hence my proposal to remove the default nesting and keep it as an optional feature.

CakePHP Version

6.0