LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 18, 2026, 8:31 PM
updatedAtNov 18, 2026, 9:17 PM
githubUrlhttps://github.com/neomjs/neo/issues/21391
authorneo-opus-ada
commentsCount0
parentIssue20874
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 21357 A board example groups its cards into swimlanes that collapse
closedAtNov 18, 2026, 9:17 PM

Enter on a lane's collapse toggle also opens the focused card's editor

Closed v14.0.0/archive-v14-0-0-chunk-4 bugaiaccessibility
neo-opus-ada
neo-opus-ada commented on Nov 18, 2026, 8:31 PM

Context

Found while driving examples/board/swimlanes for #21357, whose first step says a defect found there becomes an engine ticket linked as a blocker. Measured on dev ccf172411c with that example from ada/21357-board-swimlanes (d185884fd5), headless Chromium at 1440 × 900: with the Design lane's toggle focused, Enter collapses the lane and also opens "Edit card" (Neo.board.CardEditor) for the board's focused card, which takes the focus. Space on the same toggle collapses and expands the lane and keeps the focus.

The Problem

A keyboard user who collapses a lane with Enter gets an editor for a card they did not choose, and loses their place: the next key goes to the editor. Click and Space work, so only Enter is affected.

The Architectural Reality

  • src/board/SelectionModel.mjs, onKeyDownEnter() (:610), bound on board.keys (:802): unless the target is editable, Enter activates the focused card through board.activateCard(), which opens CardEditor.
  • It already returns early when the event path holds a column's collapse button (neo-board-column-collapse, a <button>, src/board/Column.mjs:530) or a card's menu button (neo-board-card-menu-button, a <button>, src/board/Card.mjs:358), at :619.
  • A lane's toggle (neo-board-lane-collapse, src/board/LaneRow.mjs:188) is a third <button> that list misses. Its native click on Enter collapses the lane, and the board's binding then opens the editor.
  • Path nodes carry their tag as tagName, lower case (src/main/DomEvents.mjs, getTargetData()). Corrected 18 Nov: this line first said tag, read from isEditableTarget(), whose tag === 'input' checks therefore never match a browser path (a defect-note, out of scope here).
  • Design authority: the exemption at onKeyDownEnter():619, "Enter on a column's collapse button or a card's menu button belongs to that button", read from its two class checks. The lane toggle is the same kind of control.

The Fix

In onKeyDownEnter(), replace the two class checks with one rule: when the event path holds a button (node.tagName === 'button'), Enter belongs to that button and the board activates no card. The rule covers the column toggle, the card menu, the lane toggle and any button a later header adds.

Acceptance Criteria

  • Enter on a lane's collapse toggle collapses or expands the lane, opens no card editor, and leaves the focus on the toggle.
  • Enter on a focused card still opens its editor; Enter on a column's collapse button and on a card's menu button behave as they do today.
  • A unit spec in test/playwright/unit/board/SelectionModel.spec.mjs covers the three buttons and a card; the lane toggle case is red on dev.

Out of Scope

  • The swimlanes example and its e2e (#21357), which checks this in a browser once both land.
  • Other keys on the lane toggle: Space already works.
  • isEditableTarget()'s tag checks (see the corrected line above).

Related

Blocks #21357. Parent #20874; the board family landed with #20875. Owned, not open to contributors: #21357 needs it before the examples read on Fri 20 Nov.

Live latest-open + closed sweep: latest 20 open, plus open and closed search ("board Enter lane collapse card editor"), at 2026-11-18T19:32Z; no equivalent or prior exclusion. Backlog band: 84 open (red); the owning epic is #20874, so this is filed as its leaf. MC sweep: "Enter on a board lane collapse toggle opens the card editor, keyboard focus jumps to the editor", 5 results, no prior decision found. Own-assignment sweep: 10 open, none overlapping. A2A in-flight sweep: the last 20 messages to 19:30Z, no claim on the board's keyboard handling.

Origin Session ID: 26d0379e-899d-47c6-854f-be012fd012d5