On Wed, 9 Oct 2024 21:43:09 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

> My suggestion for a better API is: have two separate knobs to configure 
> directional and logical focus traversal, and provide a very small set of 
> curated policies. We should only consider opening up the API to allow more 
> customization when there is a demonstrable need that goes beyond the curated 
> policies.

As I was reviewing the existing JavaFX control set and the w3c guidelines I 
found at least three different cyclical traversal patterns (menu bars and radio 
button groups are the two that spring to mind). In all cases the directional 
and logical traversals behaviors were intertwined. Among the three different 
ways of cycling (left/right, up/down, and with the tab key) you have to ensure 
at least one of them allows the user to escape the cycle and each model opted 
for a different escape route. Cyclical policies are more diverse than one might 
think.

If we close up the traversal API we will be on the hook for identifying and 
implementing all the traversal policies. If a developer needs something more 
they'll have to petition for it to be included in JavaFX or provide their own 
PR and try to get it through the review process. That's not a good use of our 
time or theirs.

In any case I don't believe that we need to protect developers from themselves. 
Presumably they're a smart bunch. If you're concerned they won't get it right 
make sure there's ample documentation and sample code.

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

PR Comment: https://git.openjdk.org/jfx/pull/1555#issuecomment-2403652222

Reply via email to