Repository navigation
Conversation
…as found by the TextBoundaries functions
… focus with tab, the arrow keys move between them
…ge down, home and end
… signals that inform assistive technology about changes
…to assistive technology
…ing system and wait for messages while idle
ethindp
force-pushed
the
feature/uia-accessibility
branch
from
November 23, 2026 02:15
71b171c to
ed928e2
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my initial implementation of UIA accessibility for Tgui. So far we have the basic controls working, as well as when UIs are created or destroyed functioning properly, which required some very odd WinEvent hacks to make work.
Along the way, I had to make some other changes (some of which were admittedly me being nitpicky about behavior). If you want me to revert any of this, let me know. Those changes are:
Tabs andVerticalTabs now have full keyboard support.Sliders also now have full keyboard support. If the direction is inverted, keyboard support follows.mainLoopnow waits withMsgWaitForMultipleObjectsExon Windows instead of sleeping, at least for the SFML backend, which was a bit of a performance win. This is done viaBackendGui::waitForEvents. All of the other backends already do this. Other platforms still sleep like they did before. I did this so that accessibility messages could be reacted to as quickly as possible to make sure the UI didn't feel overly laggy.And new APIs/signals for widgets, primarily added for accessibility but any app can take advantage:
getSelectionStart,getSelectionEndandgetCharacterPosition(index).TextArea:getCharacterPosition(index)andgetLineStartIndex(lineIndex).onVisibilityChange,onEnabledChangeandonChildrenChange.I've tested this with example programs and the TGUI examples. Many of the widgets, link label included, still remain inaccessible; I'll tackel these in a follow-up PR once we get this merged.
Many of the hacks I unfortunately had to do were due to constraints with Windows accessibility frameworks. These were the only way I could get the frameworks to behave reliably, since they weren't exactly built for this kind of UI, but can be persuaded if you try hard enough.