feat(collection): add optional filtering and virtual focus for composite pickers
ComboBox and Autocomplete need two capabilities the collection protocol did not express: filtering a collection by an external input value, and keeping DOM focus in the composite's input while an active option is tracked for aria-activedescendant. Both are opt-in members on CollectionOwner plus optionId/reveal on the owned collection. Standalone ListBox and Select provide none of them and keep their previous behaviour: DOM focus still moves into the list, one roving tab stop, no row filtering. Filtered rows stay mounted with data-filtered (display:none) so their text and accepted selection survive; only display, aria positions and keyboard navigation see the visible subset. Under virtual focus the list never takes DOM focus, never exposes a roving tab stop, and leaves keyboard handling to the composite; reveal() scrolls a virtualized window and waits for the row to mount before the composite reads its id. Includes the playground verification page, a ten-case suite and the B02a section of the migration report.
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
Base list-box item styles
|
||||
========================================================================== */
|
||||
|
||||
/* Owner-filtered rows stay mounted (text and selection survive) but leave
|
||||
display and keyboard navigation. */
|
||||
.hv-list-box-item[data-filtered="true"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hv-list-box-item {
|
||||
@apply relative flex min-h-9 w-full items-center justify-start gap-3 rounded-2xl px-2 py-1.5 outline-none no-highlight;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user