Skip to main content


can anyone comment on what it's like to use @textualize interfaces as a #blind / Low Vision person?

I'd be seriously tempted to start writing my CLI tools in #python if I could make TUIs that worked decently for the visually impaired too.

in reply to Matt Campbell

@miki I have an idea about how to fix this, but it would involve a protocol between the TUI application and the terminal, and I haven't had time to experiment with that yet.
in reply to Matt Campbell

@matt Wouldn't that be the TUI application, the terminal *and the screen reader*?

I have no idea how you'd do e.g. table navigation in a (Windows) terminal app without extra support from the screen reader.

I guess you could go the virtual buffer route and make it act like a browser, even when there's no HTML involved?

in reply to Mikołaj Hołysz

@miki At some point Windows screen reader devs have to stop assuming that we can keep up with all of the native apps in the world, with known browser engines as a special case. Narrator is the best at generically supporting UI Automation, with NVDA in second place. I haven't checked whether NVDA generically supports table navigation for anything that implements the right UIA patterns.

@masukomi Tagging you in this reply; let me know if you want to be dropped from this subthread.

in reply to Matt Campbell

@miki I *have* thought about adding an option in AccessKit to emulate the Chromium content area bug for bug, so the Windows screen reader virtual buffers would (in theory) work. That's a big project though.
in reply to Matt Campbell

@miki Nor am I sure that browse mode is actually what we want when using a terminal, particularly when the terminal is *not* in a TUI application that has overridden the terminal's default accessibility implementation.
in reply to Matt Campbell

@matt How do you imagine the keyboard navigation patterns for this?

Mac is easy, because you can both use the VO cursor and have the rest of the keyboard interact with the application, but Windows? constantly having to switch between browse mode and focus mode doesn't seem too appealing for terminals, and you can't do table navigation with just NVDA's review cursor.

Mac would have an entirely different problem, that of Voice Over not having a functional speech queue, which would require you to do your own speech for announcing new content instead of relying on the screen reader.

Then you have the problem of how to handle e.g. cursor tracking, in most cases you want the terminal to force your review cursor to the bottom every time new output appears, except when you actually don't. Can you even do that with UIA?

in reply to Mikołaj Hołysz

@matt Then there's the whole cursor tracking problem, how do you detect cursor movement for aesthetic / UI reasons versus when the user actually wanted to move the cursor, particularly in programs like VIm (which let you move the cursor with arbitrary keys) and when there's unpredictable network latency, and how do you communicate that properly to the screen reader.

As far as I understand, NVDA still relies on the "when an arrow key is pressed, wait n milliseconds and read whatever the cursor is on" logic, even on the web, which breaks when there's Javascript involved sometimes.

in reply to Mikołaj Hołysz

@miki I have a partial answer to the cursor movement problem. My idea is that when an accessible screen-oriented TUI is active, it would override the terminal's whole accessibility tree. So, as far as accessibility clients (screen readers) are concerned, there would be no text cursor, unless the TUI's accessibility tree itself has a text input control, and that control is focused.
in reply to Matt Campbell

@miki Then again, I only answered the problem of positioning the actual terminal cursor for aesthetic reasons, not the other stuff. You're right about the problem of handling cursor movements initiated by keys other than the typical arrow keys, especially when you take network latency into account.
in reply to Matt Campbell

@matt I was personally thinking more along the lines of extra "ARIA-like" escape codes that composed well with how terminals actually work, where some of them would apply to the characters being drawn (like color codes do now) and some of them would control general TTY behavior.

In the latter category, you could have codes for "set cursor movement to cosmetic" and "set cursor movement to user-initiated", which could be emitted before any actual cursor-movement codes.

in reply to Matt Campbell

@matt @miki
Read the thread, had a thought.

A while ago i wrote oho, which AFAIK is the world's best‡ ANSI escape code (and other escape codes) to HTML converter

github.com/masukomi/oho

If Texutual to HTML exists or isn't a huge lift, I wonder if we couldn't make some sort of pipeline to a web-page that used aria tags to indicate the subsection of the page that just changed.

‡ admittedly there wasn't a lot of competition.

in reply to masukomi

@matt @miki

🤔 Maybe it'd need a teeny web server that used web-sockets to shove changes to the web page in the browser, as HTML got shoved into STDIN but that wouldn't be hard. And took user input and shoved it back to the terminal.

This entry was edited (2 months ago)
in reply to masukomi

@miki I understand the impulse to go with a web-based hack, because implementing native accessibility APIs, e.g. in a terminal, requires skills that most developers don't have. But I'm working on making native accessibility more approachable with my AccessKit project (accesskit.dev/).
⇧