RFR: 8358092: Create accessibility protocol implementation that covers various type of menu items
Andy Goryachev
angorya at openjdk.org
Mon Jul 28 20:38:03 UTC 2025
On Fri, 25 Jul 2025 23:32:04 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
> Initial implementation. Note that second level menu navigation with the non-system menus does not work but it was not working with the current implementation so i am raising a new bug for tracking that but that can not be a showstopper for this PR.
>
> The bug raised to track menu deficiencies JDK-8364133
modules/javafx.graphics/src/main/native-glass/mac/a11y/AccessibleBase.m line 43:
> 41: * enum javafx.scene.AccessibleRole
> 42: */
> 43: rolesMap = [[NSMutableDictionary alloc] initWithCapacity:21];
would it make more sense to set the expected size once and for all?
modules/javafx.graphics/src/main/native-glass/mac/a11y/AccessibleBase.m line 65:
> 63: [rolesMap setObject:@"JFXMenuItemAccessibility" forKey:@"MENU_ITEM"];
> 64: [rolesMap setObject:@"JFXMenuItemAccessibility" forKey:@"RADIO_MENU_ITEM"];
> 65: [rolesMap setObject:@"JFXMenuItemAccessibility" forKey:@"CHECK_MENU_ITEM"];
Question: do we need another entry for the `CustomMenuItem`? It looks like the VoiceOver on macOS 15.5 announces a custom menu as "`menuText, interactive`" which seems correct.
There is also `SeparatorMenuItem`, though I suspect there is no need to add accessibility to it, is there? (one can't focus on the menu separator).
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1858#discussion_r2237800272
PR Review Comment: https://git.openjdk.org/jfx/pull/1858#discussion_r2237805194
More information about the openjfx-dev
mailing list