-
Notifications
You must be signed in to change notification settings - Fork 0
Accessibility en SG
🌎 Language: Singlish (en-SG) — see all 33 languages
LockedIn CLI is a joke, but its accessibility is not. A terminal UI this visually rich — gradient wordmark, box-drawing cards, braille spinners, emoji — is genuinely hard to use with assistive technology unless you design for it. This page explains what the CLI does, how to turn it on, and the general best practices behind it (useful well beyond this project).
| Mode | Flag | Env | What it does |
|---|---|---|---|
| Screen reader |
--accessible (--a11y, --screen-reader) |
LOCKEDIN_ACCESSIBLE=1, or TERM=dumb
|
Clean linear plain text: no borders, no ASCII art, no spinner motion, no decorative glyphs; colour off; short prompt; semantic landmarks ("Post:" … "(end of post)"). |
| High contrast |
--high-contrast (--hc) |
LOCKEDIN_HIGH_CONTRAST=1 |
A high-contrast palette for low vision: pure-white secondary text, brighter accents, no dim, solid accent instead of the low-contrast gradient. |
| Low distraction |
--low-distraction (--calm, --reduce-motion) |
LOCKEDIN_LOW_DISTRACTION=1, LOCKEDIN_REDUCE_MOTION=1
|
Reduced motion (no spinner animation), no decorative emoji, calm solid colour — keeps the visual layout. For reduced cognitive/sensory load. |
| Plain / monochrome |
--plain (--mono, --monochrome) |
LOCKEDIN_PLAIN=1, or NO_COLOR=1
|
Disables all colour while keeping the full layout, borders, and emoji. For terminals with poor colour support, logging, or preference. Overrides FORCE_COLOR. |
Can combine one: --high-contrast --low-distraction gives you a bright, calm,
emoji-free UI; a screen-reader user on a TERM=dumb terminal gets accessible mode
automatically. When modes conflict, the more restrictive one wins — monochrome
beats a colour palette, and screen-reader mode supersedes plain.
lockedin --accessible post
lockedin --high-contrast
lockedin --plain post
LOCKEDIN_LOW_DISTRACTION=1 lockedin auraNo need decide everything up front. Inside the interactive session, the /a11y
slash command is a real, working control panel (accessibility is not the satire):
| Type | Result |
|---|---|
/a11y |
Show the current state (on/off) of all four modes |
/a11y <mode> |
Toggle one: screen-reader, high-contrast, low-distraction, plain (aliases like sr / hc / calm / mono work too) |
/a11y reset |
Turn every mode off |
State is always shown as an explicit on/off word, never colour alone — the very users this serves may not perceive the colour. The panel is fully localized.
These principles we applied here, not just say-say only — the same ones apply to any terminal tool.
- Semantics over decoration. A screen reader reads characters. Box-drawing borders become "horizontal line, horizontal line…"; an ASCII-art wordmark is noise. Accessible mode replaces visual structure with words: the splash announces "LockedIn CLI" as text, and cards get landmarks ("Post:", "(end of post)") so users know where a block starts and ends.
- Never rely on colour or icons alone, can? Meaning that's carried only by colour or an emoji is invisible to some users. Keep the text meaningful with colour off — e.g. "Connected with Ava" reads fine once the ✔ is gone.
- Provide text alternatives / strip the noise. Decorative emoji get read aloud verbosely ("📥" → "inbox tray"). Accessible mode strips purely decorative glyphs and keeps the words; low-distraction strips the loud emoji but keeps the layout for sighted users who just want calm.
-
Respect reduced motion. Animation (the braille spinner) is a distraction
and can be a vestibular trigger. Accessible and low-distraction modes don't
animate — they print the status once, statically. This mirrors the web's
prefers-reduced-motion. - Offer high contrast. Low-contrast "muted gray" secondary text fails WCAG contrast for many users. High-contrast mode swaps it for pure white and brightens accents.
- Reduce cognitive load. Beyond vision, some users need less: fewer flourishes, no motion, no emoji. That's a first-class mode here, not an afterthought.
-
Honour platform conventions. The CLI already respects
NO_COLOR; it also treatsTERM=dumb(what many screen-reader and Emacs shells export) as "go accessible", and readsLOCKEDIN_REDUCE_MOTION. Detecting the user's existing signals beats making them configure yet another thing. - Make it testable, and keep it tested. Accessibility that isn't in the test gate rots. The suite asserts that accessible output has no decorative glyphs, that landmarks are present, that high contrast swaps the palette, and that low-distraction stays border-aligned — in every language.
Directional formatting is also fail-closed. Arabic, Persian, Hebrew, and Urdu emit no bidi
controls unless the user explicitly sets LOCKEDIN_BIDI=on for a terminal known
to support isolates; screen-reader mode strips them even then. No TTY probe or
terminal allowlist can override that safe default.
-
a11yFilter(s)strips decorative Unicode (box-drawing, block, geometric, technical, dingbats, braille, emoji) and flushes text left — applied to all output in accessible mode. -
emojiFilter(s)is the lighter low-distraction filter: it removes only the loud emoji/symbols and keeps box-drawing, bullets, arrows, and ANSI colour, so the visual layout survives. - The colour object
Cis swapped to a high-contrast palette in place; gradients fall back to a solid accent when high-contrast or low-distraction is on. Plain mode forces everyCentry empty (colour fully off, even underFORCE_COLOR) while leaving the layout untouched. -
renderSplash, the spinner,renderPrompt, andcardhave semantic branches for accessible mode (plain text, no motion, landmarks). - Detection lives in
detectAccessible/detectHighContrast/detectLowDistraction/detectPlain; the entry point applies them before rendering. The in-session/a11ycommand (handleA11y+renderA11yStatus) toggles the same module-level state live.
The tutorial's review checklist includes an accessibility step, and it's a good habit anywhere:
Run
lockedin --accessible <your command>and confirm it reads as clean plain text — no new decorative glyphs slipping past the filter — and that any new structured block has a landmark. Then try--high-contrast,--low-distraction, and--plain(which must emit no colour codes but keep the layout). New user-visible text needs a key in every language bundle, so the/a11ypanel and help stay translated.
Satire. Not affiliated with LinkedIn. GPL-3.0-or-later.
Tutorial
- 1 · Orientation
- 2 · How the Code Works
- 3 · Your First Agent Task
- 4 · Prompting & Reviewing
- 5 · Localization
Reference
Satire · Sátira · 風刺. Not affiliated with LinkedIn. GPL-3.0-or-later.