New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic accessibility support for the terminal view #344
Conversation
services can get the text currently being shown.
Thanks a lot! Is it necessary to call |
Hello, |
That will be much less expensive.
Changed, tested and working fine. |
@fornwall Please can you take a look one more time? |
Did this ever get added to Termux? I installed it today and wasn't able to read the terminal's output. Is there something I need to do to get it working with Talkback? |
This PR is still open thus not merged to the code base. |
I'm having lots of issues with the jre and android-studio playing nicely together. Is there an apk somewhere that I can just install until this is merged? |
@stormdragon2976 you can try this one: https://grimler.se/apps/termux-app-access.apk I haven't tested it at all so it's great if you are willing to! |
Thanks so much for this. It is very helpful. The accessibility is very basic indeed, but it does work. Definitely a good start. |
@pvagner I'm really sorry for forgetting about this one, and I would really like to see it included! Could you (or anyone else interested) have a look at enabling this only if accessibility services are enabled (or something similar), as this may slow down the app needlessly if not? Perhaps with something like this in the TerminalView constructor private boolean mAccessibilityEnabled;
[...]
public TerminalView(Context context, AttributeSet attributes) {
[...]
AccessibilityManager am = (AccessibilityManager) context.getSystemService(ACCESSIBILITY_SERVICE);
mAccessibilityEnabled = am.isEnabled(); and then guarding the call with |
I'll be able to use and integrate this code snipped in a week or so. I'm sure something like this is doable. |
Thanks a lot! It's beyond the scope of this immediate change, but could you give some pointers about possible next steps to improve accessibility support? |
enabled when starting the view
@fornwall I apologize for another delay. I have tested your suggestion on my devices and it's working fine over here. Hopefully I've got it right. I can imagine a few more improvements to the TerminalView accessibility support however I am not sure I am able to implement them.
Perhaps there is more however these are things I can imagine being either critical for the comfortable usage of the app or easy or moderate to implement. |
Thanks a lot, both for this change and the suggestions for further improvements! |
any idea about what would be required to make new text be read automatically in the terminal? I guess using an accessibility live region for the whole terminal view won't work, as the whole terminal would be read out, not only the new text. A hidden accessibility region containing only the new text would work, but sounds like an ugly hack. Other ideas? Maybe something linked to the accessibility node info @pvagner talked about? |
Terminal view as implemented in the termux app is a view resembling terminal windows known from computers. It's designed to be efficient however for me and other people who are using accessibility services such as Google Talkback to access their android devices it's not very usable. By adding contentDescription property to the view dynamically as it repaints, we can get at least very basic accessibility support.
When using termux on Android with Talkback running it is possible to review currently visible text on the screen by characters, by words and by lines.
It is possible to use two finger scrolling (android built-in feature) to scroll the view and access other parts of the text.
I'm using this for a few months already and I have got some friends interested in this functionality so I'm submitting this as a pull request.
I know it's very minimalistic, but even in its current limited form it's a life changing feature for tech savvy blind people so hopefully you can accept it and / or point out how I might be able to enhance it so everyone can benefit.