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.
This commit is contained in:
maoyingjie
2026-10-25 00:01:24 +08:00
parent b474a63303
commit 2e4b376537
9 changed files with 223 additions and 20 deletions
+5 -1
View File
@@ -23,5 +23,9 @@ export default defineConfig({
),
},
},
test: { environment: "jsdom", include: ["tests/**/*.test.ts"] },
test: {
environment: "jsdom",
include: ["tests/**/*.test.ts"],
setupFiles: ["tests/setup/cssom.ts"],
},
});