RFR: 8322239: [macos] a11y : java.lang.NullPointerException is thrown when focus is moved on the JTabbedPane
Alexander Zuev
kizune at openjdk.org
Thu Feb 8 19:32:04 UTC 2024
On Thu, 8 Feb 2024 15:09:10 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> wonder if it's appropriate that location or dimension become `null`. I would expect these properties always return a non-`null` value, maybe in exceptional conditions.
>
> If a tab becomes hidden because of the overflow, it is appropriate to return `null` from `getLocationOnScreen`.
It is appropriate with the Aqua L&F since control is not showing on the screen but active and should be available for the accessibility subsystem. The accessible description of the jtabbedpane does mention correct number of tabs. Returning dimension(0,0,0,0) or location (0,0) is incorrect because in this case accessibility logic will move accessibility cursor to the wrong location and the order of navigation will be affected. This fix does not affect any other OS aside ow Mac OS because Aqua L&F only available on OS X.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17736#issuecomment-1934803540
More information about the client-libs-dev
mailing list