It's certainly true that all JavaFX themes show a focus indicator for all controls, but that's not universally so. For example, Microsoft's Fluent theme doesn't show any focus indicators on mouse-based interaction except for text controls.
In the end, the official CSS spec has named this pseudoclass :focus-visible, and I think JavaFX should almost always try to follow the CSS spec in this regard. Am Mi., 28. Apr. 2021 um 16:52 Uhr schrieb Tom Schindl <[email protected]>: > > Hi, > > As someone who had to implement this manually in our current project I > would welcome if it would have been possible to use a pseudo-state to > get a CSS only solution. > > What I don't know if the name of the pseudo-State is correct > :focus-visible does not sound right to me because controls still show > that they are focused but less obvious. > > In the end in our application we turned it around and called the > pseudo-state ":mouse-focused" in contrast do (keyboard-focused, > programmatically focused, accessibility focused). > > Tom > > Am 28.04.21 um 16:39 schrieb Michael Strauß: > > Circling back to this proposal: does anyone want to comment on it? > >
