PySolFC icon indicating copy to clipboard operation
PySolFC copied to clipboard

Feature request: add accessibility support for Android version

Open germanico5 opened this issue 8 months ago • 4 comments

Greetings. Following the work proposed in issue #427, I’d like to suggest extending accessibility to the Android version of the game. Of course, due to the platform, the approach will differ from that used on Windows, but I believe there’s a feasible starting point we can build on. Some points to consider:

  • Android provides built-in accessibility through its TalkBack screen reader, which interacts best with native Android UI elements. Custom-drawn interfaces, like the current ones used in parts of PySol, are not readable by screen readers.
  • To address this, I suggest refactoring the app to use Android’s native Views (TextView, Button, etc.) for text-based screens. These would be implemented inside Fragments, improving both structure and compatibility. The gameplay screen may still require custom Canvas rendering, but can be embedded inside a Fragment for consistency with the new architecture.
  • This change enables screen readers like TalkBack to access menus, options, and possibly even gameplay metadata (e.g. selected cards or status updates), greatly improving usability for blind users. Although this approach is not trivial, it is proven and effective for enabling accessibility on Android without sacrificing the game's original mechanics. @lufebe16 @joeraz — I’m not sure if this is the right way to mention you, but I was told you might help. If you’re curious about accessibility or need more context, feel free to read my first issue or just ask me. I’m not a programmer, but I’ll support however I can. Thanks for considering this!

germanico5 avatar Apr 22 '25 07:04 germanico5

The Android app is built with the Python framework Kivy. This made it possible to bring unmodified Python code to Android. Integrating native Android views is not conceivable.

A quick search of the Kivy project reveals a better approach. Here, too, the topic of accessibility is current. I read that the integration of Android Talkback is planned for version 3.0.0 of Kivy. If I interpret this correctly, version 3.0.0 is expected in Q4 2025. (-> https://github.com/kivy/kivy/milestone/36).

Under these circumstances, I think it makes sense to wait for the new Kivy version. This way, the implementation of accessibility features can be combined with the adaptations to the new version.

lufebe16 avatar Apr 22 '25 11:04 lufebe16

How lucky! That will be much simpler than what I had proposed. Like I said, I'm not a programmer, but I didn’t want to come empty-handed. I hope to hear from you when the new version comes out — it would be fantastic to be able to play all those games on Android. Thank you so much!

germanico5 avatar Apr 22 '25 12:04 germanico5

Makes sense. That would also give me time to get the current logic merged and refined first.

joeraz avatar Apr 23 '25 01:04 joeraz

I am pushing a release this weekend. The speech code is in the speech.py file I added, so if an additional speechClass is created here for Android, and the speechClass is selected based on the environment, we should be able to wire the existing speech logic into the Android version.

Though I'd imagine some new speech messages would be needed, and we'd need to rework how some of them are displayed.

joeraz avatar Jun 13 '25 18:06 joeraz