On Mon, 7 Jul 2025 04:21:13 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:

>> 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```
>
> I thought of overriding this method but the changes are very minimal.
> Even if this method is overridden in `TabButtonAccessibility.m` and the value 
> returned is `nil` then we need to either fallback to parent's class method or 
> need to copy the entire implementation in `TabButtonAccessibility`.
> 
> So, I think this should be ok to cater the changes here.

Do it where it makes sense as part of the tab button implementation, rather 
than adding workarounds to the general implementation.

Check the [super accessibilityRoleDescription] and if it returns nil, return 
your implementation.

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

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

Reply via email to