Review main Merged

94673[BUGFIX] Add contextmenu to language comparison icon

Georg Ringer CR +2 V +2 Easy +16 −2 updated 10/20/26, 15:41

Commit message

The page icon in each language column of the comparison view
triggers the context menu again, enabling fast actions like
hiding or unhiding the page translation.

RecordIdentityRenderer gets an opt-in flag to wrap the icon,
which only the language comparison view uses.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Eric Harrer +1
    • Georg Ringer +1
    • Sebastian Michaelsen +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Eric Harrer +1
    • Georg Ringer +1
    • Sebastian Michaelsen +1
    • Josua Vogel +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 2731

Show 46 earlier messages
  1. Georg Ringer uploaded patch set 1 07/03/26, 14:27

  2. core-ci voted on patch set 1 V +1 07/03/26, 14:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104300

  3. Sebastian Michaelsen commented on patch set 1 V +1 08/08/26, 16:36

    Thanks for restoring this, I tested it locally and the context menu correctly targets the localized page record. Two cleanup suggestions: 1. Could data-contextmenu-uid use {languageColumn.pageRecordUid}? The existing getter already resolves the localized page UID or falls back to the default page UID, so we would avoid duplicating that logic in Fluid. 2. LanguageColumn::getPageIcon() no longer has any call sites after #109499 removed {languageColumn.pageIcon}. Since this patch renders the context-menu button explicitly, could we remove that dead method as part of this change?
  4. Georg Ringer uploaded patch set 2 V +1 08/14/26, 12:43

  5. Georg Ringer commented on patch set 2 08/14/26, 12:44

    This change is ready for review.
    @sebastian@michaelsen.io I left the method even as it is internal, don't want to break others code
  6. core-ci voted on patch set 2 V +1 08/14/26, 12:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106701

  1. Sebastian Michaelsen voted on patch set 2 CR +1 V +1 08/14/26, 14:49

  2. Sebastian Michaelsen commented on patch set 2 08/14/26, 14:49

    Reply

    Done
  3. Eric Harrer commented on patch set 2 08/14/26, 14:54

    Thank you very much. That’s a useful addition. One more thing: I think we should remove “pointer-events: none;” from “Build/Sources/TypeScript/backend/layout-module/sticky-language-header.ts”. Otherwise, the context menu won’t open whilst scrolling if the header is in sticky mode. @typo3@kuepper.net what was the intention behind this style, and does removing it have any negative implications that I’m not currently aware of? In my tests so far, everything has worked as expected when I remove the style.
  4. Eric Harrer commented on patch set 2 08/14/26, 15:15

    Reply

    Just to clarify: The `data-contextmenu-uid="{languageColumn.pageRecordUid}"` simplification is still not part of patch set 2. Was this intentionally left unchanged as well? I think it’s a good adjustment.
  5. Marcel Küpper commented on patch set 2 08/14/26, 15:18

    Reply

    The removal of the pointer event was introduced by @benjamin.kott@outlook.com. From my perspective it's unproblematic to change this again.
  6. Stefan Bürk commented on patch set 2 CR -1 08/15/26, 18:07

    Thanks for picking this up, the regression is real: f7b90985663 (#109499) dropped {languageColumn.pageIcon -> f:format.raw()}, and since that commit is an ancestor of 14.3 the context menu is gone in released v14 as well. Releases: main, 14.3 is right - 13.4 still renders pageIcon, so it must stay out. I also verified the new markup is identical to what BackendUtility::wrapClickMenuOnIcon() used to emit, including the icon size, so the restored DOM matches the old one. Two things keep me from a +2, both from threads that are still open. 1. data-contextmenu-uid: Sebastian and Eric have now both asked for {languageColumn.pageRecordUid}, and I think they are right. LanguageColumn::getPageRecordUid() is literally the same expression, and BackendLayoutRenderer::getLanguageColumnsForPageLayoutContext() continues for any language without a localized page record, so the else branch of the inline f:if can only ever be hit for the default language, where pageId === pageRecord['uid']. The same file already uses the getter for typo3-backend-editable-page-title/localizedPageId three lines up - using it here too keeps the context-menu target and the inline-edit target from ever drifting apart. Could you either apply it or say what speaks against it? The thread has been open through two patch sets. 2. The languageInfo section is rendered twice: inline, and into <span slot="sticky">, which typo3-backend-page-layout-sticky-language-header slots into <div class="sticky" aria-hidden="true"> with opacity: 0 until it becomes active. With this patch that decorative copy gains a real <button>: it is in the tab order, its focus ring is invisible, and it lives inside an aria-hidden="true" subtree - the classic aria-hidden-focus / WCAG 4.1.2 situation, one extra dead tab stop per language column. Our axe suite does not see it because Build/tests/playwright/e2e/accessibility/modules.spec.ts loads the page module in single-language mode, where the sticky slot is not rendered at all. This also makes Eric's pointer-events: none request a decision rather than a one-liner: removing only that declaration leaves an operable control inside aria-hidden="true", which is worse. Either keep the copy decorative - inert on <span slot="sticky"> removes the tab stop and makes pointer-events: none redundant - or make it genuinely interactive, which means dropping aria-hidden="true" from .sticky and accepting that the header is announced twice. (And if sticky-language-header.ts is touched, the compiled Resources/Public/JavaScript/layout-module/sticky-language-header.js has to be regenerated too.) Smaller points, take or leave: BackendLayoutRendererLanguageComparisonTest already renders the full comparison view and its fixture has page translations 1101/1102, so three assertStringContainsString('data-contextmenu-uid="..."') lines would nail down exactly the uid semantics discussed in point 1 - that would be a welcome addition. The analogous trigger in PageLayout/RecordDefault/Header.fluid.html carries aria-haspopup="true"; and the inline view helper mixes condition:x / then: x / else:x spacing. Commit message: the body reads "it makes sense to use to trigger", a word is missing, and the subject is 60 chars, a bit over the 52 we aim for. On getPageIcon(): your reasoning holds for 14.3. On main (15.0.0-dev) it is an @internal method with no remaining consumer, so a separate main-only [TASK] follow-up would clean it up without making this fix harder to backport - would that work for you? Verified: leaving core-ci's +1 as is, the patch does what it says when the sticky header is inactive.

    Reply

    +1 from me, and I think the else branch is provably unreachable for anything but the default language: BackendLayoutRenderer::getLanguageColumnsForPageLayoutContext() continues whenever no localized page record exists, so by the time the template renders a non-default language column, pageRecord is always set. For the default language pageId === pageRecord['uid'], so {languageColumn.pageRecordUid} is equivalent in every case the template can actually reach - and it keeps this in sync with the localizedPageId binding three lines above, which already uses the getter.

    Reply

    Careful here, I think this is more than a style decision. The second copy of languageInfo is slotted into <div class="sticky" aria-hidden="true"> (sticky-language-header.ts:129) with opacity: 0. Before this patch that subtree contained no focusable element, so pointer-events: none was cosmetic. With the new <button> in it, removing pointer-events: none leaves an operable, focusable control inside an aria-hidden subtree - that is an aria-hidden-focus violation (WCAG 4.1.2), and the button is already an invisible tab stop per language column even with pointer-events: none in place. So either the clone stays decorative, in which case inert on <span slot="sticky"> is the better tool (it removes the tab stop and makes pointer-events: none redundant), or it becomes genuinely interactive, which means aria-hidden="true" has to come off .sticky and we accept the header being announced twice. Our axe e2e cannot arbitrate this because modules.spec.ts opens the page module in single-language mode, where the sticky slot is not rendered at all.
  7. Georg Ringer uploaded patch set 3 CR +1 V +1 08/27/26, 17:31

  8. core-ci voted on patch set 3 V +1 08/27/26, 17:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107286

  9. Sebastian Michaelsen uploaded patch set 4 V +1 09/29/26, 07:43

  10. Sebastian Michaelsen commented on patch set 4 09/29/26, 07:45

    I rebased and since #110147 (f7a4a388893) was merged into main in the meantime, this change is now smaller and I think we can exclude discussions about markup and accessibility from this change.
  11. core-ci voted on patch set 4 V +1 09/29/26, 07:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109489

  12. Georg Ringer voted on patch set 4 CR +1 V +1 09/29/26, 09:06

  13. Eric Harrer commented on patch set 4 CR +1 V +1 09/30/26, 08:15

    Reply

    Done. The renderer now uses the resolved page record's UID, matching `getPageRecordUid()`.

    Reply

    Done. The context-menu icon is now outside the sticky header, so `pointer-events: none` can remain.
  14. Sebastian Michaelsen voted on patch set 4 CR +1 V +1 09/30/26, 08:29

  15. Eric Harrer commented on patch set 4 09/30/26, 08:37

    Reply

    Patchset 4 addresses the two blocking points. The inline `f:if` for `data-contextmenu-uid` is gone; `LanguageColumn::getRecordIdentity()` now uses `getPageRecord()`, preserving the same localized/default page selection as `getPageRecordUid()`. The functional test covers the expected targets `1100`, `1101`, and `1102`. The context-menu trigger is now rendered outside the duplicated `languageInfo` section, so the sticky copy remains decorative, contains no focusable control inside its `aria-hidden` subtree, and can keep `pointer-events: none`.
  16. Benni Mack commented on patch set 4 09/30/26, 09:54

    Reply

    Should I read through all the AI-generated comments?
  17. Eric Harrer commented on patch set 4 09/30/26, 11:05

    Reply

    No, in my opinion that’s no longer necessary. @stefan@buerk.tech can mark this thread as resolved to confirm this. Yes, AI helped with the wording of mine, but I’ve checked everything myself against the Core.
  18. Sebastian Michaelsen commented on patch set 4 09/30/26, 11:48

    Reply

    Done
  19. Josua Vogel voted on patch set 4 CR +1 V +1 10/02/26, 09:08

  20. Benni Mack commented on patch set 4 CR -1 10/02/26, 11:03

    RecordIdentityRenderer.php:41

    I wonder if we really need this option, or if we could have this enabled at any time?
  21. Josua Vogel commented on patch set 4 10/02/26, 13:14

    RecordIdentityRenderer.php:41 Reply

    I think we need this option. RecordIdentityRenderer is used by other parts and you don´t want to wrap "every" icon with a button. I like the option to optin...
  22. Georg Ringer commented on patch set 4 10/02/26, 16:16

    let's stay defensive here
  23. Benni Mack commented on patch set 4 CR 0 10/07/26, 18:45

    RecordIdentityRenderer.php:41 Reply

    alright. thanks for the feedback!
  24. Benni Mack voted on patch set 4 CR +2 V +2 10/20/26, 15:41

  25. Benni Mack merged patch set 5 10/20/26, 15:41