RFR: 8368972: Create implementation of menu bar accessibility component [v2]
Alexander Zuev
kizune at openjdk.org
Wed Oct 8 20:46:14 UTC 2025
On Tue, 7 Oct 2025 12:18:28 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> 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;
> }
Makes sense. I updated the pull request.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1927#discussion_r2414991778
More information about the openjfx-dev
mailing list