-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redirect "ui_accept" input for specific
Tree
edge cases.
Trees appear to eat "ui_accept" before `gui_input` receives it. This makes certain use cases--triggering buttons in cells--impossible via the keyboard. Here, `ScreenReader` attempts to intercept recent presses of "ui_accept" and, if a button in a cell should receive focus, redirects the `InputEvent` to the custom handler for `Tree`. Unfortunately, this loses the ability to click buttons in cells in the editor's node tree for some reason. It restores, or maybe gets working in the first place, clicking on the _Remove_ button in the input mapping screen. Not sure how to restore the former functionality--these trees are complex and not well-documented.
- Loading branch information
Showing
2 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
6beeaa0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as an FYI, Godot's Tree is currently quite broken with regard to keyboard support due to a number of issues introduced when it was moved from direct keyboard input to action-based input.
I had to write a wrapper to workaround some of the issues for a project I'm working on.
I'm partway through writing up an issue describing all the issues I encountered but...it's currently disappeared in all the tabs I currently have open. :)
6beeaa0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Added an issue here: godotengine/godot#41014 with a supporting comment here: godotengine/godot#36291 (comment)
6beeaa0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, any chance your wrapper is easy to extract and share?
I'm vaguely thinking of some sort of accessibility/audio-related utility pack separate from this plugin, and separate from but used by the accessible starter template. Candidates for inclusion are my audio hack to use 3-D audio streams in 2-D, helpers for automatically stopping speech under certain conditions, etc. Not all of them would need to be used in a given project, but they'd be general patterns for making accessible games that aren't necessarily universal but are still common.
Anyhow, a more accessible
Tree
wrapper would be amazing, as that widget has been the bane of my existence since I started trying to work with it. Future titles I'm planning would make heavy use of trees, and having them actually work as intended would be key to that. :)And thanks for filing that issue. Diagnosing tree issues is hard when you can't actually see what they do visually and how that reflects in the data they expose.
6beeaa0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had done a quick copy paste of the code and put it in this follow-up comment but I wasn't sure if the screen reader software you use works with the "disclosure triangle": godotengine/godot#41014 (comment)
So have just pasted into the following new issue for you, in case it's helpful: #2
It took a lot of time to figure out the Tree control issues even with being able to see what they were doing visually, so I imagine it was incredibly frustrating without!
How about we move further Tree control-related discussion to: #2
Lol, indeed. :)
BTW there was a discussion on Hacker News the other day about "Making Advanced GUI Applications with Godot" where the lack of accessibility was brought up, I mentioned this project in a couple of comments and you might find the thread interesting to read/comment in. (Or, I guess, given some of the comments, frustrating. :/ )
Some weeks ago I actually started writing up a more general discussion issue when I first discovered this project in relation to some of the things you mentioned in the README, so I think I'll quickly paste what I started in another new issue & maybe we can continue wider discussion there.