rfc: accessible mode
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- accessibility, cli
Línea de trabajo
Comienza con la utilidad isAccessible() ya completada y sus pruebas del orden de resolución en @clack/core; después, lee core/src/types.ts y la capa de renderizado compartida. Usa la lista de comprobación por etapas para delimitar un grupo de prompts, y resuelve las preguntas abiertas indicadas con las personas mantenedoras. La tarea estará terminada cuando los prompts relevantes tengan una ruta de renderizado accesible aislada y la validación cubra el comportamiento propuesto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
coming out of the discord convo about spinners and screen readers. tldr of the problem: spinners and live-redrawn prompts get re-announced on every repaint by voiceover/nvda/orca, which makes clack prompts effectively unusable with assistive tech. github hit the same wall with their cli and shipped static text + numbered inputs instead: https://github.blog/engineering/user-experience/building-a-more-accessible-github-cli/
detecting screen readers isn't viable (the reader runs client-side, so over ssh/containers there's zero signal, and local platform APIs are inconsistent + amount to sniffing disability status). so the proposal is an explicit opt-in following the emerging ACCESSIBLE env var convention (charmbracelet/huh already honors it in go land). nothing in the js prompt ecosystem does this yet, so clack adopting it likely sets the convention.
this issue is the coordination doc: design + checklist live here, chatter can stay on discord.
activation semantics
accessible mode is enabled when any of these resolve true, in priority order:
- explicit
accessible: trueoption on a prompt (or global setting) ACCESSIBLEenv var set to any non-empty value (0andfalseexplicitly disable)- open question: should
!isTTYimply it, or stay a separate degradation path?
behavior per prompt
| prompt | accessible behavior |
|---|---|
spinner |
print message once, plain still working: <msg> line every 30-60s (configurable), final done/error line. zero redraws |
progress-bar |
log at milestones (25/50/75/100) instead of continuous repaint |
task / task-log / stream |
audit for line rewrites, route through same static path |
select / select-key |
numbered list, read a number from stdin, re-prompt on invalid |
multi-select / group-multi-select |
numbered list, comma-separated numbers in, echo back parsed selection |
limit-options |
no pagination, print full list |
autocomplete |
degrade to plain "type your answer" + printed options (may split to follow-up) |
text / confirm / password / path / multi-line / date |
strip cursor-repositioning decorations, plain question in / plain input out, confirm becomes (y/n) |
note / box / log / messages |
plain text with clear begin/end delimiters, no box-drawing repaints |
implementation approach
intent is for accessible mode to be a distinct render path rather than if (accessible) conditionals scattered through every prompt. all prompts already flow through the shared render layer in core, so the accessible output should hang off that seam. keeping it isolated there also means future renderer work inherits it for free.
proposed plan
-
isAccessible()util in@clack/core+ resolution order tests - thread
accessibleoption through shared prompt options incore/src/types.ts - baseline screen reader recording against current spinner + select (before/after material)
- pr 1: spinner, progress-bar, task/task-log/stream (static output path)
- pr 2: select, select-key, multi-select, group-multi-select, limit-options
- follow-up: autocomplete
- pr 3: cleanup pass on text/confirm/password/path/multi-line/date + note/box/log/messages
- validation session with a screen reader user on a build
- docs page + accessible example in examples dir
open questions
!isTTYimplies accessible mode, or keep as separate degradation?- global setting api shape (per-prompt option only vs
updateSettings-style global) - interval default for spinner status lines (30s? 60s?)
- how custom renderers compose with accessible mode
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.1k
- Forks
- 218
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bombshell-dev/clack
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
bombshell-dev/clack#613 · 4 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
bombshell-dev/clack#597 ·
-
[Bug] Spinner does not run `onCancel` function on `Ctrl + C`Posiblemente ocupada @cyphercodes la tomó hace 103 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
bombshell-dev/clack#573 · 1 comentario · 2 reacciones ·
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
bombshell-dev/clack#565 · 1 comentario · 1 reacción ·
-
[Request] Improve path selectionAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
bombshell-dev/clack#564 · 1 reacción ·
Todos los issues de bombshell-dev/clack
Issues similares
-
cleanName keeps a state code that's joined to the word before it (SavannahGa → "Savannah Ga")Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openwatersio/slackwater-database#281 ·
Los mantenedores suelen responder en 1 día
-
accepted bug via-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
pingdotgg/t3code#18690 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Bayern feature:Application ready web
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
digitalfabrik/entitlementcard#3176 ·
Los mantenedores suelen responder en 7 días
-
[BUG] 运行位置的分支列表不自动刷新,外部新建的分支看不到Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NanmiCoder/cc-haha#1533 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día