-
I'm hoping to get started integrating this into a C++ immediate-mode UI framework (either TGUI or Elements, though TGUI might be the one I go with just because it has more event coverage). However, I'm no expert in accessibility myself, though I'm doing my best to learn, but I find the C example a bit confusing. Either immediate-mode UI is backend-agnostic; TGUI supports GLFW, SDL, and SFML, and elements is entirely agnostic to the backend being used. So what I'm trying to ask is: what is the process for integrating AccessKit into a UI library like this? I understand that AccessKit's implementations aren't perfect, but it would be great if I could figure this out and then just wait for AccessKit to catch up. As an aside, I know that I could just "hook" the widgets (e.g. create an AccessibleButton class or what not) in a consumer application, but this seems counterintuitive and error-prone, particularly since it would then be up to me to keep up with the development of the libraries if their APIs change in a breaking way. Plus, the README says that documentation is needed, so I thought to ask this to kick off that process so people have at least something to go off of when integrating this into a UI library with the C API. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @ethindp, To answer your question about windowing providers: AccessKit can't quite be agnostic as none of the currently available libraries expose an API to properly install an accessibility provider. What is required also depends on the platform. Our example shows how to do this with SDL2, but the process will be very similar for SFML and GLFW:
Please refer to the latest version of Since The C function names can help you navigate the Rust documentation: |
Beta Was this translation helpful? Give feedback.
-
@DataTriny Thank you very much for your response! |
Beta Was this translation helpful? Give feedback.
Hello @ethindp,
To answer your question about windowing providers: AccessKit can't quite be agnostic as none of the currently available libraries expose an API to properly install an accessibility provider. What is required also depends on the platform. Our example shows how to do this with SDL2, but the process will be very similar for SFML and GLFW:
accesskit_macos_add_focus_forwarder_to_window_class
, unfortunately you will have to read the source code of the windowing library to find out if you need this, and if yes, find what is the class name