Skip to content
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

Implement screen reader support using AccessKit library. #76829

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented May 8, 2023

Initial implementation of the AccessKit integration use C-API:

All base (non-editor) controls except GraphEditor should work now. UI behavior without active screen reader should be unchanged. When screen reader is running, some controls that normally do not can accept keyboard focus (Label, RTL, TabBar) and extra keyboard actions (switching tabs, selecting RTL paragraph and embedded images/tables, selecting embedded TreeItem buttons).

Additionally, provides access to some accessibility related OS settings (high contrast, reduce animation, reduce transparency and screen reader status)

Screen recordings (updated)
2023-06-02.13-13-41.mp4

Expects accesskit_sdk_path command line argument or environment variable with the path to the pre-build AccessKit-C 0.10.1 folder.

Supersede #72886
Fixes #58074
Implements godotengine/godot-proposals#983 (partial)
Implements godotengine/godot-proposals#1964

@Ali-Bueno
Copy link

Ali-Bueno commented May 6, 2024

Hello. Would be possible for the future make context menus (like the menu bar) readable for screen readers? currently it only announces menu bar and it reads nothing, and that was possible with the old godot 3.2 with nolan's plugin. If yes, that would be very great, as with this current version, almost all is readable, but to start to messing with this as I did before with nolan's plugins, we need that the context menus become accessible/readable. thanks much!

@paulGeoghegan
Copy link

Hi, just wondering what the progress is like on this PR? Is there any way I could perhaps help contribute or help?

@bruvzg
Copy link
Member Author

bruvzg commented May 22, 2024

Hi, just wondering what the progress is like on this PR?

What's implemented:

  • Support for all main GUI controls and for adding accessibility features to the custom nodes.

What's not implement:

  • Accessibility for the Godot editor (some support for the project manager is implemented, but not for the rest of the editor). There's no specific plans for it, a lot of editor parts use custom controls, and it's not fully controllable by keyboard only. This definitely won't be done it this PR.

Everything need to be tested, but since 4.3 is close to beta feature freeze and this is a lot of changes, it will be done probably done for 4.4 as soon as 4.3 is released.

@paulGeoghegan
Copy link

What's not implement:

* Accessibility for the Godot editor (some support for the project manager is implemented, but not for the rest of the editor). There's no specific plans for it, a lot of editor parts use custom controls, and it's not fully controllable by keyboard only. This definitely won't be done it this PR.

Okay well can you work around that by using vs code as your script editor?
Again I'm wondering if there is any way I can help or contribute?

@cyrmax
Copy link

cyrmax commented Jun 6, 2024

Hello!
Thanks a lot for this work! Unfortunately I cannot build this PR from source at current time but I have listened to the recording in the first message and for me as a blind developer who wants to work with Godot this sounds promising.

I will write my thoughts about what I personally expect from the editor and maybe that could help.

First of all, most of blind developers write code in some already accessible IDEs or code editors like VS Code. So I guess there is no need to implement the full code writing support.
But the ability to view build errors I think is steel should be accessible.

All graphic-related stuff, such 2D and 3D canvas and drawing is not needed for a blind person because we actually cannot draw anything and implementing some kind of audible drawing is a huge problem and since the first attempt in 2008 nobody achieved any valuable result in this.

What we really really need is a project manager accessibility and I guess creating and editing scenes and nodes, because doing so entirely from text files can be a tough task.

Also if some kind of plugin manager or other project settings window exists we also need an accessibility of it.

As for games, not for an editor, maybe sighted developers would need some easier accessibility features but I guess blind developers will still implement their own screen reading logic in audio games. We already used to it and it is relatively comfortable for us to implement such things in every game. We already have several speech output libraries in C which help our games to communicate with any installed screen reader, from NVDA and JAWS to SAPI voices on Windows, speech-dispatcher on Linux and VoiceOver or NSSpeechSynthesizer on MacOS and other apple systems.

@Stealcase
Copy link

Kudos to you for the amazing work you've done on this, and it genuinely seems like the holistic approach we need in tackling the whole engine and making both the editor and Game UI accessible to screen readers that I have been hoping for years would come to Godot.

The FocusMode enum expansion for "FOCUS_ACCESSIBILITY" is a good, the choice of using NOTIFICATION_ACCESSIBILITY_UPDATE in the _notifcation() seems like a great idea and aligns with the existing architecture.

The only thing so far that raised my eyebrows was the change in String:utf8, but this is still a Draft and I'm not even sure if this will stay in the final pr (I am am an amateur in C++, I know just enough to read it).

Please let me know if there's anything I can do to help move this forward. I run Windows 10 and Fedora 40 with Gnome + Wayland and could do some testing on those platforms.

@zaddok
Copy link

zaddok commented Aug 30, 2024

I have one person asking for my app to be made
More accessible. My main problem is enabling focussing on labels and rich text fields but only when accessibility is needed. It seems like this FOCUS_ACCESSIBILITY gets me at least half way there to being able to hack something up. What is needed to get this over the line at this point?

@s1lv3rdr4g0ngames
Copy link

Any updates on this? I want to make my game narrator compatible, but I have no clue what I would need to roll my own system and docs online are not helping. Is the May commit stable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Godot doesn't work with screen readers