Commit Graph

198 Commits

Author SHA1 Message Date
0783dfb548 Add global signal-catching for better handling of cases where focus is lost. 2019-10-03 09:34:22 -05:00
0e8b6ae9e8 Use global TTS singleton to avoid passing around instances. 2019-10-02 16:20:25 -05:00
8ef356b9bb Special-case disallowing focus on bunches of nodes. 2019-09-30 15:24:02 -05:00
84857e1222 Present checkable menu items. 2019-09-30 15:15:00 -05:00
41550ceef6 When right-clicking TreeItems, set the click position to their center. 2019-09-30 14:48:11 -05:00
1faed4fee1 Speak a bit more context when switching screens, and don't pre-empt. 2019-09-30 14:28:36 -05:00
1037becadf Only prevent checkbox toggles if node is focused. 2019-09-30 09:47:42 -05:00
5bf3bb285b Set rate to maximum for now. 2019-09-30 09:46:16 -05:00
e68765165c Revert "Add group navigation."
Going to be too complicated to implement the way I wanted to for now. Need to rethink this.

This reverts commit cafd50675b.
2019-09-26 09:03:46 -05:00
cafd50675b Add group navigation.
Moving through every focusable widget by tab/shift-tab is very slow. This commit introduces the concept of groups--widgets that can be skipped through via ctrl-tab/ctrl-shift-tab.

Right now this only includes containers where all children are focusable, but I'll expand the definition of groups over time to make navingating to large areas of the UI easier..
2019-09-26 08:10:48 -05:00
49d6eb8e59 Rename check_caret_moved to be more consistent. 2019-09-26 07:52:51 -05:00
24d3ea596b Slightly better ItemList handling, though for some reason I can't make it work in file selections. 2019-09-25 17:18:01 -05:00
065f62181b Merge branch 'master' of https://gitlab.com/lightsoutgames/godot-accessibility 2019-09-25 09:18:20 -05:00
ca73c2f255 Another attempted fix for cases where focus is unset and nothing can be done.
When we unfocus, wait a second. If we don't have focus after the timer elapses, warp the mouse to the global coordinates.

This seems to restore some semblance of focus whenever it is unset, while not breaking the case where a focus is set and the mouse suddenly jumps, thus changing the focus again.
2019-09-25 09:15:49 -05:00
af1bd8ec91 Merge branch 'master' of https://gitlab.com/lightsoutgames/godot-accessibility 2019-09-25 09:12:44 -05:00
7630fa3ec0 Capture arrow input on trees so UI focus doesn't skitter off randomly. 2019-09-25 09:12:40 -05:00
636c275c7f Use create_timer rather than keeping one around only for AcceptDialog. 2019-09-25 09:07:26 -05:00
e60f5dcda1 Revert "Use queue_free rather than free."
This reverts commit 0786b6e6ab.
2019-09-25 07:31:18 -05:00
1654b3729f Use tts.singular_or_plural. 2019-09-24 18:07:22 -05:00
0786b6e6ab Use queue_free rather than free. 2019-09-24 17:36:27 -05:00
eeb8a3a171 Check for the presence of added methods so the plugin will partially work on unpatched engines. 2019-09-24 15:13:15 -05:00
d0afc9e4e3 Fix logic for right-arrowing through tree columns in light of other recent tree selection changes. 2019-09-24 14:42:46 -05:00
e82fd7f8b8 Add ScreenReader as a custom node in the editor plugin. 2019-09-24 09:20:45 -05:00
981606ab21 Refactor to support running both in the editor and in game UIs.
Here I add a `ScreenReader` `Node` which, when added to the `SceneTree`, should read the contents of any supported `Control`. I also do a bit of cleanup on filenames, as well as breaking the editor plugin support into its own class.
2019-09-24 09:01:37 -05:00
8f9a0cd4d7 TreeItem.get_next_visible(...) seems to iterate through children just fine, so use it for selecting only one item. 2019-09-21 09:47:15 -05:00
45c44352ba Fixes:
* It was the mouse warping, not the grabbing of focus, that caused keyboard traversal issues. Now we only mouse-warp prior to simulating a right-click via Menu.
 * Despite what the docs say, `id_focused` seems to pass an index, not an ID. Now popup menu items speak more accurately.
2019-09-21 09:19:00 -05:00
977b3407ea Don't automatically grab keyboard focus on mouse-enter, since that seems to interfere with keyboard traversal somehow. 2019-09-21 08:58:03 -05:00
de2f22b0c2 Only speak tab changes if tabs have focus. 2019-09-21 08:54:12 -05:00
77db176e20 For trees allowing multiple selection, force selection of a single row for now.
I'm not immediately sure how to present multiple tree selections. I also don't know if I can control selection status from the input events. So, for the time being, we force a single row to be selected. This isn't the most ideal solution, but it makes debugging other issues easier, so I'll use it for now to unblock other work.
2019-09-20 10:28:17 -05:00
f11edefdb5 Speak classes of controls for which we don't have a handler, and minor naming cleanup. 2019-09-20 08:55:47 -05:00
56a7652656 Assorted changes:
* Use new TTS.gd script rather than loading directly. TTS.gd gives us flexibility to handle TTS with the native Rust plugin on some platforms, something like a Java module under Android, etc.
 * Make `Panel` focusable. This handles the case where exiting a game from the editor places focus on an element without focus, thus breaking keyboard navigation.
 * Log when we attempt to grab focus so I can debug cases where focus tries to go somewhere it can't.
2019-09-17 10:42:58 -05:00
40cb92d39b Merge branch 'master' of https://gitlab.com/lightsoutgames/godot-accessibility 2019-09-13 09:32:51 -05:00
2ca275d7fe Name consistency fix. 2019-09-13 09:32:39 -05:00
d481e74261 Clean up node presentation.
* Concatenate tokens then join them, rather than building up strings token by token and conditionally presenting them.
 * Present `hint_tooltip` in lieu of text in some cases, and don't present it again afterwards.
2019-09-09 21:36:09 -05:00
11a8dc7aa2 Add _Menu_ as keyboard shortcut to perform right-click. Also, clean up PopupMenu presentation to speak shortcut names. 2019-09-09 20:58:24 -05:00
d42d913f29 Remove sample game and refactor plugin for use in separate games. The standalone game will probably be refactored to an accessible starter game. 2019-09-09 14:53:44 -05:00
fc985bfd93 Better presentation of checkboxes. 2019-09-09 14:45:44 -05:00
421dcbcf42 Check node tree ancestry, rather than superclass ancestry, to associate an EditorProperty with its label. 2019-09-09 14:44:10 -05:00
1f5a6a878f Add better CheckBox handling, and comment out notification print debugging. 2019-09-09 08:35:05 -05:00
355b25b10a Add support for speaking collapsed/expanded status of EditorInspectorSection. 2019-09-07 12:50:01 -05:00
2ee04f5978 Minor changes.
* Reference godot-tts addon via `res://addons/godot-tts`.
 * Add notification handler to eventually trap window close, doesn't currently seem to work.
2019-09-07 12:26:50 -05:00
51a6f1410f Speak tab changes via tab_changed signal. 2019-09-05 09:16:25 -05:00
744e2727db Enough changes to launch a basic game!
* Add an action to autoclose the dialog for setting keybindings after 5 seconds, thus allowing capturing keys to attach to actions.
 * Remove "Hello, world." from global script and move it into player.
 * Add commands to speak coordinates, headings, and to stop speech.
 * Add Quit command.
 * Announce new screen on change.
 * Other minor cleanups.
2019-09-05 09:01:20 -05:00
8acbab94df Remove extraneous prints. 2019-09-04 13:17:05 -05:00
c6f53c79ee Various additions:
* Added method to simulate left mouse-clicks for items with no keyboard accessibility.
 * Add ability to expand `EditorInspectorSection` to get at the properties contained therein via simulated mouse-click.
 * Added method for selecting tree columns.
 * Added mechanism to switch between buttons in columns using Home/End.
 * Use custom `TreeItem.get_button_tooltip(...)` getter to retrieve tooltips for buttons in columns.
 * Send correct signal when button is pressed.
 * Other minor improvements.
2019-09-04 11:32:41 -05:00
44dc4cd43a Prevent left/right arrows from working on most nodes since that is confusing from an a11y perspective. Also add basic logic for detecting toolbars/menubars. 2019-09-03 20:27:31 -05:00
5ee1abe1bb Move focus check into separate method. 2019-09-03 17:43:20 -05:00
fc80b9f345 Basic support for multi-column trees. 2019-09-03 17:22:02 -05:00
1cbc59aa6f Clean up code such that control names and their backing implementations are easier to associate. 2019-09-03 16:45:46 -05:00
aa93b0e294 Use cell_selected rather than my previous hack. 2019-09-03 16:33:02 -05:00