YuktaiDocs v5.3.12

Accessibility

Accessibility widget

One floating ♿ button gives every visitor their own settings: contrast, dark mode, text size, a dyslexia-friendly font, colour-blind filters, reduced motion, larger targets and speak on focus. Choices are saved in the browser and restored on every page.

Live demo

Change this page from code

Each button calls yuktai.apply(…). Watch this page change, then reset.

yuktai.getSettings()

app/components/A11yButtons.tsx
"use client"
import { wcagPlugin } from "@yuktishaalaa/yuktai"

// The ♿ button comes from <YuktAIWrapper showAccessibility>. To change
// settings from your own UI, call the engine directly:
export function HighContrastButton() {
  return (
    <button onClick={() => wcagPlugin.execute({ enabled: true, highContrast: true })}>
      High contrast
    </button>
  )
}

Set up the floating buttons

Choose the options; the code below updates as you go. Try it on this site applies your setup to every page here (this tab only), so you can see it before you copy it.

Builder

Options

app/YuktaiClient.tsx
// generated

Next.js: the React wrapper takes position and engine config (for example autoFix). The page tools there are the 💬 Ask, 🤖 Agent and ⚡ Vibe Coder buttons; see Next.js setup for every button.

Reference

window.YUKTAI_CONFIG (set before the script tag)
OptionDefaultWhat it does
position"left"Side for the floating buttons: "left" or "right"
primaryColor"#0f766e"Button colour; keep at least 4.5:1 against white
title"Accessibility"Settings dialog title
showPageToolsfalseAdds the 🛠 button with the six page tools
defaultTab"qa"First tab of the page tools: copilot, qa, forms, design, ask, voice
voiceLang"en-IN"Speech recognition language, for example "te-IN"
generate(q, ctx), summarize(text)—Optional hooks for your own model (Ask tab)
config—Engine options, for example { autoFix: false, showSkipLinks: false }
applyOnLoadtrueRun the engine on load (restores saved settings)
autoInittrueSet false and call yuktai.init() yourself
Widget methods
MethodWhat it does
yuktai.open() / close()Open or close the ♿ settings dialog
yuktai.openTools(tab) / closeTools()Open the 🛠 page tools on a tab
yuktai.apply(settings)Apply and save settings (returns a promise)
yuktai.reset()Back to the defaults
yuktai.getSettings()The current settings
yuktai.init()Add the buttons (only with autoInit: false)
Settings
KeyValues
highContrast, darkMode, reduceMotion, largeTargets, dyslexiaFont, speechEnabledtrue / false
fontSizeMultiplier0.8, 0.9, 1, 1.1, 1.2, 1.3
colorBlindModenone, deuteranopia, protanopia, tritanopia, achromatopsia