feat: add --accessible flag for screen reader friendly TUI output#20
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a global --accessible CLI flag to enable screen-reader-friendly output in the Ink-based TUIs, using Ink’s isScreenReaderEnabled/useIsScreenReaderEnabled() to avoid prop-drilling and replacing many Unicode UI glyphs with plain text.
Changes:
- Adds
--accessibleas a global CLI option and merges it into command options viawithGlobalOpts(). - Passes
isScreenReaderEnabledinto Inkrender()for TUI commands and updates TUI components to useuseIsScreenReaderEnabled(). - Updates multiple TUIs/banners to remove borders and replace Unicode icons/arrows/selection glyphs with accessible text equivalents.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cli.ts | Adds --accessible global flag and merges it into per-command options in withGlobalOpts(). |
| src/services/tests/cli.test.ts | Updates withGlobalOpts expectations and adds coverage for accessible merging/defaulting. |
| src/commands/tui.tsx | Passes isScreenReaderEnabled into Ink render and disables animation when accessible. |
| src/commands/batch.tsx | Passes isScreenReaderEnabled into Ink render for both GitHub and Azure batch TUIs. |
| src/commands/batchReadiness.tsx | Passes isScreenReaderEnabled into Ink render for batch readiness TUI. |
| src/ui/tui.tsx | Uses screen-reader mode to swap status glyphs, borders, cursors, and eval result formatting. |
| src/ui/BatchTui.tsx | Replaces selection markers and status icons with accessible equivalents; removes borders in accessible mode. |
| src/ui/BatchTuiAzure.tsx | Same accessibility substitutions as GitHub batch TUI, including instruction status labels. |
| src/ui/BatchReadinessTui.tsx | Swaps selection markers and completion icon for accessible-friendly text. |
| src/ui/AnimatedBanner.tsx | Disables animation and renders a simplified “AGENTRC” banner when screen-reader mode is enabled. |
Comments suppressed due to low confidence (2)
src/ui/tui.tsx:1143
- The accessible eval summary string includes
formatTokens(r), which currently returns a string containing the Unicode bullet•("tokens w/: ... • w/o: ..."). This means accessible mode still emits Unicode symbols and shorthand likew/:/w/o:. Consider makingformatTokensproduce a fully text-based format whenaccessibleis enabled (e.g., "tokens with: X; without: Y").
{accessible
? `Verdict: ${r.verdict === "pass" ? "PASS" : r.verdict === "fail" ? "FAIL" : "UNKNOWN"} ${r.id} (score:${r.score} ${formatTokens(r)})`
: `${r.verdict === "pass" ? "✓" : r.verdict === "fail" ? "✗" : "?"} `}
src/ui/BatchReadinessTui.tsx:320
- Same whitespace/newline issue as the org selection list: the bracketed selection marker is split across lines inside a
<Text>, which can introduce literal whitespace/newlines in terminal rendering. Consider keeping[...]contiguous (e.g.,> [x] repovs> [ ] repo) to ensure stable layout.
<Text key={actualIndex}>
{actualIndex === cursorIndex ? ">" : " "} [
{selectedRepoIndices.has(actualIndex) ? (accessible ? "x" : "●") : " "}]{" "}
{repo.fullName}
</Text>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
src/commands/batch.tsx:99
- Same as above: passing
{ isScreenReaderEnabled: Boolean(options.accessible) }forces screen reader mode off by default and can overrideINK_SCREEN_READER. Consider omitting the option when--accessibleis false/undefined, or computing it from both the CLI flag and env var.
const { waitUntilExit } = render(<BatchTui token={token} outputPath={options.output} />, {
isScreenReaderEnabled: Boolean(options.accessible)
});
- Only pass isScreenReaderEnabled when --accessible is set, preserving Ink's INK_SCREEN_READER env var detection - Fix AnimatedBanner stuck intro state when accessible mode enabled via env var by initializing status to idle and calling onComplete unconditionally - Replace underscore labels (HAS_INSTRUCTIONS) with spaced text (Has Instructions) for screen reader clarity - Make Divider component use ASCII characters in accessible mode
5 tasks
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 2, 2026
Add --accessible to Global Options in README.md and update .github/copilot-instructions.md to reflect the new global flag introduced in #20. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a global
--accessibleCLI flag that replaces Unicode symbols with screen-reader-friendly text across all TUI components. Also responds to Ink'sINK_SCREEN_READERenv var.Changes
--accessibleglobal option merged viawithGlobalOpts(), following existing--json/--quietpatternisScreenReaderEnabledto Ink'srender(); components useuseIsScreenReaderEnabled()hook (no prop-drilling)✓✗◉○❯→●▶▍) with text (OK,FAIL,[x],[ ],>,-, etc.), removes borders, simplifies banner to plain "AGENTRC"Verdict: PASS/FAIL/UNKNOWN id (score:N tokens)instead of redundant symbol+id linesHAS_INSTRUCTIONS/NEEDS_INSTRUCTIONSreplace terse✓/✗in batch repo lists--accessiblemerging + updated existing expectations (all 473 pass)Files changed
src/cli.ts--accessibleglobal option,withGlobalOpts()mergesrc/commands/tui.tsxisScreenReaderEnabledto render, skip animationsrc/commands/batch.tsxisScreenReaderEnabledto both GitHub/Azure pathssrc/commands/batchReadiness.tsxisScreenReaderEnabledto rendersrc/ui/AnimatedBanner.tsxsrc/ui/tui.tsxsrc/ui/BatchTui.tsxsrc/ui/BatchTuiAzure.tsxsrc/ui/BatchReadinessTui.tsxsrc/services/__tests__/cli.test.tsAddresses review feedback from #16.