Repository navigation
feat(rune-kit): add Menu/MenuItem submenu placement, keys, a11y_label, and PopupList label_with/build_list - #1964
Merged
Conversation
…, and PopupList label_with/build_list
Hona
force-pushed
the
feat/1070-menu-submenu-keys-popup-list
branch
from
November 24, 2026 15:35
2951ac9 to
455fa1c
Compare
This was referenced Nov 24, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1070
Refs #1387
Adds per-submenu placement and minimum width, stable menu item keys, distinct menu/item accessible names, rich
PopupItemlabels, and standalonePopupListreuse while preserving all existing defaults.API
Changes
crates/rune-kit/src/overlays/menu.rs:MenuItem::submenu_placement(Placement)(defaultPlacement::RightStart) andMenuItem::submenu_min_width(f32)(default160.0,0.0sizes to content; negative/non-finite clamp to0.0).MenuItem::key(impl Into<String>)for explicit element keys (blank falls back to positional{menu_key}-item{i}), keeping focus stable when rows are inserted above and anchoring submenus to{key}.MenuItem::a11y_label(impl Into<String>)for an accessible name distinct from the drawn text (also drivesfocus_grouptypeahead and names open submenus; blank falls back to drawn text).Menu::label(impl Into<String>)for therole="menu"surface name (blank leaves it unnamed).crates/rune-kit/src/overlays/popup_list.rs:PopupItem::label_with(El)renders custom label content (markeda11y_hidden) while keepingPopupItem::new's plain string as the option's accessible name.PopupList::build_list(self, k: &Kit) -> Elreturns the scrollable listbox element without anchoring it into an overlay layer, honouringanimate_filtering.crates/rune/src/a11y/roles.rs:role="menu"as anaria_container()soMenu::labeland submenu menu names mirror as<div role="menu" aria-label="...">in the web accessibility mirror alongsidelistbox,dialog, andtablist.rune-menu--submenu-optionsandrune-popup-list--rich-inlinestories inexamples/kit-gallery, rustdoc examples on every new public item,crates/rune-kit/README.md, andchangelog/unreleased/2026-11-25-menu-submenu-keys-and-popup-list-reuse.md.Outside answer followed
Menu::placementandMenu::min_widthbuilders.aria-labelonrole="menu", submenurole="menu"named from its triggeringmenuitem, andaria-labelonmenuitem/optionindependent of truncated or richly styled child spans.MenuandPopupList: submenus have no keys or hover-open, items are keyed by position, names can't differ from the drawn text, and list items take no rich label #1387: submenu keyboard navigation (Right/Left/Enter/Space) and hover-open delay timers stay open on rune-kitMenuandPopupList: submenus have no keys or hover-open, items are keyed by position, names can't differ from the drawn text, and list items take no rich label #1387.Not run live
Runtimelayout/focus/AccessKit/web-mirror tests on Windows and macOS, Linux aarch64 compile check, wasm32/WebGL2 compile checks, and headless Chromium software WebGPU/WebGL2 smoke runs.