Context
Grocery lanes, restaurant ordering kiosks and the Academorix entry kiosks run unattended. They must be usable by a seated person and a blind person, reset when a visitor walks away, and lock the device to the app.@stackra/platform
had a KioskMode port and a desktop kioskOnLaunch default that nothing read, and @stackra/ui had no unattended
mode at all.
Decision
KioskSurfacein@stackra/ui, web and native. It wraps an unattended screen: it resets through the caller’sonIdleafteridleTimeoutMswith no touch, pointer or key; lays the screen out for aKioskReach(standing, orseatedwith every control in the lower band and larger targets); carries high contrast; anduseKiosk().announcewrites every announcement to a polite live region (web) or the screen reader (native) and, with audio on, speaks it (the browser’s speech synthesis on web, the caller’sspeakon native). It decides nothing about sessions.- The defaults are configuration, the values are device settings.
KioskConfig(platform.kiosk) holdsenterOnLaunch,idleTimeout(90 seconds),reach,isHighContrastandisAudioOn; a device’s settings, keyed by its device-catalogue kind and its venue, override them. No timeout or layout is a constant in a component. - The kiosk lock on launch.
enterKioskOnLaunch(kiosk, config, deviceSetting?)entersKioskModewhen the device setting (or the config) asks, answers a refusal instead of throwing so a till still starts, and leaves a lock that is already on. Each target’screateApp(@stackra/app) calls it once after boot; on Electron it passes{ enterOnLaunch: desktop.kioskOnLaunch }.
Consequences
- A product builds a kiosk screen from the ordinary components inside one
KioskSurface; the same components work on a staffed till becauseuseKiosk()answers null there. - High contrast on web is the theme’s
prefers-contrast: moreedge set on the surface; a full high-contrast palette needs a token mode (later, in@stackra/tokens). - Native audio needs a speech driver; until one ships the caller passes
speak.
Enforcement
planned — the accessibility audit of the kiosk screens in the playground e2e suite (axe, light and dark, LTR and RTL); the unit tests inpackages/design-system/ui/src/{react,native}/kiosk-surface/__tests__/ and
packages/experience/platform/src/core/functions/__tests__/enter-kiosk-on-launch.function.test.ts.
Supersedes and sources
Supersedes: none. Sources:notes/handover/stackra-package-needs.md (review round 3 row); notes/handover/config-model.md.