Skip to content

Fix(c-date-picker, c-time-picker): Ring the panel's focus under keyboard modality - #307

Merged
mikakoskinencsc merged 2 commits into
mainfrom
development
Oct 5, 2026
Merged

mikakoskinencsc merged 2 commits into
mainfrom
development

Conversation

@razorfever

Copy link
Copy Markdown
Contributor

No description provided.

razorfever and others added 2 commits October 5, 2026 10:25
…ard modality

Clicking into the field and pressing Alt+ArrowDown opened the panel
with focus on a day or column row but no ring. Chrome ignores a keydown
that carries Alt for :focus-visible, and Firefox and Safari carry the
field's mouse focus through every script focus(), so in Firefox even
the arrow keys never brought the ring back. The focus-ring specs had
hidden it by pressing ArrowLeft before the chord.

A shared useKeyboardModality tracks the host's last press: any keydown,
chords included, sets keyboard modality, and a pointerdown ends it. The
pickers' script focus (open, arrow and list moves, picks, the end
switch, the Tab trap) passes focusVisible: true under it and otherwise
leaves the browser to decide, so a mouse open stays unringed.

A selected day's primary ring vanished into its primary fill; it now
rings in on-primary inside the fill, like the time picker's selected
end tab. CONTEXT.md gains "Keyboard modality".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pick in an empty field fills in the minute, and ADR-0062 rests every
column whose selection the pick changed, a filled-in minute included.
The check compared only each column's tab stop, and an empty minute
column rests its tab stop on the current minute. On the hour that is
already 00, the minute the pick fills in, so the column kept its
scroll. CI hit it at 11:00 ("a minute filled in or clamped rests too").

The snapshot now also compares the selected row. The new spec pins the
landing time at 14:00 while the panel opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mikakoskinencsc
mikakoskinencsc merged commit 7e92920 into main Oct 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants