Review main Merged Breaking

79492[!!!][TASK] Connect label with element in FormEngine

Christian Kuhn CR +2 V +2 Hard +321 −173 updated 06/27/23, 14:48

Commit message

A single FormEngine element (created by "element"
classes that typically extend AbstractFormElement)
takes care of the "inner" HTML of an element.

The surrounding "outer" HTML like embedding elements
in palettes is created by "container" classes. Also,
<label> tags for single elements are created by
container classes, namely PaletteAndSingleContainer
and FlexFormElementContainer.

The situation having <label> done by a container and
the inner HTML done by elements has drawbacks:
First, "label" tags should have a "for" attribute,
to connect it with input fields having "id" attribute.
This is one of the accessibility "must haves".
Separating label and fields in different classes
does not allow doing this. Secondly, not all elements
have such input or select tags at all. In those cases,
the label is not a label, but should be a legend
embedded in a fieldset.

The patch moves the existing label tag generation from
container classes to element classes: Only elements
know if, how and where label and legend tags should
be placed. The patch adds two helper methods to
AbstractFormElement to simplify this, and connects
the label tag with the input field in all elements
or adds a fieldset with a legend.

The v12 version of the patch needs to jump through
some additional loops: When elements take care of
label or legend, they signal this by setting the
flag labelHasBeenHandled in the result array. The
container then skips label creation to not have
them twice. This is a b/w compat layer for not yet
adapted custom elements in v12. The v13 version of
the patch does not come with this fallback layer
and documents needed custom element changes in a
ReST file.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 48

Show 28 more files

Review log 1526

Show 1 earlier messages
  1. Christian Kuhn uploaded patch set 1 06/26/23, 12:39

  1. core-ci voted on patch set 1 V -1 06/26/23, 12:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42983

  2. Christian Kuhn uploaded patch set 2 V -1 06/26/23, 13:51

  3. core-ci voted on patch set 2 V -1 06/26/23, 14:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42984

  4. Jasmina Ließmann uploaded patch set 3 V -1 06/26/23, 15:09

  5. core-ci voted on patch set 3 V -1 06/26/23, 15:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42988

  6. Christian Kuhn uploaded patch set 4 V -1 06/26/23, 17:32

  7. Christian Kuhn updated the commit message in patch set 5 06/26/23, 17:37

  8. core-ci voted on patch set 4 V -1 06/26/23, 17:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42989

  9. core-ci voted on patch set 5 V -1 06/26/23, 17:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42990

  10. Christian Kuhn uploaded patch set 6 V -1 06/26/23, 17:57

  11. core-ci voted on patch set 6 V -1 06/26/23, 18:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42991

  12. Christian Kuhn uploaded patch set 7 V -1 06/26/23, 18:25

  13. core-ci voted on patch set 7 V +1 06/26/23, 18:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42992

  14. Christian Kuhn commented on patch set 7 CR -1 06/27/23, 09:59

    please review https://review.typo3.org/c/Packages/TYPO3.CMS/+/79517 we will review & merge the v12 version of the patch first, and will finalize the v13 version afterwards.
  15. Christian Kuhn uploaded patch set 8 CR -1 V +1 06/27/23, 12:48

  16. Christian Kuhn commented on patch set 8 CR -1 06/27/23, 12:48

    .rst missing
  17. core-ci voted on patch set 8 V +1 06/27/23, 12:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43029

  18. Christian Kuhn uploaded patch set 9 CR -1 V +1 06/27/23, 13:51

  19. Christian Kuhn uploaded patch set 10 06/27/23, 13:56

  20. Christian Kuhn uploaded patch set 11 06/27/23, 13:57

  21. core-ci voted on patch set 9 V +1 06/27/23, 13:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43035

  22. core-ci voted on patch set 11 V +1 06/27/23, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43037

  23. core-ci voted on patch set 10 V +1 06/27/23, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43036

  24. Christian Kuhn voted on patch set 11 V +2 CR +2 06/27/23, 14:48

  25. Christian Kuhn merged patch set 12 06/27/23, 14:48