Commit Graph

2 Commits

Author SHA1 Message Date
maoyingjie 2e4b376537 fix: complete submenu panel ARIA, focus and event passthrough
- Submenu panel name priority is explicit aria-label > menu content channel >
  this instance's trigger; an explicit label drops the id reference so it cannot
  be shadowed.
- openAutoFocus and animationend chain with the caller's handlers like keydown
  and interact-outside, so caller callbacks run and can cancel.
- The panel loop falls back to the menu-level shouldFocusWrap and is always
  passed as a boolean: an undefined -> true update is dropped by the base prop
  chain, so the menu policy never applied.
- Add a jsdom CSSOM polyfill for CSS.escape via vitest setupFiles; the
  animationend test no longer raises an unhandled error.
2026-10-25 00:01:24 +08:00
maoyingjie b474a63303 fix: resolve close policy, handler merging and submenu panel props
- Menu forwards the raw close policy and the item resolves item > menu
  (boolean or function) > per-mode default, so action items close by default and
  an explicit single/multiple policy is no longer pre-empted.
- Root popover chains caller handlers with the internal ones for keydown,
  escape, interact-outside, auto focus and animation end; callers run first and
  a prevented event stops the internal logic.
- Submenu panels receive the nested popover's data/style/id/extra events, honour
  isKeyboardDismissDisabled without closing the parent level or a modal, and
  forward shouldCloseOnInteractOutside.
- A standalone Menu provides its own content-attribute channel so the
  accessible name/description land on the real role=menu node.
2026-10-24 23:42:05 +08:00