shadcn.io is not affiliated with official shadcn/ui
Accessibility Settings Onboarding Block for Svelte
Five accessibility switches (high contrast, reduced motion, large text, screen-reader hints, keyboard hints) beside a drawn reading screen that is the only thing that changes as each one is turned on.
Installation
Overview
Show what each setting does before people commit to it with this accessibility step for Svelte with Ark UI. It is a step of Lumenby, a reading app, as a whole screen: the page's rails and one band, a step header and a framed panel split in two. At the start are five Switches (High contrast, Reduce motion, Large text, Screen-reader hints, Keyboard hints), each with a line on what it does. At the end is a drawn reading screen, the only thing that changes: High contrast inverts it, Reduce motion stops its looping dot, Large text enlarges its type, Keyboard hints put a key on each button and Screen-reader hints write each button's spoken label under it. On a phone the sample sits above the switches. Apply is the one Shine Button, with a ghost Skip for now. “Preview only: this page keeps your settings.”
FAQ
What does each switch change in the sample?
High contrast swaps the sample to solid foreground with heavier borders. Reduce motion removes the pulse on its status dot. Large text raises the heading, the paragraph and the buttons by a size. Keyboard hints reveal a key on each button. Screen-reader hints reveal the spoken label of each button as a caption. The sample's box has a minimum height that holds the largest state, so nothing below it moves.
Does turning a switch change the page I am on?
No. The note under the sample says it is a preview only, and the only element that reads the switches is the sample. In your app you would apply the real settings after Apply, usually as attributes or classes on the document root, and keep them in the account.
What if my system already reduces motion?
The sample's dot also has motion-reduce:animate-none, so it is still when your system asks for less motion, whatever the switch says. The block's own entrances respect the same setting.
How are the switches named for a screen reader?
Each switch is named by its title and described by its line (aria-labelledby and aria-describedby), so you hear “High contrast, switch, off, Solid black and white, with heavier borders”. The sample is a picture, so it is hidden from assistive technology; the status line says how many settings are on.
What stays local in the demo, and how do I wire it?
The switches live in the page and Apply only says it applied in this demo. In your app save the five flags to the account where apply says so and read them when the app loads. Starting from the visitor's system preferences (prefers-contrast, prefers-reduced-motion) is a good first default.