RFR: 8268225: Support :focus-visible and :focus-within CSS pseudoclasses [v5]

Kevin Rushforth kcr at openjdk.java.net
Thu Aug 12 22:57:25 UTC 2021


On Mon, 2 Aug 2021 16:53:08 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> This PR adds the `Node.focusVisible` and `Node.focusWithin` properties, as well as the corresponding `:focus-visible` and `:focus-within` CSS pseudo-classes.
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
> 
>   restart github actions

The API looks good. The docs look good with a couple suggestions.

I'll get back to reviewing the implementation soon. One thing I will note is that the Linux unit test failures are real. I see them on my local Ubuntu 20.04 system, too.

modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8258:

> 8256:      * Indicates whether this {@code Node} should visibly indicate focus.
> 8257:      * This flag is set when the node acquires input focus via keyboard navigation,
> 8258:      * and it is cleared when the node loses focus, or when {@link #requestFocus()}

I'm not sure the comma before `or` is needed.

modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8285:

> 8283: 
> 8284:     /**
> 8285:      * Indicates whether this {@code Node} or any of its children currently

children --> descendants

It isn't just the immediate children that will cause a parent node to report `focusWithin`.

-------------

PR: https://git.openjdk.java.net/jfx/pull/475


More information about the openjfx-dev mailing list