Selection aspect for list-shaped surfaces. Owns single- or multi-select state with
controllable value semantics; emits aria-selected + click/focus handlers per row.
single mode: at most one selected id, selection follows focus by default. Matches the
Listbox behaviour and the WAI-ARIA listbox single-select pattern.
multi mode: tracks a Set<string>. Selection does NOT follow focus by default — multi
select usually pairs with an explicit toggle affordance (checkbox or keyboard Space) rather
than implicit focus-tracking.
Selection aspect for list-shaped surfaces. Owns single- or multi-select state with controllable value semantics; emits
aria-selected+ click/focus handlers per row.singlemode: at most one selected id, selection follows focus by default. Matches theListboxbehaviour and the WAI-ARIA listbox single-select pattern.multimode: tracks aSet<string>. Selection does NOT follow focus by default — multi select usually pairs with an explicit toggle affordance (checkbox or keyboard Space) rather than implicit focus-tracking.