Currently the TitledPane accepts the focus even when is not collapsible. The issue here is that the focus is not visible anymore when it is on the TitledPane, because the “toggle button” of the TitledPane is not visible. This violates a soft requirement of the accessibility guidelines.
I would like to use this issue to test the development cycle of a contribution to OpenJFX and I would therefore like to work on this myself and contribute a patch.
My first implementation proposal puts this change in TitledPane directly (and not in its skin) since the focusTraversableProperty is set to TRUE by its superclass Control. I used a ChangeListener to monitor changes to collapsiblyProperty and set the focusTraversableProperty accordingly. I favored this approach because binding the focusTraversableProperty might cause a regression in cases where a binding to focusTraversableProperty has already been used in existing applications.
This still leaves the possibility for the user to click on the (uncollapsible) TitledPane and hide the focus manually, but this seems acceptable.
I have a patch ready to send by mail if this issue is accepted.
I would like to use this issue to test the development cycle of a contribution to OpenJFX and I would therefore like to work on this myself and contribute a patch.
My first implementation proposal puts this change in TitledPane directly (and not in its skin) since the focusTraversableProperty is set to TRUE by its superclass Control. I used a ChangeListener to monitor changes to collapsiblyProperty and set the focusTraversableProperty accordingly. I favored this approach because binding the focusTraversableProperty might cause a regression in cases where a binding to focusTraversableProperty has already been used in existing applications.
This still leaves the possibility for the user to click on the (uncollapsible) TitledPane and hide the focus manually, but this seems acceptable.
I have a patch ready to send by mail if this issue is accepted.