Commit Graph

211 Commits

Author SHA1 Message Date
783fcf3a3c If an AcceptDialog has a label child and no dialog text, speak the label as if it were text. 2020-12-10 13:19:45 -06:00
6c494a0216 Remove unused group. 2020-11-09 12:13:45 -06:00
535336eca5 Assign a node name for easier debugging. 2020-11-09 12:13:07 -06:00
d6d9ff32e2 Eliminate ext check for some nodes where we want to guess a label but which have this property (I.e. LineEdit/TextEdit.) 2020-11-09 11:39:36 -06:00
0d00db483d This algorithm still needs work, but start by calling methods that actually exist. 2020-11-09 11:04:09 -06:00
4ce013787c Handle simple case of labels being in dialogs. 2020-11-09 10:50:52 -06:00
07c21921b7 If nodes have a non-empty ext property, don't guess a label. 2020-11-09 10:46:16 -06:00
fee1bc2b91 Minor cleanup.
* Reformat.
* Prepend some method names with `_`. GDScript convention is that private methods begin with `_`, and I'm slowly changing them over time.
* Speak that the user is focused on a button, not a texture button. That the button is a texture button is an implementation detail, and shouldn't change how they accessibly interact with or perceive it.
2020-09-11 10:44:24 -05:00
0a44f1397c
Merge pull request #4 from thgcode/button-fix
Fix texture buttons and some tool buttons not reading properly.
2020-09-11 10:36:15 -05:00
Thiago Seus
9cf47e58f5 Fix texture buttons and some tool buttons not reading properly. 2020-09-05 14:40:44 -03:00
eef67a583c Fix another instance of TTS rate set to 50 pseudo-percent rather than the normal rate. 2020-09-02 09:19:43 -05:00
348ac32314 Only stop speech on button_down. 2020-08-27 14:07:01 -05:00
6ecd8fa32e Stop TTS on button presses. 2020-08-27 13:12:12 -05:00
54c01c5381 Allow a global override to determine if the next focus event should interrupt speech.
There seem to be a small handful of cases where we want this--controls that gain focus immediately after a dialog appears, for instance. We allow these edge cases to indicate that the next focus shouldn't stop speech, then clear it on cases where speech isn't stopped. This is a bit hacky, but seems cleaner than anything else I came up with.
2020-08-10 13:26:57 -05:00
c218d18090 Revert "Focus and dialog presentation tweaks."
This causes scrolling through trees, lists, and just about everything else where focus doesn't change to a new widget to fail. Clearly another solution is needed.

This reverts commit c459a35f0d.
2020-08-10 12:39:53 -05:00
c459a35f0d Focus and dialog presentation tweaks.
* Remove indiscriminant speech stop on focus events.
* Only stop speech on input events that are keypresses.
* Don't interrupt speech when a dialog is presented.

Now dialogs present in their entirety without having their labels explicitly focused. This allows for Godot's default behavior, where the _OK_ button is automatically focused when the dialog appears, to speak the dialog text and the button as a screen reader user would expect.
2020-08-10 12:12:12 -05:00
6beeaa01bd 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.
2020-07-22 12:13:19 -05:00
d522da8fc0 Remove unnecessary signal connected to nonexistent method. 2020-07-16 09:55:06 -05:00
ccc79c93f6 Begin moving more functionality from ScreenReader/Accessible into the editor plugin. 2020-06-16 18:03:13 -05:00
76d1926385 Remove unnecessary code to set an initial scene focus. 2020-06-16 17:55:52 -05:00
8f110a27d3 Label improvements, plus trimming.
* Labels themselves don't have labels, so `guess_label()` on a `Label` returns null.
* Remove unused `is_in_bar()` function.
* Prepend `_` to more private function names.
2020-06-16 11:54:49 -05:00
3cbcfa8f40
Merge pull request #1 from follower/patch-1
Fix-ups of Markdown list formatting. Add syntax highlighting. Typo fix.
2020-06-16 09:14:29 -05:00
follower
5aaa252f60
Enable syntax highlighting of .ini file snippets
Figured I might as well while I'm here. :)

Do screen readers make use of syntax highlighting in a context like this?
2020-06-16 22:16:13 +12:00
follower
ab87ab6ef4
Fix-up of Markdown formatting for item 4
Add required indent spaces to content of item 4 in order to get all the item's content to be aligned correctly.
2020-06-16 22:11:50 +12:00
follower
b70de2d97f
Fix-up of Markdown formatting for items 1-3
Add necessary blank lines between items (even though they still displayed correctly).

Add additional indent spaces to ensure that "fenced" code blocks (both the back-tick open/close markers & the actual content ) are indented correctly in order to appear aligned with the rest of the item.
2020-06-16 22:07:56 +12:00
follower
7f47af8177
Fix-up of Markdown formatting
This change ensures that the items numbered 5, 6 & 7 appear as individual paragraphs with a list number instead of being run together in a single paragraph. The change inserts an extra blank line between list items which ensures their correct formatting.

However, the last sentence of item 4 is now indented incorrectly (it currently has no indent) but it was getting too complicated to figure out how to get all the content of item 4 indented correctly while also fixing the remaining items so decided to split the tasks.
2020-06-16 22:00:49 +12:00
follower
a6afc88209
Typo fix: "ar" -> "are" 2020-06-16 21:50:43 +12:00
a8f7adaeee Add support for CheckButton, improve CheckBox support, and other minor tweaks. 2020-06-15 15:58:45 -05:00
d2f2145f17 Remove spammy print. 2020-06-11 13:24:56 -05:00
a24255e3c4 Move focus loss prevention code from ScreenReader to Plugin.
That behavior is only specific to the editor. Any game UI that loses focus should be fixed by intelligently setting focus, not by magic in the accessibility addon.
2020-06-10 11:45:32 -05:00
ce4b9c94f2 Fix null comparison. 2020-06-09 14:30:08 -05:00
ce8d429336 Fix regression where actions not being faked via keyboard didn't work. 2020-06-09 13:45:00 -05:00
10a080ab99 Speak expanded/collapsed state of TreeItem immediately after its name. 2020-06-09 13:27:53 -05:00
8ee1c05512 Add basic touchscreen support for sliders. 2020-06-09 13:23:58 -05:00
5852285dd4 Ensure screen reader always runs, even when game is paused. 2020-06-08 10:45:38 -05:00
548199d647 Significant improvements to tree-handling.
* Don't manipulate selection in any way. Leave that to Godot, and I'll fix issues in the engine if needed.
* Unify speech rendering of tree rows. This results in more useful announcements of buttons and such when tree items receive focus.
* Only handle `ui_up` and `ui_down` to ensure that focus won't leave a tree when the top-most or bottom-most row is arrowed past.
* Add a bit of handling to strip out duplicate collapse/focus events generated by the remote `SceneTree` in an active game.
2020-06-06 12:05:59 -05:00
123e475fed Update section in README about focus loss. 2020-06-05 15:16:30 -05:00
3a160df5fd Remove code that no longer seems necessary for restoring focus in the editor when lost. 2020-06-05 15:14:04 -05:00
d7b4744c6a Switch focus mode toggle to shift+escape to avoid conflict with Windows. 2020-05-29 11:07:56 -05:00
229353b37f Try to support disabling the screen reader by deleting all Accessibles. 2020-05-28 13:21:31 -05:00
2da7fcff9d Correctly handle case where EditorInspectorSection child isn't expandable. 2020-05-28 13:13:39 -05:00
dd9877557e Enable focus mode use by default in the editor. 2020-05-28 13:13:06 -05:00
95bbbff780 Unify event generation to support both simple and keyfake strategies, using the latter on Android where necessary. 2020-05-28 13:00:42 -05:00
4281e3777d Standardize focus mode on _press_and_release until input event generation is cleaned up. 2020-05-28 11:25:21 -05:00
d7040c25bf Add focus/UI modes and clean up event generation.
UI controls occasionally trap focus and make navigation impossible. Now, Ctrl+escape toggles a mode that attempts to intercept and generate UI focus events and bypass the control's own handling. This can probably be refined, but for now it allows escaping of `TextEdit` via tab. It also won't work everywhere--inn particular, arrowing around still traps focus in trees. But it is at least possible to tab out of most traps.

Further, event generation was cleaned up some. We specifically need to generate `KeyEvents` under Android because, IIRC, it wasn't enough to simply create and send some types of events. We now have two distinct generation strategies. These can probably be combined and streamlined, but for now this works.
2020-05-28 10:58:36 -05:00
9e2e99349c Reformat. 2020-05-19 12:03:59 -05:00
6279f1a3c9 Replace a couple print calls with print_debug. 2020-05-17 18:18:18 -05:00
d2e6b34c42 Add Windows-only steps for using screen reader-based Tolk in the editor. 2020-05-14 11:30:47 -05:00
08ad3db74c s/gitlab/github/g 2020-05-05 08:01:12 -05:00
2463eced93 Fix fail-fast condition that prevented single character text fields from speaking. 2020-04-15 12:32:22 -05:00