[BUG] Add +/- to code diff (screen reader accessibility)

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 4 comments · opened May 2, 2025 · closed Jun 11, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 0.2.99
  • Operating System: Windows 11, using WSL with Ubuntu 24.04.1 LTS
  • Terminal: "Terminal" app in Windows (windowsterminal.exe), using Ubuntu terminal

Bug Description

For screen reader users, there is no easy way to view added/removed lines in a diff, for for files edited by Claude Code.
My understanding is that the only indication of whether a line is added or removed is the color (green/red) but that formatting info is harder to access with screen reader.
The simplest fix I can think of is have a "+" or "-" next to the line depending on added/removed, just like in git diff.
Maybe this can be a toggle-able setting in Claude Code config too, if some users prefer without it.

Steps to Reproduce

  1. start Claude Code with claude in WSL Ubuntu terminal
  2. ask Claude to add a line and also remove another line in an example file.
  3. Claude Code then prompts you to review the diff, and visually there are green/red lines indicating add/removal. But there's no screen reader friendly text that indicates added/removed lines.

Expected Behavior

Expect there to be a way to indicate to screen reader users through text rather than font color, about whether line is added/removed in the diff.

Actual Behavior

Only color indication

Additional Context

None

View original on GitHub ↗

4 Comments

dennischenfeng · 1 year ago

@ Screen reader users, are there any good workarounds for this for the time being?
My current workaround is pretty terrible:

  1. git commit before using claude code
  2. use claude code to make one code change
  3. optional: sparsely view the lines of the diff. But without any indication of added/removed lines, it's a lot of me guessing what's added/removed. Mostly just a skim
  4. Blindly confirm that I want the code change
  5. use git diff myself to see the code change in fully accessible way, and git restore if I didn't like it
bcherny collaborator · 1 year ago

Fix incoming in tomorrow's release!

Neurrone · 1 year ago

I didn't notice anything different while using the latest version. The changelog also doesn't make any mention of this being fixed?

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.