RFR: 8361283: [Accessibility, macOS, VoiceOver] VoiceOver announced Tab items of JTabbedPane as RadioButton on macOS [v2]

Artem Semenov asemenov at openjdk.org
Sat Jul 12 11:54:43 UTC 2025


On Fri, 11 Jul 2025 07:02:07 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

>> Thank you for the reference! However, I would like to advise you to thoroughly examine the code of TabGroupAccessibility. This is because it has its own implementations for creating child components.
>> 
>> Therefore, I am once again asking you to try to investigate the situation in more detail. There is a possibility that the mechanism is broken, and TabGroupAccessibility is not being created or used at all, which is incorrect.
>> 
>> Additionally, all objects in the hierarchy of native objects inherit from CommonComponentAccessibility in one way or another. If the accessibilityRoleDescription selector is not defined in TabGroupAccessibility, it may not be called.
>> 
>> I don’t have a Mac at hand right now; otherwise, I would debug this case myself and provide more detailed assistance.
>
> TabButtonAccessibility is initialized in TabGroupAccessibility but since TabButtonAccessibility is not exposed to accessible system (i.e. not createdwithaccessible) and hence a11y subsystem in unable to invoke the method.
> 
>> TabGroupAccessibility is not being created or used at all, which is incorrect.
> 
> TabGroupAccessibility does get created and the APIs are invoked by a11y subsystem. Once the accessibilityRoleDescription selector is defined in TabGroupAccessibility, it gets called but only when the self javarole is `pagetablist`.
> 
> After adding an entry for TabButtonAccessibility in rolesMap`[rolesMap setObject:@"TabButtonAccessibility" forKey:@"pagetab"]`, creates an accessible component for TabButtonAccessibility instead of CommonComponentAccessibility and is exposed to get invoked by a11y client. Then accessibilityRoleDescription API is invoked by a11y client.
> 
> But I am yet to find if there is any repercussion of adding the entry for TabButtonAccessibility.

Do not forget to increment [rolesMap capacity] before adding a role.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26096#discussion_r2202549936


More information about the client-libs-dev mailing list