RFR: 8368972: Create implementation of menu bar accessibility component [v2]
Ambarish Rapte
arapte at openjdk.org
Tue Oct 7 12:21:18 UTC 2025
On Mon, 6 Oct 2025 18:31:30 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
>> Create the accessibility peer for menu bar component also fix the problem when with the voiceover is on the <Ctrl>-F10 is pressed the name of the selected menu is not announced.
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
>
> Restore CHECK_MENU_ITEM binding
modules/javafx.graphics/src/main/native-glass/mac/a11y/JFXMenuItemAccessibility.m line 46:
> 44: }
> 45: }
> 46: return [super accessibilityTitle];
A couple recommendations for this method:
1. Use `nil` instead of `NULL`
2. Store `[super accessibilityChildren]` locally
- (NSString * _Nullable)accessibilityLabel {
NSString *accTitle = [super accessibilityTitle];
if (accTitle != nil) {
return accTitle;
}
NSArray *accChildren = [super accessibilityChildren];
if (accChildren != nil && accChildren.count != 0) {
id child0 = accChildren[0];
if ([child0 respondsToSelector:@selector(accessibilityValue)]) {
return [child0 accessibilityValue];
}
} else {
return @"";
}
return nil;
}
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1927#discussion_r2410432983
More information about the openjfx-dev
mailing list