Comment by miki123211

5 hours ago

We should make a terminal accessibility testing interposer (screen/tmux/ascinema style) that collapses all horizontal whitespace to a single space character, disables all color, doesn't allow hardware cursor hiding, slows down to teletype speeds, and forces all output to the end of the buffer unless echoing a typed character. This would be pretty indicative of the experience a screen reader user gets (and I say this as a screen reader user). You'd get some false positives; that tool would be problematic with some patterns which do actually work though.

If your TUI works in conditions like these, or can at least be accessibly configured to do so, you're pretty much done accessibility-wise.

There are some quick wins to be made here; disabling spinners, gratuitous animations and status lines, moving the hardware cursor as you navigate through menu options, even if there's a color or emoji-based selection indicator present, avoiding unnecessary re-renders (don't redraw the whole prompt if you're just echoing a single character, I'm looking at you, Python 3.13+), sorting line segments by importance (timestamps should go at the end, messages at the beginning), that sort of thing.

The real fix would involve an aria-style protocol that lets you actually communicate semantics to a screen reader, but that would require buy-in from TUIs, TUI libraries, terminal emulators, operating systems and screen readers, so it will never happen.