Skip to content

PopupMenu: Make manually-triggered custom items keyboard-accessible - #1698

Open
emezeske wants to merge 1 commit into
juce-framework:developfrom
emezeske:pr/popup-menu-custom-item-keyboard-nav
Open

PopupMenu: Make manually-triggered custom items keyboard-accessible#1698
emezeske wants to merge 1 commit into
juce-framework:developfrom
emezeske:pr/popup-menu-custom-item-keyboard-nav

Conversation

@emezeske

@emezeske emezeske commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Custom menu items created with isTriggeredAutomatically=false handle their own mouse clicks, but the arrow keys skip over them and return/space cannot activate them, so a menu containing them is unusable from the keyboard.

This lets them be highlighted like any other item and makes return/space dismiss the menu with the item's ID, which is exactly what CustomComponent::triggerMenuItem() does. Mouse handling still goes through canBeTriggered(), so nothing changes there.

Custom items created with isTriggeredAutomatically=false handle their own
mouse clicks, but the arrow keys skipped over them and return/space could
not activate them, so menus containing them were unusable from the
keyboard. Allow them to be highlighted like any other item and let
return/space dismiss the menu with the item's ID, exactly as
CustomComponent::triggerMenuItem() would. Mouse behaviour is unchanged.
@emezeske
emezeske marked this pull request as ready for review August 8, 2026 21:01
@juce-push-bot

Copy link
Copy Markdown
Collaborator

This pull request has been mentioned on The JUCE Forum. There might be relevant details there:

https://forum.juce.com/t/pr-popupmenu-make-manually-triggered-custom-items-keyboard-accessible/69265/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants