On Thu, 2 Nov 2023 18:16:06 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. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14497#issuecomment-1794210611