Mixins / foldkit-mixins-ui
Accessibility patterns
Every adapter has an A11y.pattern beside its Slots, under Patterns: the
slots a widget of that kind must publish and what each must expose. The
catalog lists them with a tier (stateful for a Submodel, stateless for
a decorated native control), the ARIA roles involved, and the platform
floor: what the widget relies on the browser for (focus-trap,
escape-dismiss, top-layer, form-submission, ...), so nothing here
reimplements it and a reader or an agent can ask.
ts
import { A11y } from 'foldkit-mixins'
import { Patterns } from 'foldkit-mixins-ui'
A11y.validate(Patterns.Tabs, MyTabsSlots) // [] when a custom tabs view publishes what tabs need
Patterns.catalog.find(entry => entry.name === 'dialog')?.floor // ['focus-trap', 'escape-dismiss', ...]A test iterates the catalog and validates each adapter's own Slots against its pattern, so an adapter cannot drift from the contract it claims. The patterns are written separately from the Slots, which is what makes the check mean something.