Review main Merged Breaking

90594[!!!][TASK] Migrate Modal component from Bootstrap to native dialog

Andreas Nedbal CR +2 V +2 Expert +718 −542 updated 12/15/25, 15:37

Commit message

Replaces Bootstrap modal implementation with native HTML <dialog>
element for better accessibility and improved performance.

Breaking Changes:
- Bootstrap modal events (*.bs.modal) are no longer available
- Modal now uses native <dialog> element instead of Bootstrap markup
- Static backdrop behavior updated to use dialog::backdrop

Migration:

Bootstrap modal events have been removed. Use the existing TYPO3
modal events which remain supported:
- typo3-modal-show (before modal opens)
- typo3-modal-shown (after modal opens)
- typo3-modal-hide (before modal closes)
- typo3-modal-hidden (after modal closes)

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 38

Show 18 more files

Review log 3148

Show 1323 earlier messages
  1. Andreas Nedbal uploaded patch set 1 09/08/25, 09:59

  2. Andreas Nedbal marked it work in progress 09/08/25, 09:59

  3. core-ci voted on patch set 1 V -1 09/08/25, 10:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84614

  4. Benjamin Kott marked it ready for review 10/17/25, 09:51

  5. Benjamin Kott uploaded patch set 2 V -1 10/17/25, 10:01

  6. core-ci voted on patch set 2 V -1 10/17/25, 10:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86887

  7. Benjamin Kott uploaded patch set 3 V -1 10/17/25, 13:16

  8. core-ci voted on patch set 3 V -1 10/17/25, 13:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86903

  9. Benjamin Kott uploaded patch set 4 V -1 10/17/25, 14:00

  10. core-ci voted on patch set 4 V -1 10/17/25, 14:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86912

  11. Benjamin Kott uploaded patch set 5 V -1 10/21/25, 09:00

  12. Benjamin Kott uploaded patch set 6 10/21/25, 09:07

  13. core-ci voted on patch set 5 V -1 10/21/25, 09:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87155

  14. core-ci voted on patch set 6 V -1 10/21/25, 09:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87156

  15. Benjamin Kott uploaded patch set 7 V -1 10/21/25, 09:27

  16. core-ci voted on patch set 7 V -1 10/21/25, 09:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87158

  17. Benjamin Kott uploaded patch set 8 V -1 10/21/25, 10:16

  18. Benjamin Kott uploaded patch set 9 10/21/25, 10:23

  19. core-ci voted on patch set 8 V -1 10/21/25, 10:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87161

  20. core-ci voted on patch set 9 V -1 10/21/25, 10:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87164

  21. Benjamin Kott uploaded patch set 10 V -1 10/21/25, 10:48

  22. core-ci voted on patch set 10 V -1 10/21/25, 10:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87168

  23. Benjamin Kott uploaded patch set 11 V -1 10/21/25, 10:58

  1. Benjamin Kott uploaded patch set 12 10/21/25, 10:59

  2. Benjamin Kott uploaded patch set 13 10/21/25, 11:07

  3. core-ci voted on patch set 11 V -1 10/21/25, 11:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87169

  4. core-ci voted on patch set 12 V -1 10/21/25, 11:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87170

  5. core-ci voted on patch set 13 V -1 10/21/25, 11:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87172

  6. Benjamin Kott uploaded patch set 14 V -1 10/21/25, 12:10

  7. core-ci voted on patch set 14 V +1 10/21/25, 12:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87181

  8. Benjamin Kott voted on patch set 14 CR +1 V +1 10/21/25, 12:25

  9. Benjamin Franzke commented on patch set 14 10/21/25, 20:27

    modal.ts:126

    Timing between js timeouts and CSS animation durations is not guaranteed to be equal, did you try to use https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionend_event (?)

    modal.ts:185

    Even with `<dialog>` we need to add `aria-labelledby="id-of-header"` or even easier (avoids generating an ID) `aria-label="${this.modalTitle}"` in order to add an accessible name to the dialog. …but that can be done with a separate change and is actually unrelated to the `<dialog>` topic.
  10. Benjamin Franzke uploaded patch set 15 CR +1 V +1 10/22/25, 05:51

  11. Benjamin Franzke commented on patch set 15 10/22/25, 05:51

    modal.ts:126 Reply

    Migrated to transitionend.

    modal.ts:136

    This event must be triggered once the modal is fully shown. That means we need to await transitionend. Done.

    modal.ts:157

    This should have triggered a temporary state and a re-render, but we're actually better off with using browsers `.animate()` directly. Done.

    modal.ts:185 Reply

    added now anyway.

    modal.ts:509

    `dataset.bsContent` was/is still used by our codebase (this patch missed ~24 usages). I've now migrated those to `data-content` in patchset 15, but I wonder if we should just keep supporting this attribute for those who already combined `.t3js-modal-trigger` with `data-bs-content`? It is low effort for us and avoids breaking markup triggers which don't care at all, what technical implementation is used and just used the markup that TYPO3 used itself. `data-content` instead of `data-bs-content` has not even been documented on https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Backend/JavaScript/Modules/Modals.html#data-attributes => I've decided to keep `data-bs-content` supported. Let's discuss if you do not agree ;)

    lit-helper.ts:74

    Why was this change needed? It would filter classes that do not evaluate to "true", which is a pretty ugly and non-strict way instead of using proper and descriptive callback like `(value) => value !== ''` – but we actually do not need that. I removed that, please readd with explanation why we should do this, if really needed.
  12. core-ci voted on patch set 15 V +1 10/22/25, 06:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87216

  13. Benjamin Kott uploaded patch set 16 CR +1 V +1 10/22/25, 06:41

  14. core-ci voted on patch set 16 V +1 10/22/25, 06:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87218

  15. Benjamin Kott commented on patch set 16 10/22/25, 06:51

    modal.ts:509 Reply

    I've removed it again, as we had previously options to not use it. The signal should be clear here, we are dropping bootstrap and should not support fallbacks if we already have options available also in previous versions that would allow to not use the bootstrap data attributes.
  16. Garvin Hicking commented on patch set 16 10/22/25, 07:31

    Breaking-107443-MigrateModalComponentFromBootstrapToNativeDialog.rst:35

    ```suggestion Extensions using :js:`data-bs-toggle="modal"`, :js:`data-bs-content="..."` or :js:`data-bs-target` attributes to ```

    Breaking-107443-MigrateModalComponentFromBootstrapToNativeDialog.rst:48

    ```suggestion - Use :js:`data-bs-toggle="modal"` attributes to trigger modals - Use :js:`data-bs-content="..."` attributes to set modal contents ```

    Breaking-107443-MigrateModalComponentFromBootstrapToNativeDialog.rst:181

    ```suggestion .. note:: Note that using the attribute "data-content" instead of "data-bs-content" allows compatibility for TYPO3 v12, v13 and v14. Or use the JavaScript API directly: ```
  17. Benjamin Franzke commented on patch set 16 CR -1 10/22/25, 08:03

    modal.ts:509 Reply

    But we didn't migrate our own usages (we had 24 leftovers) and it is super hard to detect for developers, given that a silent Fallback to a generic label is in place. I agree that this sucks, but should not break this directly, a console.error does not hurt. or at least add it but ignore the content, but let's not be silent. I am against this as is.
  18. Benjamin Franzke uploaded patch set 17 CR -1 V +1 10/22/25, 08:35

  19. Benjamin Franzke commented on patch set 17 10/22/25, 08:35

    modal.ts:509 Reply

    Added a `console.error` but kept the removal. I think this helps developers and satisfies your (understandable) cleanup demand.

    Breaking-107443-MigrateModalComponentFromBootstrapToNativeDialog.rst:35 Reply

    Done

    Breaking-107443-MigrateModalComponentFromBootstrapToNativeDialog.rst:48 Reply

    Done

    Breaking-107443-MigrateModalComponentFromBootstrapToNativeDialog.rst:181 Reply

    TYPO3 v12 also supported data-content, this is actually not needed.
  20. core-ci voted on patch set 17 V +1 10/22/25, 08:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87220

  21. Benjamin Franzke voted on patch set 17 CR +1 V +1 10/22/25, 08:57

  22. Oli Bartsch voted on patch set 17 CR +1 V +1 10/22/25, 09:01

  23. Benjamin Kott voted on patch set 17 CR +2 V +2 10/22/25, 10:16

  24. Benjamin Kott merged patch set 18 10/22/25, 10:16

  25. Garvin Hicking commented on patch set 18 12/15/25, 15:37

    Please check out https://forge.typo3.org/issues/108488 which seems to be an issue related to this change? A patch is pending already: https://review.typo3.org/c/Packages/TYPO3.CMS/+/92124