Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Quiet

96765[WIP][TASK] Use HTML form element based selector in Typescript

Ayke Halder CR 0 V -1 Normal +90 −73 updated 10/16/26, 16:59

Commit message

To see intention:

* In `Build/tsconfig.json` set `"strictNullChecks": true`
* In `Build/eslint.config.mjs` set `"@typescript-eslint/no-unnecessary-type-assertion": "error"`

Then check the shown errors in IDE.

Regular expression to find spots of interest in original code:
[`'"]\[name=

grep -r -n -E '[`'"'"'"]\[name=' --include \*.ts ./Build/Sources/TypeScript/

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 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/65/96765/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/65/96765/3 && git cherry-pick FETCH_HEAD

Review

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

Issues 2

Files 30

Show 10 more files

Review log 47

  1. Ayke Halder uploaded patch set 1 10/16/26, 16:20

  2. Ayke Halder commented on patch set 1 10/16/26, 16:32

    form-engine.ts:101 Unresolved

    @ben@bnf.dev I did not understand the intention here. By implementing new strict element based CSS-selectors, the fields are always differing anyway: ̀input` vs. `textarea`

    global-event-handler.ts:141 Unresolved

    @ben@bnf.dev This is a general solution to your comment here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86724/comments/fb37bc5e_57f8c2bd > Example in Build/Sources/TypeScript/backend/global-event-handler.ts: The patch replaces `instanceof HTMLElement` with a generic type declaration to HTMLElement (which isn't actually guaranteed!) and thus makes our codebase less robust. `querySelector*` can also return SVGElements for generic selectors, therefore we need to be very cautious to not introduce makes the code less robust. ---- A more specific solution would be to list the actual possible HTML element tags. E.g. ``` selector`:is(input, textarea, select)[name=${CSS.escape(name)}]` . ```
  3. Ayke Halder uploaded patch set 2 10/16/26, 16:36

  4. core-ci voted on patch set 1 V -1 10/16/26, 16:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111381

  5. Ayke Halder updated the commit message in patch set 3 10/16/26, 16:40

  6. core-ci voted on patch set 2 V -1 10/16/26, 16:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111383

  7. core-ci voted on patch set 3 V -1 10/16/26, 16:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111384