rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
11.08k stars 576 forks source link

Add accessibility mode #1047

Open SamWhited opened 2 weeks ago

SamWhited commented 2 weeks ago

Hi all,

I'm currently working on making one of my applications accessible to screen readers and wanted to request that this become a native feature of tview.

I'm not sure how other TUI libraries do this, but I have seen at least one that has its various widgets support both the normal TUI draw function as well as a CLI/prompt style draw function, so having a second DrawCLI or similar and maybe an AccessiblePrimitive interface that adds this method could be an option.

Thanks for your work on tview, and for considering this issue.

rivo commented 1 week ago

I'm not sure how this is supposed to work. Your description is very light on details. Maybe you want to link to that other library?

Almost everything in tview centers around interactivity and a graphical representation of information. I'm not sure how this can translate to what you're proposing. I also feel that this kind of request should involve someone who actually needs to use a tview application with a screen reader. If there is no audience for such a feature, I don't see a reason to spend much time on it.

SamWhited commented 1 week ago

Sorry to be light on the details, I'm not sure entirely how this works yet and am still digging into how other accessible applications do this. For an example of a library that works the way I was attempting to describe there's https://`github.com/charmbracelet/huh` a library for bubbletea that does forms. There may be other ways, of course, this was just the only example I found in a library for Go.

I should also note that I'm happy to dig into this further and do some or all of this work, I know you have a lot on your plate and I don't want to make demands of your time. I just want to know that you'd like to have the library be more accessible before I spend too much time on what will be a rather large project.

I also feel that this kind of request should involve someone who actually needs to use a tview application with a screen reader. If there is no audience for such a feature, I don't see a reason to spend much time on it.

I'm struggling a bit to respond to this, and will try to do so in a more measured way later if I can, but for now let me just say that I disagree and it's important to me that my own applications be accessible to terminal users who also use screen readers and other accessibility devices. It seems like a catch 22 to expect people to first use my program (which is broken for them, so why would they use it?) before I'll fix what is broken for them. That being said, any eventual work should of course be guided by the people who will actually use it, I don't intend to just implement something and call it "good enough" since I am certainly no expert on how folks use screen readers and that would likely result in a sub-par product. Anyways, I am happy to spend my own time on it, but making this work will almost certainly be something that will require upstream work in whatever UI toolkit we use, which is why I filed this issue here. Again, I am happy to do this work if you'd like, I just know we've had issues in the past where you prefer to do the work yourself, so I wanted to offer and I hope it hasn't come across as too pushy, sorry if it has.

patricus3 commented 1 week ago

hello. I am blind myself, so it actually is needed we exist. we want equal rights