Repository navigation
Conversation
# Conflicts: # src/builder.rs # src/draw.rs
…345) C1 of the #345 design note. While a listbox overlay is open, the node it is anchored to (the focused text edit of a field, or a select's trigger) now says that it controls the listbox and which item the arrows reached, the aria-controls and aria-activedescendant of the web; it already said expanded and has_popup, and those now go to the same node. A virtual list's active descendant goes the same way. Shape: #381's relation path is generalised rather than copied. `Pass` gathers `relation::Relation`s (`Controls`, `ActiveDescendant`) instead of `(Id, Id)` pairs; the overlays' controls relations come back from `overlay_input::judge`, the highlights' from `nav::relations`, and all are announced once, after the pass has drawn and the keys have moved the highlight, only between nodes both in the tree. The virtual list's `set_active_descendant` from a row's draw closure (the unsafe shape #387 names) is gone. The listbox's node is its blocker's, now named by `draw::blocker_id`. Behaviour changes: - The select's trigger announces `controls` (its listbox) and the active descendant (the highlighted option) while open. - A listbox overlay anchored to a text field announces expanded, has_popup, controls and the active descendant on the field's text edit, which has the focus, instead of expanded and has_popup on the field's leaf node. Builds on #381 (merged in, with its conflicts against main resolved by keeping both sides). Part of #345. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
…345) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
The user chose the virtual list for the palette's results now (#345), so a search field must drive a virtual list it does not focus. New on `ListChain`: - `keys_from(field: Id)`: a listbox whose keys come from the node `field` while the focus is in it. The arrows and Page keys move the highlight (Home and End stay the field's), Enter activates it, a click on a row gives the focus back to the field, and the field announces that it controls the list and which row is highlighted. The list is no Tab stop of its own. - `highlight_first()`: the first enabled row is highlighted when the list is first laid out and whenever its rows change, so Enter picks the first match at once. - `row_enablement(Fn(R) -> Enablement)`: a disabled row is announced disabled and the keys, the pointer and activation pass it by. - `row_mark(Fn(R) -> Option<Mark>)`: a row's check, announced as toggled. `Builder::virtual_list` now takes `impl Into<Cow<'f, [R]>>`, so the rows can be computed in the frame (a filtered result list) as well as borrowed; every existing caller still compiles. `MenuStyle::box_classes` and `MenuStyle::row_height` are public, for a list drawn as a menu outside core. Shape: a listbox highlight's owner is now one enum (`nav::Owner`: an overlay with or without an anchor, or a list keyed by itself or from a field) instead of an anchor plus a `list` flag, and the same owner decides which focus keys it and which node announces it. The field's controls relation goes through #381's relation path. Behaviour changes: none for existing lists (a list keyed by itself works as before; all vlist tests unchanged). Part of #345. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
`controls` stays in the relation machinery of this branch; main's accessibility parent and accessible description come with controls-350. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AJYxo4YJZUXcPJ1bHdAHKy
Main's `when`/`when_some` impl met this branch's `ListChain<R: Clone>`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AJYxo4YJZUXcPJ1bHdAHKy
Owner
Author
|
Approved by the user on its tests (2026-11-19). GitHub's required checks pass on the branch merged with current main. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #345. The user chose the virtual list for the palette's results now, so core gains a list a search field drives. Built on #391 (C2–C4) and #397 (C1, and so #381), which are merged in; this diff shows their changes until they land.
API for review (
ListChain,vlist)ListChain::keys_from(field: Id) -> Self: a listbox whose keys come from the nodefield(fromBuilder::id_of) while the focus is in it.nav(ListNav::Listbox).ListChain::highlight_first() -> Self: the first enabled row is highlighted when the list is first laid out and whenever its rows change, so Enter picks the first match at once.ListChain::row_enablement(impl Fn(R) -> Enablement) -> Self: a disabled row is announced disabled, and the keys, the pointer and activation pass it by.ListChain::row_mark(impl Fn(R) -> Option<Mark>) -> Self: a row's check, announced as toggled.Builder::virtual_list(key, tw, rows: impl Into<Cow<'f, [R]>>)(was&'f [R]): rows can be computed in the frame (a filtered result list) as well as borrowed. Every existing caller compiles unchanged.MenuStyle::box_classes(&TextSpec) -> TwandMenuStyle::row_height(&TextSpec) -> f32are now public, for a list drawn as a menu outside core (the extras palette).Shape
nav::Owner: an overlay with or without an anchor, or a list keyed by itself or from a field), replacing an anchor plus alist: bool.controlsrelation goes through Core: NodeHandle::controls(Id), the aria-controls relation (part of #350) #381's relation path, gathered from the lists laid out in the pass.Behaviour changes: none for existing lists. Every vlist test is unchanged.
Tests (
tests/it/vlist_keys_from.rs, real path)Also nav unit tests for skipping disabled rows.
Checks
cargo xtask ci: exit 0.🤖 Generated with Claude Code