Context
#6033 (open since 2024-10) reports that after opening the menu in examples/button/base, arrow keys no longer navigate right away, and suspects a missing focus() call. It is fixed on dev. A real-Chromium probe of that example at 5d375d9722:
| opened by |
focus right after opening |
ArrowDown |
ArrowDown |
| click |
Item 1 (LI in .neo-menu-list) |
Item 2 |
Item 3 (a parent; its submenu previews) |
| Enter on the focused button |
Item 1 |
Item 2 |
Item 3 |
| Space on the focused button |
Item 1 |
Item 2 |
Item 3 |
| CONTROL: no menu opened |
BODY, no menu |
nothing moves |
|
No committed test asserts it, so #6033 cannot close on evidence that stays true.
The Problem
What makes it work today is one line far from the button: component.Base#afterSetMounted focuses a floating component when it mounts, unless focusOnMount is false. #18765 added that flag so a hover preview does not steal focus. A later change that narrows the default or the floating branch would break #6033 again, and nothing would notice. The closest arm, component/menu/SpawnAnimation.spec.mjs › arrow-key navigation works during the entrance window, focuses the first item itself before pressing a key, so it passes whether or not opening the menu hands focus over.
The Architectural Reality
src/button/Base.mjs#toggleMenu() shows the floating menuList created with parentComponent: me.
src/component/Base.mjs:775 runs me.focusOnMount && me.focus(me.id, true) for a floating component on mount, and focus lands on the first item.
- The
Navigator moves the active item on ArrowDown once focus is inside the list.
test/playwright/component/button/Base.spec.mjs has no menu arm.
The Fix
Arms in test/playwright/component/button/Base.spec.mjs, on a Button with a three-item menu created in the component harness. Open the menu by click, by Enter and by Space on the focused button, then press ArrowDown without any explicit focus call. Assert that focus moved from the first item to the second.
Acceptance Criteria
Out of Scope
- Any change to focus, menu or Navigator behaviour.
Related
#6033 · #18765 (focusOnMount) · #5123 (the Navigator change #6033 suspected)
Live latest-open sweep: checked the latest 20 open issues at 2026-09-16T13:50:12Z; no equivalent. A2A claim sweep: latest 30 inbox messages, all read states; no claim on button menu focus. Memory Core rationale sweep: query_raw_memories on the symptom; hits are today's menu keynav lanes (#18758–#18760), no decision on this witness. Own-assignment sweep: 6 open, none on button menus. Structure-map gate: N/A.
Decision Record impact: none.
Origin Session ID: 0f5a0db0-9f3a-402c-bb4a-aa369ff1efa3
Context
#6033 (open since 2024-10) reports that after opening the menu in
examples/button/base, arrow keys no longer navigate right away, and suspects a missingfocus()call. It is fixed ondev. A real-Chromium probe of that example at5d375d9722:Item 1(LIin.neo-menu-list)Item 2Item 3(a parent; its submenu previews)Item 1Item 2Item 3Item 1Item 2Item 3BODY, no menuNo committed test asserts it, so #6033 cannot close on evidence that stays true.
The Problem
What makes it work today is one line far from the button:
component.Base#afterSetMountedfocuses a floating component when it mounts, unlessfocusOnMountis false. #18765 added that flag so a hover preview does not steal focus. A later change that narrows the default or the floating branch would break #6033 again, and nothing would notice. The closest arm,component/menu/SpawnAnimation.spec.mjs› arrow-key navigation works during the entrance window, focuses the first item itself before pressing a key, so it passes whether or not opening the menu hands focus over.The Architectural Reality
src/button/Base.mjs#toggleMenu()shows the floatingmenuListcreated withparentComponent: me.src/component/Base.mjs:775runsme.focusOnMount && me.focus(me.id, true)for a floating component on mount, and focus lands on the first item.Navigatormoves the active item on ArrowDown once focus is inside the list.test/playwright/component/button/Base.spec.mjshas no menu arm.The Fix
Arms in
test/playwright/component/button/Base.spec.mjs, on a Button with a three-itemmenucreated in the component harness. Open the menu by click, by Enter and by Space on the focused button, then press ArrowDown without any explicit focus call. Assert that focus moved from the first item to the second.Acceptance Criteria
dev.Out of Scope
Related
#6033 · #18765 (
focusOnMount) · #5123 (the Navigator change #6033 suspected)Live latest-open sweep: checked the latest 20 open issues at 2026-09-16T13:50:12Z; no equivalent. A2A claim sweep: latest 30 inbox messages, all read states; no claim on button menu focus. Memory Core rationale sweep:
query_raw_memorieson the symptom; hits are today's menu keynav lanes (#18758–#18760), no decision on this witness. Own-assignment sweep: 6 open, none on button menus. Structure-map gate: N/A.Decision Record impact: none.
Origin Session ID: 0f5a0db0-9f3a-402c-bb4a-aa369ff1efa3