accessibility and motion
Loafkit provides native elements and some coordinated keyboard behavior. your app still owns names, instructions, validation, content order and the way a complete task works. a component import isn’t an accessibility check by itself.
start with the control’s name
Choose a name that makes sense when read on its own.
<script>
import { Field, FieldLabel, FieldDescription, Input } from '@ciabi/loafkit-ui';
let name = $state('');
</script>
<Field>
<FieldLabel htmlFor="accessible-collection">Collection name</FieldLabel>
<Input id="accessible-collection" bind:value={name} aria-describedby="accessible-collection-help" />
<FieldDescription id="accessible-collection-help">Choose a name that makes sense when read on its own.</FieldDescription>
</Field>FieldLabel’s htmlFor matches Input’s ID, and the description is connected explicitly. keep the same relationships for errors. placeholders and color alone don’t explain what someone needs to enter.
keyboard contracts
| piece | current behavior |
|---|---|
| native buttons, Toggle | normal Enter and Space activation |
| Checklist | native checkboxes inside a fieldset and legend |
| Selector | arrows, Home/End, Enter/Space, Escape and Tab handling |
| Codegroup | tablist with Left/Right and Home/End navigation |
| SubNav | links and native details disclosures |
| dialogs | native modal dialog, with optional Escape/backdrop dismissal |
| Popover | controlled expanded state, scoped Escape and outside dismissal |
| OnThisPage | heading links and keyboard reading-position range |
Switcher provides presentation around your buttons; your app owns their selection semantics. Navbar’s current tablist role doesn’t make its destination links a complete tabs widget. Carousel selection and scroll buttons don’t promise a listbox keyboard contract.
focus and recovery
keep focus indicators visible. name dialogs with a visible title or an accessible label, and include a way to leave a nondismissible task. Popover isn’t modal and doesn’t move focus on opening; arrange its content so normal keyboard navigation reaches it.
for asynchronous work, show pending, success and failure states where they help someone recover. don’t use only a red border to communicate a failed save. custom dialog footers let you own that flow.
motion and responsive checks
some shell and dialog styles respond to reduced-motion preferences, but that isn’t a library-wide guarantee for every transition or programmatic smooth scroll. check the components and motions your app actually uses with reduced motion enabled.
test long labels, zoom, narrow widths and both palette types. the shared status foreground heuristic isn’t a WCAG contrast guarantee. use explicit foreground tokens where the real palette needs them, and test keyboard focus on the final composition.