On Mon, 6 Nov 2023 19:49:00 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>>> This is definitely an improvement compared to the complete lack of 
>>> magnified text on hover, but it still doesn't handle custom renderers.
>>> 
>>> I've been digging into how this works in Metal but I couldn't figure it out 
>>> completely. Eventually, it gets to `JList` of the popup, the list returns 
>>> the renderer component as its child at the specified position — this is how 
>>> text from the renderer gets used as the accessible name.
>>> 
>>> This should work for Aqua L&F too, all UI classes are derived from 
>>> `BasicUI`, but for whatever reason it doesn't, and I didn't figure it out 
>>> unfortunately.
>>> 
>>> However, I came up with an alternative solution which handles custom 
>>> renderers nicely. You can find my version at [commit 
>>> eee17ca](https://github.com/openjdk/jdk/commit/eee17ca7fc07fb87997040589bde83f5fad9fdea),
>>>  it shows the changes to your latest version in the PR. You can also view 
>>> [the diff to 
>>> jdk/master](https://github.com/openjdk/jdk/compare/master...aivanov-jdk:jdk:eee17ca7fc07fb87997040589bde83f5fad9fdea).
>>> 
>>> Ideally, I'd like to make Aqua L&F classes work like Metal or Nimbus do. I 
>>> spent quite a lot of time, and it requires even more time to understand how 
>>> it gets to `JList.AccessibleJList` and `AccessibleJListChild`.
>> 
>> Thanks @aivanov-jdk for your detailed analysis. I will go through the 
>> alternate fix you suggested and check the behavior of VoiceOver and will run 
>> the CI jobs to ensure there is no regression as such.
>
> @kumarabhi006 I attached the app that I used for testing to 
> [JDK-8283214](https://bugs.openjdk.org/browse/JDK-8283214): 
> `MagnifierTest.java`

@aivanov-jdk I tested with your suggested solution and it looks good to me. 
Observed a test failure (regression) while running the CI jobs with the fix. 
Modified the test to fix the issue.
Now, CI jobs are ok. Please review.

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

PR Comment: https://git.openjdk.org/jdk/pull/14497#issuecomment-1803149749

Reply via email to