On Wed, 2 Jul 2025 15:37:30 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:

>> **Issue** : VO doesn't announce Tab items of a JTabbedPane as RadioButton 
>> which is wrong. 
>> 
>> **Analysis** : That is due to the role mapping of tab items as 
>> `NSAccessibilityRadioButtonRole` in `JavaAccessibilityUtilities.m` file. 
>> Since the accessibility role description is fetched in 
>> `accessibilityRoleDescription` API if `CommonComponentAccessiblity.m` file, 
>> the sub-role passed as a parameter is `nil`, returned value is RadioButton..
>> 
>> **Proposed Fix** : Fix is to get the correct accessibility role description 
>> from Appkit, we should pass `NSAccessibilityTabButtonSubrole` in the subrole 
>> parameter and that returns the accessibility role as `Tab` and is announced 
>> correctly by VO.
>> 
>> **Testing** : Manual test case has been added to verify the fix.
>
> Abhishek Kumar has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Add test

src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m
 line 865:

> 863:     NSString *value = nil;
> 864: 
> 865:     if ([[self javaRole] isEqualToString:@"pagetab"]) {

Мне кажется было бы лучше просто переопределить:

- (NSString *)accessibilityRoleDescription

В 
```src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/TabButtonAccessibility.m```


It seems it would be better to simply override:

- (NSString *)accessibilityRoleDescription

in 
```src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/TabButtonAccessibility.m```

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

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

Reply via email to