Review main Merged

92660[BUGFIX] Prevent focus loss when clicking on color field

Dennis Purisevic CR +2 V +2 Normal +47 −39 updated 04/09/26, 09:43

Commit message

When clicking inside the color input, the color picker opens and the input immediately loses focus. This disrupts user interaction and makes it difficult or impossible to manually enter or adjust color values.

This patch restores focus to the input after the color picker is opened.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 79

  1. Dennis Purisevic uploaded patch set 1 02/04/26, 10:47

  2. core-ci voted on patch set 1 V -1 02/04/26, 11:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95005

  3. core-ci voted on patch set 1 V +1 02/04/26, 12:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95005

  4. Benjamin Franzke voted on patch set 1 CR +1 V +1 02/05/26, 11:52

  5. Garvin Hicking commented on patch set 1 V -1 02/05/26, 19:49

    I am not sure about this. Currently the focus will put the cursor into the colorpicker, and I am able to use cursor keys to arrange the selected color on the palette. I can also tab through everything of the picker. With the patch applied, I can not tab within the opened colorpicker, so I would consider this to break accessibility.
  6. Dennis Purisevic commented on patch set 1 02/06/26, 08:37

    Reply

    Yes, I noticed this issue as well. But, the picker only opens after clicking the input field, and it cannot be opened via keyboard. As a result, this change effectively only benefits mouse users, and keyboard users are not affected, as they cannot open the picker at all. While it is technically possible to tab to the color picker, it is appended to the module container, which requires excessive tabbing and is not a practical solution. There is an existing patch 91109: [WIP][BUGFIX] Make color picker keyboard accessible | https://review.typo3.org/c/Packages/TYPO3.CMS/+/91109 that attempts to address keyboard accessibility for the picker. What would you recommend as the next step?
  7. Garvin Hicking commented on patch set 1 CR +1 V +1 02/06/26, 09:55

    Reply

    I see your point, thanks for clarifying. You're right, this gets a bit messier then. I'll defer this to @ben@bnf.dev who's the owner also of that patch and to decide if the improvements of this patch solely are alright (I guess so, due to the positive vote already). I'm upvoting this too (because it works "as intended" in this case), but don't feel authoritative enough to merge it myself.
  8. Benjamin Franzke commented on patch set 1 CR +2 V +2 04/09/26, 09:20

    Reply

    Thanks Garvin for mentoning, I'd still love to improve keyboard accessibility, but was fine to at least fix this focus handling with this patch, since my other patch is simply not ready and had blockers. Let's merge this one and revisit the other topic later. Thanks!
  9. Benjamin Franzke merged patch set 2 04/09/26, 09:43