On Mon, 7 Jul 2025 07:34:52 GMT, Artem Semenov <aseme...@openjdk.org> wrote:
>>> Check the [super accessibilityRoleDescription] and if it returns nil, >>> return your implementation. >> >> As I mentioned earlier in the description, `accessibility role description >> is fetched in accessibilityRoleDescription API in >> CommonComponentAccessiblity.m file, the sub-role passed as a parameter is >> nil, returned value is RadioButton`, [super accessibilityRoleDescription] >> will not return `nil`. >> >> Anyways, I don't see this method getting invoked in TabButtonAccessibility >> by a11y client. > > Try to debug and investigate why [TabbuttonAccessibility > accessibilityRoleDescription] is not being called. If you have already > attempted to override it with the changes you need. > > The logic of creating tabs in TabGroupAccessibility indicates that such an > override should work. The accessible class created for a java role `pagetab` i.e. a tab component is `CommonComponentAccessibility`. The parent for `pagetab` is `TabGroupAccessibility` and the object returned from `rowRolesMapForParent` is `null` for `TabGroupAccessibility` in `getComponentAccessibilityClass` method. Since there is no entry in the `rolesMap` for the `pagetab` role, the returned class is `CommonComponentAccessibility`. So, the `accessibilityRoleDescription` API is invoked from `CommonComponentAccessibility` and not from `TabButtonAccessibility`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26096#discussion_r2191726855