Review main Work in progress Breaking

94059[!!!][FEATURE] Render a documented class contract in EXT:form frontend

Josua Vogel CR 0 V -1 Nightmare +855 −2922 updated 11/19/26, 11:54

Commit message

EXT:form stored CSS class names as properties in the YAML definitions
of each form element type and in the rendering options of the Form and
SummaryPage prototypes. The Fluid partials resolved them at render time,
for example `{element.properties.elementClassAttribute}`. Which
configuration shaped the DOM was hard to follow, and a theme had to
override both the configuration and the templates to style a form.

All class properties are removed. The frontend templates render a fixed
set of class names instead, following three rules: single hyphens only
(`field`, `field-label`, `field-control-select`), states as attributes
rather than classes (`aria-invalid="true"`), and names that describe
what an element does. A theme can style every form element type through
a stylesheet alone.

The aria label of the form navigation is now a translatable label
instead of an English rendering option. In radio button and checkbox
groups only the first option carries `aria-invalid`.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 9
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/59/94059/9 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/59/94059/9 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Merge conflicts 7

Issues 1

Files 158

Show 138 more files

Review log 2534

Show 89 earlier messages
  1. Josua Vogel uploaded patch set 1 05/11/26, 13:17

  2. Josua Vogel marked it work in progress 05/11/26, 13:17

  3. core-ci voted on patch set 1 V -1 05/11/26, 13:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101830

  4. Chris Müller commented on patch set 1 05/11/26, 16:48

    I am curious about the reason behind this? Actually, I like the current implementation as I don't have to override the whole template when I just want to adjust the class names.
  5. Josua Vogel commented on patch set 1 05/14/26, 15:39

    Reply

    My intention is to have a single place for frontend rendering: the template file. I’d prefer not to mix the Fluid template with YAML configuration. I believe this approach is more straightforward, but I’m happy to discuss it.
  6. Chris Müller commented on patch set 1 05/14/26, 16:12

    Reply

    In understand your point. But for me it means, I have to copy all the relevant partials of the form elements to the site package to adjust only the class names - so I cannot benefit from fixes of new releases. Or do I miss something?
  7. Josua Vogel commented on patch set 1 05/14/26, 16:44

    Reply

    No, that´s right. I never use the default templates. I have to think about it.
  8. Josua Vogel commented on patch set 1 05/14/26, 17:00

    Reply

    another point: If you want to modify the classes of default content element, you need to override the templates too. That would further standardize the approach in the core
  9. Josua Vogel commented on patch set 1 05/15/26, 09:46

    and I want to remove the bootstrap classes from the frontend templates in another patch
  1. Josua Vogel uploaded patch set 2 V -1 05/21/26, 20:18

  2. Josua Vogel marked it ready for review 05/21/26, 20:19

  3. core-ci voted on patch set 2 V +1 05/21/26, 20:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102336

  4. Garvin Hicking commented on patch set 2 CR -1 05/22/26, 06:38

    I'm sorry but I have to agree with Chris here. I think this is a heavy burden for integrators who want to use a working form template and easily customize it. The templates carry a lot of logic that integrators do not want to maintain I think (otherwise they would have to keep up with a lot of maintenance as seen in v14, like jquery or field removal or translations). So suddenly an integrator needs to maintain actual functionality of complex templates they might not understand, when all they want is to match usual HTML elements to their site's CSS / frontend framework. I do understand that architecturally it blurs the borders of having mixed responsibility for YAML to influence layout. But on the other hand, I would argue YAML should be the sole entry point into "common configuration". People who want a clearer distinction currently have the ability to insert their stripped down templates already, which fixate frontend layout. So we would only take away a valid use case, while the other use case can already be satisfied. Also, think of third party extensions that provide pre-build forms, and want to match them to the extensions layout. They would need to ship and maintain the whole EXT:form frontend templates then. And if integrators override EXT:form templates themselves, they would again have to override the whole templates for a custom CSS class again. This is why I think the CSS classnames for simple frontend configuration is much needed and should stay. Also I think this would be an impactful breaking change that would probably deserve deprecation first.
  5. Benjamin Kott commented on patch set 2 05/22/26, 09:52

    i am in favor removing it from the configuration but i think we should not simply move the css classes but define a new set of classes not occupied by bootstrap or else already and ship some custom css with some css properties to make adjustments easy
  6. Garvin Hicking commented on patch set 2 05/22/26, 09:54

    Reply

    ack. we can then create a site set that delivers the default CSS for the new classes so its less breaking. Existing customizations would need to adapt to the new classes, so that's definitely breaking and would need an ReST file.
  7. Josua Vogel marked it work in progress 05/26/26, 12:53

  8. Josua Vogel uploaded patch set 3 CR -1 V +1 05/29/26, 05:35

  9. core-ci voted on patch set 3 V -1 05/29/26, 05:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102585

  10. Josua Vogel uploaded patch set 4 V -1 06/07/26, 17:42

  11. Josua Vogel uploaded patch set 5 06/07/26, 17:45

  12. Josua Vogel marked it ready for review 06/07/26, 17:46

  13. Josua Vogel commented on patch set 5 06/07/26, 17:48

    Reply

    I've added a rst file. Maybe we could handle the default CSS in a separate patch so this one doesn't get too big.
  14. Josua Vogel uploaded patch set 6 06/07/26, 17:51

  15. core-ci voted on patch set 4 V -1 06/07/26, 17:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103087

  16. Josua Vogel updated the commit message in patch set 7 06/07/26, 17:54

  17. Josua Vogel commented on patch set 7 06/07/26, 17:58

    Reply

    Done

    Reply

    Acknowledged

    Reply

    Acknowledged
  18. Josua Vogel commented on patch set 7 06/07/26, 17:58

    Reply

    Done
  19. core-ci voted on patch set 5 V -1 06/07/26, 17:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103088

  20. core-ci voted on patch set 6 V +1 06/07/26, 18:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103089

  21. core-ci voted on patch set 7 V +1 06/07/26, 18:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103090

  22. Josua Vogel rebased onto patch set 8 V +1 07/26/26, 16:56

  23. core-ci voted on patch set 8 V +1 07/26/26, 17:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105427

  24. Josua Vogel uploaded patch set 9 V +1 11/19/26, 11:40

  25. core-ci voted on patch set 9 V -1 11/19/26, 11:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115003