Support :focus-visible CSS pseudoclass
Tom Schindl
tom.schindl at bestsolution.at
Tue Jun 8 06:55:04 UTC 2021
Hi,
As an application developer I highly appreciate this built-in CSS support.
We had to roll our own version for focus-visible and focus-within when
implementing our custom controls and L&F but we would leverage this
built-in support to remove complexity from our codebase.
Beside Microsofts new L&F many Web-UI-Toolkits use this
focus-visible-feature (and emulate it while not all browsers support it).
How we use focus-visible:
------------------------
I think focus-visible has a fairly narrow scope so we use it to show
input focus differently depending on the way an element got focused
(mainly mouse-activation vs rest)
How we use focus-within:
------------------------
We use focus-within to visiually indicate the area the focus is
currently in by changing by lifting or coloring that area.
Tom
Am 08.06.21 um 01:08 schrieb Kevin Rushforth:
> I'd be interested in hearing from application developers as to whether
> and how they would use such a feature. As with all non-trivial features,
> we don't want to do it if only one or two developers are asking for it.
> This seems a reasonably new CSS feature; Firefox just added support in
> FF 85 released earlier this year and Safari still doesn't. That suggests
> it might be a bit early to adopt this for JavaFX.
>
> Also, one thing that isn't clear is whether there would be any user
> visible change using the standard themes. I presume that the answer is
> "no", meaning that unless your stylesheets do anything with
> focus-visible, it will not affect the look and feel of the app. That
> should be stated explicitly
>
> I also presume that there would be no application visible changes when
> using the standard themes, other than the presence of the two new
> read-only boolean properties?
>
> -- Kevin
>
>
> On 6/7/2021 3:46 PM, Michael Strauß wrote:
>> I have expanded the scope of the proposal to include the :focus-within
>> pseudo-class, which completes the set of focus-related pseudo-classes.
>>
>> The updated text of the proposal can be found in the JBS ticket:
>> https://bugs.openjdk.java.net/browse/JDK-8268225
>>
>> I'm looking forward to comments.
>
More information about the openjfx-dev
mailing list