-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Accessibility for Blind Developers Who Use Screenreaders #14011
Comments
This would definitely be a welcome improvement, but I can already say that it will likely take a while to get implemented, if at all. Godot's editor uses its own GUI toolkit, which is the same used in games, and is fully independent from the native toolkits or cross-platform ones such as Qt or GTK+, which would have good screen reader support. So to get this to work in Godot, it would have to be implemented from scratch in the core Controls. I don't know how hard this is, but probably non trivial. |
I have actually thought about this but I don't even know where to start. Godot editor is very visual, you do pretty much everything with the mouse. We would need a person with visual impairment to give us consulting about this and guide us in this task, advising us with what is actually needed and how it should behave. Without an actual user to provide feedback, it's mostly a game of guessing to implement that. |
I would be happy to guide you guys in adding this. I'm blind myself. :) At least, I could refer you guys to frameworks (MSAA and UIA come to mind as possibilities, though UIA is preferable to me at least, since NVDA (https://github.com/nvaccess/nvda) (an open source screen reader) uses it) and beta test it as you guys go. In the meantime, is there an alternative godot editor or method of creating the game by hand, without the editor? |
If this feature is implemented in the core of the engine itself then it would be possible to developeprs to make apps for blind people, not only allow blind developpers to work. |
I'm glad to see this is being looked at and the only thing I have to add about this is that screen reader software is also use by people who have learning disabilities/difficulties such as dyslexia. As much as I hate the way these things sometimes leave people out, I think it could be argued that this broadens the case for such a development. NV Access (NVDA) would be a good first place to contact as both lead developers are blind and so have a proper insight into what's necessary. Maybe a collaborative effort? |
Hi, I think that this will be a huge effort. That can be done but considering native accessibility protocols an implementation made from scratch can be very problematic for users of all platforms. If you plan to go forward with this, I recommend to you to use the QT model, an abstract accessibility event layer on top of the basic UI controls first and a platform dependent implementation. Another approach is to use Text To Speech directly. This can be more platform-independent and so much easy to work on. There are some problems with this, too, but they are more related to the engine than the runtime environment. Hope this can help you deside. Cheers, |
Such a model would work too, if contacting the low-level accessibility
APIs failed in some way. I 100 percent agree that NVAccess would be
your best bet for getting the highest level of accessibility in. :)
…On 5/18/18, Francisco R. Del Roio ***@***.***> wrote:
Hi,
I think that this will be a huge effort. That can be done but considering
native accessibility protocols an implementation made from scratch can be
very problematic for users of all platforms.
If you plan to go forward with this, I recommend to you to use the QT model,
an abstract accessibility event layer on top of the basic UI controls first
and a platform dependent implementation.
Another approach is to use Text To Speech directly. This can be more
platform-independent and so much easy to work on. There are some problems
with this, too, but they are more related to the engine than the runtime
environment.
Hope this can help you deside.
Cheers,
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#14011 (comment)
--
Signed,
Ethin D. Probst
|
As a partial solution, are there any docs, or even places to look, to implement a game by hand without using the editor? I've seen the command line docs, but I'm wondering if it's even practical/remotely enjoyable to work with the scene graphs and such by hand, thus completely eliminating the need for the editor. As a more practical example, right now I'm implementing an audio-based Asteroids-like game. Asteroids emit sounds to mark their positions, and the player centers them in the audio field by turning/flying around. I don't particularly care about the visuals, but they'd be useful for debugging purposes so I can ask sighted folks if, say, my mental concept of my ship's orientation matches with the crude cylinders/spheres I'm using for debugging/collision detection. I'm wondering if it's even remotely possible to position a 5-unit-diameter sphere at 0,0, randomly position and move a bunch of 25-unit-diameter spheres, implement wrapping behavior, etc. by hand-coding it all without the need of the Godot editor. Or will it be a mess of editing non-human-friendly XML? At the moment I am doing this more or less by hand in Rust with an ECS. That's not terrible, but I do wonder if I gain anything by leveraging an actual game engine. Ideally the Asteroids thing is just a proof-of-concept, and I'd eventually like to make richer audio games without having to build all this stuff up by hand. Whether Godot is that solution, I don't know... Either way, I do think that implementing a full accessibiity interface to the UI toolkit is probably a bit much to ask. If the data files are mostly text but human-unfriendly, a middle-ground solution might be a DSL that exposes a simplified interface for the kinds of tasks I described above (positioning shape primitives, attaching sounds, adding logic to entities. etc.) |
I think the easiest way (without hacking around) would be to generate the scenes procedurally via script. You could either do that at runtime or make a script that saves the scenes and resources to disk so you can add to the project. The initial scaffolding would require a Technically, you can make a script that runs directly from the command line and that script makes the whole Godot project for you (at least I can't think of anything that would prevent that). You can then run and export the game from the command line as well. You would need to open the project in editor at least once for importing the assets (and every time the assets change) but that could be solved by running the headless version of Godot, as some people are doing for use with Continuous Integration servers.
The text resource format is not much hard to read, but still it's probably simpler to just use GDScript to create stuff for the project, since you can use the base engine for writing and reading the format (avoiding compatibility issues). Unfortunately, GDScript is not the best language for visually impaired people, since the white-space is important. I heard complains from a blind developer about Python because of this. |
Frankly, I think that the complaints about whitespace placement is
most likely (excuse my language) bitchy wining. Whitespace is
perfectly fine (I'm blind and am able to work with python very well,
as well as other whitespace-oriented languages like F# and such).
Those who complain about whitespace are usually those who are either
unenthusiastic at the thought of programming (which raises the
question of exactly why they're checking it out in the first place) or
those who haven't even tried and who are just complaining to complain.
I don't mean to be so inflammatory but it really pisses me off when I
see people complaining about that. It just makes absolutely no sense.
I've never heard of the headless version of Godot. Perhaps that could
be used to create projects and interact with the engine as well? That
might be a complete solution to our problems at the moment. Where can
I find this version? (Or is it in the Godot package?)
…On 5/24/18, George Marques ***@***.***> wrote:
> As a partial solution, are there any docs, or even places to look, to
> implement a game by hand without using the editor?
I think the easiest way (without hacking around) would be to generate the
scenes procedurally via script. You could either do that at runtime or make
a script that saves the scenes and resources to disk so you can add to the
project. The initial scaffolding would require a `project.godot` file for
the project settings (which can be an empty file made by the OS at first)
and a main scene that runs at start (which can also be set and saved via
script). Might be complex to manage, but it's possible.
Technically, you can make a script that runs directly from the command line
and that script makes the whole Godot project for you (at least I can't
think of anything that would prevent that). You can then run and export the
game from the command line as well. You would need to open the project in
editor at least once for importing the assets (and every time the assets
change) but that could be solved by running the headless version of Godot,
as some people are doing for use with Continuous Integration servers.
> If the data files are mostly text but human-unfriendly, a middle-ground
> solution might be a DSL that exposes a simplified interface for the kinds
> of tasks I described above (positioning shape primitives, attaching
> sounds, adding logic to entities. etc.)
The text resource format is not much hard to read, but still it's probably
simpler to just use GDScript to create stuff for the project, since you can
use the base engine for writing and reading the format (avoiding
compatibility issues).
Unfortunately, GDScript is not the best language for visually impaired
people, since the white-space is important. I heard complains from a blind
developer about Python because of this.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#14011 (comment)
--
Signed,
Ethin D. Probst
|
@ethindp I won't argue about what is or isn't, since I'm not blind myself, but I'll ask you to tone down. People have different backgrounds and might have proper reasons to find it hard to work, while you learned to work with it. The person I know works as a developer for a living, I find hard to believe he "didn't try hard enough" (it's still second-hand for me though, so I won't argue about that).
It is called the I'm not sure how much you can interact with it, likely you can't do it manually. Still, it can be used to run scripts and importing assets, so it's possible to make a project with it if you do everything with scripts (at least in theory). |
I'll echo what @ethindp says in that indentation shouldn't be an issue. Most modern screen readers have settings to speak indentation automatically (I.e. "8 spaces def hello_world():`, and I know lots of prolyphic blind Python developers. I wonder if there's even another middle-ground solution--a line-oriented command line tool that can manipulate the scene graph in real-time, drive another instance, and let you save its output. I'm thinking of an interaction style like: $ godot-shell mygame.godot
Welcome to the Godot shell.
> new entity
Entity created with ID 0.
> add component 0 position
Component "position" added with ID 0.0.
> set component 0.0 [0, 0]
Component 0.0 set.
> save
Scene graph saved.
> I'm then imagining a separate instance running in another window, displaying whatever the engine is currently outputting, playing sounds, etc. Other commands might spawn a GUI text editor to edit scripts. Would this kind of workflow make sense if the aim is to create a more simplistic game? I.e. I don't really care what my player/world models look like, beyond them being simple shapes so I can mentally model them, attach sounds, then have a collision detection system that makes some sort of sense. I also think a CLI is a bit easier to prototype and experiment with than is a full-blown DSL. I may start hacking on this if folks who know more than I do about Godot think it's viable. Been looking for a good CLI interface problem to sink my teeth into, and have a few Rust libraries I'd like to put through their paces. Is the file/data format documented anywhere? |
@george Marques, I apologize for my rude behavior... just letting that
off my chest. Because it really pisses me off and seems like wining
more than an actual truth, you know?
@nolan Darilek, your idea may have merit; would it be possible to code
an alternative UI interface, perhaps using something like WXWidgets?
If we used WX, it would solve all our accessibility issues in one go.
(Personally, I've never fully managed to figure out WX.... looked way
too complex for me.... heh :)).
…On 5/25/18, Nolan Darilek ***@***.***> wrote:
I'll echo what @ethindp says in that indentation shouldn't be an issue. Most
modern screen readers have settings to speak indentation automatically (I.e.
"8 spaces def hello_world():`, and I know lots of prolyphic blind Python
developers.
I wonder if there's even another middle-ground solution--a line-oriented
command line tool that can manipulate the scene graph in real-time, drive
another instance, and let you save its output. I'm thinking of an
interaction style like:
```bash
$ godot-shell mygame.godot
Welcome to the Godot shell.
> new entity
Entity created with ID 0.
> add component 0 position
Component "position" added with ID 0.0.
> set component 0.0 [0, 0]
Component 0.0 set.
> save
Scene graph saved.
>
```
I'm then imagining a separate instance running in another window, displaying
whatever the engine is currently outputting, playing sounds, etc. Other
commands might spawn a GUI text editor to edit scripts.
Would this kind of workflow make sense if the aim is to create a more
simplistic game? I.e. I don't really care what my player/world models look
like, beyond them being simple shapes so I can mentally model them, attach
sounds, then have a collision detection system that makes some sort of
sense. I also think a CLI is a bit easier to prototype and experiment with
than is a full-blown DSL.
I may start hacking on this if folks who know more than I do about Godot
think it's viable. Been looking for a good CLI interface problem to sink my
teeth into, and have a few Rust libraries I'd like to put through their
paces. Is the file/data format documented anywhere?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14011 (comment)
--
Signed,
Ethin D. Probst
|
Likewise re: WX. If I was going to do a GUI, I'd probably go with GTK
since I'm on Linux, but I've never sat down to learn GTK or WX, and that
would seem like one too many variables to play with here.
I think I'd initially start with a CLI that can start/stop a rendering
Godot process and drive this headless version. If I did this in Rust,
I'd probably build a struct and serde implementation to a subset of the
format that the interface would support. With that as a starting point,
it should be easy to build a GUI later or in parallel.
|
That would work, yes; but how exactly are you going to do this in
rust? I think rust would be perfect for this, but from what I've seen,
the engine editor at least is written in C++. Actually, it seems the
core is, too. So, since (according to
https://doc.rust-lang.org/beta/nomicon/ffi.html) Rust can't interface
with C++, we'd need to create a C interface. That in itself would be
an absolute nightmare. :)
…On 5/25/18, Nolan Darilek ***@***.***> wrote:
Likewise re: WX. If I was going to do a GUI, I'd probably go with GTK
since I'm on Linux, but I've never sat down to learn GTK or WX, and that
would seem like one too many variables to play with here.
I think I'd initially start with a CLI that can start/stop a rendering
Godot process and drive this headless version. If I did this in Rust,
I'd probably build a struct and serde implementation to a subset of the
format that the interface would support. With that as a starting point,
it should be easy to build a GUI later or in parallel.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14011 (comment)
--
Signed,
Ethin D. Probst
|
I was thinking of editing the files directly, which seems more doable if
you expose a more limited interface that grows over time (I.e. initially
only expose basic shapes, rigid bodies, sounds, etc. then add more over
time.) I'm looking at the format and it appears to be mostly INI, I.e.:
```
[node name="WallContainer" type="Node" parent="." index="0"]
editor/display_folded = true
```
Although I didn't know section names could be quite that free-form. :) I
guess there's nothing in the INI spec, such that it is, to prevent that.
So as an MVP I'd want:
* Rigid dynamic/static 2-D bodies for collision detection and motion
* A few basic shape primitives to mentally model the bodies, and
represent them on-screen for visual feedback. Cylinders for characters,
spheres, and some sort of blocky polygon for walls/grounds should be
enough for now.
* Spatial audio
* Non-spatial audio for music/UI sounds
* Access to scripts, and the ability to add scripted behaviors to any
of the above that support it
I don't want to call that a *small* feat, but if I could figure out the
nodes needed to implement that featureset, then create a text user
interface for building that structure and then calling into the Godot
tooling for export/rendering, we might be onto something. There are lots
of node types, but if those are documented in any sort of
machine-readable way, it might be possible to eventually tap some sort
of Rust code generator or write a macro to replicate the same UI en
mass...but it's best to figure out what that UI looks like before
reaching for a macro to autogenerate it. :)
If I'm right about everything being INI-based, I might put together an
MVP PoC to see where this goes. To be clear, I'm not aiming for a
general-purpose editor use case here, just some way to build audio games
without necessarily coding the whole thing by hand, and leveraging an
actual game engine to do the cross-platform export.
But as fun as this brainstorming is, I gotta get to work and finish out
the week. I'll put up a repo sometime soon and see where it goes. I
generally prefer GitLab because of its integrated CI, but I could be
convinced to stay on GitHub if folks are opposed.
|
The file format is described (at least partially) in the documentation: http://docs.godotengine.org/en/latest/development/file_formats/tscn.html However, making a completely new tool for this is a lot of work and is bound to become obsolete quite easily. At least you should use GDNative as a bridge (which is a C interface for the C++ engine), that would give access to all information about classes and their properties. As much as I appreciate the effort, I think you first need to understand a bit what Godot has to offer, so you don't reinvent all the wheels. If you really want to do with Rust, you can try the bindings for GDNative (though I can't attest it's stability): https://github.com/GodotNativeTools/godot-rust Personally, I would try to do something with the Godot core itself (maybe as a C++ module), since you can then access all the API easily, including all the resource savers and loaders, so you don't need to worry about file formats. If you're going for a CLI interface, it should be based on arranging the scene tree, which is the most important part of any Godot game. Designing this process beforehand is probably more important: creating an easy way to understand how the tree is laid out and tools to move nodes to a specific tree position should be the cornerstone of the design. If you get that, you don't even need to limit the feature-set, since pretty much anything can be done with the tree. After that, you need a way to set properties of the individual nodes, including the resources that are used to give then a proper functionality (e.g. a CollisionShape2D node needs a Shape2D resource to give its shape). Scripts are also resources, so they can be set via this interface as well (though you might want to give them a special status). This would substitute what the Inspector is in the GUI. Also, I would make commands as close to GDScript as possible. For instance, you want to create a Sprite, you could simply do For audio, Godot uses players and buses. There are players for positional audio (both 2D and 3D) and a regular one for non-positional audio, which are all nodes in the tree as well. Surround is also supported (though I never used it). To work with the buses, you need to interact with the AudioServer, to set volume, mute or solo them, and add effects. You might be able to use the AudioBusLayout resource directly, but I'm not sure how much of it is exposed to the external API. The effects are just resources, so they can be edited by the same interface. All of this in my humble opinion, of course. I have used Godot for quite a long time now, so I might be somewhat biased. |
Hey, thanks, this is helpful. I'm not particularly wedded to messing
around with the data files directly. Happy to learn how this might
work--most of the getting started docs I encounter teach by building
games, and no one assumes you'd need to build your own tools first. :)
I haven't touched C++ in nearly 2 decades, so I'll likely stick with
Rust and deal with a less complete API or file issues if I hit any
instability. Does gdnative support reading/writing project, scene and
other files directly? Or is it meant to support writing games in C and
calling into the engine? I did a brief grep through the Rust repo for
"project" and didn't find anything. The examples seem focused on
building games directly. If you'd not mind giving me an entrypoint for
where I'd start to build a project and populate it programatically, I'll
read up on that and move further work to my own repo.
Thanks again for humoring me. :)
|
GDNative is meant to make games, essentially replacing scripts. But as I said before, you can do pretty much anything with scripts, and GDNative uses the same API. |
Hi, For scene or alike and complex objects, you can use a format like this file. In this case, it is just for a map for a project called audioquake, but it can be an example. P.D: Don't try to build this, it may not work. For GUI, you can also use QT5.11, I saw that it includes many improvements for accessibility. In this case, you will only need to add some sort of accessibility support for hard custom controls like the camera. Cheers, |
The format for audio quake maps is very limited. I personally don't like it.
…On 5/25/18, Francisco R. Del Roio ***@***.***> wrote:
Hi,
For scene or alike and complex objects, you can use a format like this
[file](https://github.com/matatk/agrip/blob/master/ldl/tut01.xml).
In this case, it is just for a map for a project called audioquake, but it
can be an example. P.D: Don't try to build this, it may not work.
For GUI, you can also use QT5.11, I saw that it includes many improvements
for accessibility. In this case, you will only need to add some sort of
accessibility support for hard custom controls like the camera.
Cheers,
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14011 (comment)
--
Signed,
Ethin D. Probst
|
Wait, I'm being an idiot. You said at the beginning of this thread that
you didn't need the editor at all, except for when importing assets. I
think it would have been more correct for me to ask if I needed the
*GUI* to create games. I'm happy running them from the GUI, I just want
to develop them on the console. And it looks like I can.
So I guess what I want is a "Godot from scratch" series that assumes you
can't/don't want to use the editor, similar to how you'd go about
writing a game with pygame or another high-level library. I imagine once
I've figured out how to create a .project file that just launches a
script, and maybe a script that just opens a window and spins a cube or
something, I can apply that upward. I doubt such a thing exists, so
maybe I'll try it myself and blog the process. Then maybe I'll build a
CLI prototyping tool later, once I know what I might want to prototype
without code.
|
You know... I wonder if we can somehow make the engine not only an
engine with an editor and such, but a library too? Like, your given
the C++ libraries (static or dynamic libs) and can build your game
however you like, using Godot for all the game engine stuff (i.e.
audio and such). If this was possible we could forego the editor
entirely. So you could add assets as, say, .caf files, and then, at
runtime, you'd compile them in memory as compiled asset data files (we
could just call them CADFs). So your game would look like, at startup:
//...
// Compile assets
godot::assets::LoadAll({asset, asset, asset}); // load each asset individually
or
Godot::Assets::LoadAllAssetsFrom("assets"); // load all the assets at
once from a folder.
// Compile all the assets
auto assets = Godot::Assets::GetAllLoadedAssets();
bool success = Godot::Assets::Cadf::CompileAllAssets(assets);
if (success) {
// assets compiled
} else {
// error
}
Granted, this is my style of coding, and I doubt its the way the
engine is written. But if it were possible to do that, it would be
epic. Or we could just forego asset compilation at all, just load all
of 'em when we need 'em, or all of 'em at startup.
…On 5/25/18, Nolan Darilek ***@***.***> wrote:
Wait, I'm being an idiot. You said at the beginning of this thread that
you didn't need the editor at all, except for when importing assets. I
think it would have been more correct for me to ask if I needed the
*GUI* to create games. I'm happy running them from the GUI, I just want
to develop them on the console. And it looks like I can.
So I guess what I want is a "Godot from scratch" series that assumes you
can't/don't want to use the editor, similar to how you'd go about
writing a game with pygame or another high-level library. I imagine once
I've figured out how to create a .project file that just launches a
script, and maybe a script that just opens a window and spins a cube or
something, I can apply that upward. I doubt such a thing exists, so
maybe I'll try it myself and blog the process. Then maybe I'll build a
CLI prototyping tool later, once I know what I might want to prototype
without code.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14011 (comment)
--
Signed,
Ethin D. Probst
|
You don't need to GUI to run games. In fact, the editor just creates another Godot process with the arguments to run the game (with all the debugging options as well). Running the game is a non issue: you can simply run Godot from the project's directory without arguments, the default is to run the project. The editor is pretty much a Godot "game" itself. It uses the available nodes and extends them. The part about importing, it's not that you need the GUI, you just need the importing tools that comes with the editor. Essentially you just put all assets in the project folder (in any structure your like) and when you open the editor it'll import everything. "Importing" in this case means storing metadata (if you want to loop and trim audio, or apply filter to an image, etc.) and sometimes converting to a format that Godot understands and can use (like importing a model to a Godot mesh). The import process can only be done by the tools build (i.e. the editor), even if the headless version. When you export the game, only the imported assets are packed, the original ones are ignored. For the game itself this process is transparent: you can treat the assets as if they were in the original location, the loaders will know to get the imported version. Just like the editor is just a game, you can make your own "game" that is actually a tool to make games. I mean, you can even create a script that extends MainLoop or SceneTree and run directly via terminal with:
The problem is that you want a true CLI tool, Godot won't make it easy. Even when running a script it'll open a window, and everything sent via
While the editor and the engine are made for each other, you're not entirely dependent of the editor to make the game. You cannot split Godot into pieces though, you need to take the whole package (although you can disable most of the modules without problem). Since the editor is a Godot game, it's technically possible to replace the code by your own game. That would mean creating the scenes on the fly with code. Godot is not meant to be used as a library or framework, and likely won't ever be, but you can hack around it and make a MainLoop implementation that does not even use nodes at all, instead just call the servers directly. Of course, you would need to build the engine from source, but I imagine this is the least of the concerns. Any of this is technically possible, and maybe not that hard, but it's venturing into uncharted territory. |
Sorry for being noisy, folks.
So I've since done a fairly deep dive into Godot and have read lots of
the documentation. Normally I don't do this for a non-library tool like
this because it's kind of a long path towards the desired
result--essentially building all the tools in your woodworking shop
before you can cut a single sheet of plywood. :)
I'm slowly coming around to the view that the editor itself might be
made accessible by essentially building a mini screen reader in
GDScript. This has the added benefit of making the game UIs themselves
accessible. It isn't without precedent, either. See
[this](https://assetstore.unity.com/packages/tools/gui/ui-accessibility-plugin-uap-87935)
for a Unity UI accessibility plugin.
In looking at the `Control` class, there do appear to be signals exposed
for focus enter/leave. There are also signals for input events, which I
hope includes arrowing around text entry fields and the like. It'd be
limited for a generic OS-level screen reader, but just might work for
something domain-specific.
I've started on something
[here](https://github.com/ndarilek/godot-accessibility). Unfortunately,
I can't add this plugin to my project because I need the inaccessible
editor to add the accessibility plugin. :) If anyone could add this
plugin to the project and submit a PR with the project.godot changes,
that'd be helpful. Essentially what I'm going to do is hook the
`node_added` (or whatever it's called) signal on `SceneTree`, intercept
any nodes that descend from `Control`, and connect to their
`focus_entered` signal. Once there, I'll start adding logic to print out
presentation messages for each node type that will eventually be piped
to an as-of-yet-unwritten TTS API. Please let me know if there are any
obvious reasons why this wouldn't work.
And how would I make this a non-editor plugin that would work with *any*
Godot UI, including those in non-editor games?
Hopefully we can eventually move discussion to this other repo and stop
spamming this issue. :)
|
If I understand you right, if this were to work, we could choose to
include it in our games or not, right? Is there any way we could add
it to the editor but not to the projects we create, or to remove it
from the project but add it into the editor?
…On 5/26/18, Nolan Darilek ***@***.***> wrote:
Sorry for being noisy, folks.
So I've since done a fairly deep dive into Godot and have read lots of
the documentation. Normally I don't do this for a non-library tool like
this because it's kind of a long path towards the desired
result--essentially building all the tools in your woodworking shop
before you can cut a single sheet of plywood. :)
I'm slowly coming around to the view that the editor itself might be
made accessible by essentially building a mini screen reader in
GDScript. This has the added benefit of making the game UIs themselves
accessible. It isn't without precedent, either. See
[this](https://assetstore.unity.com/packages/tools/gui/ui-accessibility-plugin-uap-87935)
for a Unity UI accessibility plugin.
In looking at the `Control` class, there do appear to be signals exposed
for focus enter/leave. There are also signals for input events, which I
hope includes arrowing around text entry fields and the like. It'd be
limited for a generic OS-level screen reader, but just might work for
something domain-specific.
I've started on something
[here](https://github.com/ndarilek/godot-accessibility). Unfortunately,
I can't add this plugin to my project because I need the inaccessible
editor to add the accessibility plugin. :) If anyone could add this
plugin to the project and submit a PR with the project.godot changes,
that'd be helpful. Essentially what I'm going to do is hook the
`node_added` (or whatever it's called) signal on `SceneTree`, intercept
any nodes that descend from `Control`, and connect to their
`focus_entered` signal. Once there, I'll start adding logic to print out
presentation messages for each node type that will eventually be piped
to an as-of-yet-unwritten TTS API. Please let me know if there are any
obvious reasons why this wouldn't work.
And how would I make this a non-editor plugin that would work with *any*
Godot UI, including those in non-editor games?
Hopefully we can eventually move discussion to this other repo and stop
spamming this issue. :)
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14011 (comment)
--
Signed,
Ethin D. Probst
|
I don't know.
I did figure out the format for adding a plugin to the project.godot
file. I now have a function that should be adding
focus_entered/mouse_entered handlers to each `Control` and prints a
message when they have focus. Unfortunately, I'm not actually getting
any of these events, nor am I sure how to get the actual node that
originated them.
Nothing in this is editor-specific, though, and it should automatically
detect the addition of any UI control anywhere in the scene tree and,
eventually, implement a screen reader for it.
|
Having some real struggles with the right-click popup menus I get when
clicking on tree nodes in the editor.
[Here](https://gitlab.com/lightsoutgames/godot-accessibility/blob/master/accessible.gd#L177)
is the code I'm working with. In particular, sometimes `get_item_index`
is returning -1 and I don't know why. That makes it pretty much
impossible to get any details on a `PopupMenu` item, and the methods for
doing so seem to expect an `idx` parameter which I assume is an index.
Looking at the source, it seems -1 means the item isn't found. But I'm
passing in the ID as retrieved by `id_focused`, so I don't know why this
signal would hand me an ID that isn't found.
Anyhow, I attempted to just sub in the ID when I get -1, but that's
clearly not right, as I often click on one thing and get something
entirely different. Help with this very appreciated--I've spent hours on
it and don't know whether these particular control instances are buggy
or if something else is going on here. Things work in other menus, but
not the tree item context menus in the node list. Thanks.
|
Apparently this link is to a private repo... Thanks, |
Doh, fixed, sorry.
|
I'm sorry, I don't want to turn this into a general support thread, but
in this case I don't know if I've done something wrong and the editor is
flagging it with a warning or if I've genuinely made a mistake. I'm kind
of doing a bit of a hybrid workflow where I edit some things in the
editor and then, with it shut down, edit some things in the files by
hand. So it's possible I've done something wrong, though I'm not getting
syntax errors.
I can't get 3-D audio playing, and put together [this
example](https://github.com/ndarilek/godot-audio-failure) to make things
as simple as possible, but it doesn't work. My intent is to create a
single 3-D spatial node with an audio stream rumble and listener as
children, then play the rumble. This works in 2-D, but not in 3-D. Am I
doing something wrong here?
Apologies again, I [asked in the forum without
response](https://godotforums.org/discussion/21248/why-is-this-simple-audio-example-failing/p1?new=1),
and text tutorials are hard to come by. Sometimes I don't know whether
I'm hitting a Godot bug, or if the editor is flagging an error and my
plugin isn't exposing it.
Thanks for any help. Other than this audio issue, I'm making some decent
progress on Asteroids-style navigation with a spoken interface. There
are still wrinkles, but working with the Godot editor as a totally blind
developer is doable so far.
|
I've broken accessibility support out into a separate `ScreenReader`
node that can, theoretically, be added to any `SceneTree` to make
in-game UIs accessible. This makes my plugin not only an editor
accessibility enhancement, but an equivalent to Unity's accessibility
plugin that has been used in many shipping games. Of course,
functionality is still lagging behind, but to the best of my knowledge,
Unity's toolchain is not yet accessible so we're ahead in that regard.
|
You need to add a 3D which I think is a bug, since no error/warning whatsoever is displayed in the editor when no camera is present and sound is not played.
This is heart-warming to hear, thank you for your work in making Godot more accessible. |
Ah, I thought the listener was enough. Can I add the camera and prevent
it from rendering while still keeping whatever property makes the
listener work? I do want to be able to render *something* to 2-D, just
not a full 3-D scene. Or can I tweak the 3-D camera to render 2-D
somehow--give it an orthogonal perspective maybe?
Thanks, been pouring through the sources trying to track that down.
|
I think it should be, it might be a bug, I don't have much knowledge in that area.
You can put all the 3d stuff in a
You can render both 3D in 2D (via |
OK, I got my stream playing! I've read lots of the docs already, and am
also a bit limited by my inability to see what's actually being
rendered, so I hope you don't mind a few more questions inline. I'm
asking these elsewhere but this is the only place I'm getting any
answers, and I'm sorry to anyone who feels spammed, but I'm almost at
the point where I'm considering hiring a Godot consultant to help with
this open source project, which I'd like to avoid due to limited funds.
BUt my questions:
On 9/25/19 10:38 AM, Fabio Alessandrelli wrote:
You can put all the 3d stuff in a |Viewport| and it will not render
(remember to enable the listener property).
Wait, I thought that was the whole point of a viewport? So it sounds
like what you're saying I can do is:
* Create a 2-D game like I currently am, letting it render to the
default viewport that gets created.
* Create a *separate* viewport with a camera as a child and a listener
as a child of the camera.
And in that case the camera won't render anything even if the viewport
is a child of the scene tree? Is that because its size is set to 0 by
default, or is there some other reason I can process code on an
invisible viewport? That's entirely counter-intuitive to me, but if that
works then it would greatly simplify my work. I also want to make sure
that the camera continues to process even if the viewport isn't visible.
Do my AudioStreamPlayer3D nodes need to be children of the viewport as
well? I was actually looking through the engine source, but it wasn't
immediately obvious to me that the listener needed to be a camera child,
so I'm not sure how to tell if AudioStreamPlayer3D nodes need to be
children of the same viewport.
Thanks again.
|
When added to `TreeItem`, buttons are given tooltips. When returned via `get_button(...)`, however, the button is a `Texture` and the tooltip information isn't included. For accessibility purposes, it is useful to have access to the tooltip text. As such, we can retrieve a button's tooltip to use as a button label.
OK, hitting another odd issue I need help with. If I add a Raycast2D
node, then try to set its collision mask property via the editor, the
menu of layers pops up when I press Enter on the button. But pressing
Enter on a layer doesn't seem to close the menu and select a layer.
Enter works fine on other PopupMenus, which is what this seems to be.
Any ideas why this may be happening? And if not, could someone please
point me to where this particular menu is implemented in the engine so I
can investigate? Poked around in editor/ but it isn't immediately
obvious, and I'm also uncertain what specific criteria would prevent
some `PopupMenu` nodes from responding to Enter. Maybe something is
working on `_gui_input` and blocking it?
Thanks.
|
Sorry about the late reply. https://github.com/godotengine/godot/blob/master/editor/editor_properties.cpp#L799 https://github.com/godotengine/godot/blob/master/scene/gui/popup_menu.cpp#L1145 |
Sorry, should have mentioned that I'd cracked this one already. I'm
trying not to spam this issue overly much if I can avoid it. :)
Making some good progress, though most of it is on my game since the
accessibility layer is far enough along. There's still plenty more to
do, though.
Next question, is there some way to intercept and filter touchscreen
interaction before it reaches `Control`s or other nodes? I'd like to
start working on some sort of explore-by-touch support as found in
VoiceOver for iOS or TalkBack for Android, and also as implemented in
Unity's accessibility plugin. Essentially, I'd like to intercept touches
so that double-tapping a control is needed to trigger it, and regular
screen touches only serve to reveal the interface. Quick swipes in
certain directions also work as Tab/Shift-tab. I don't know if I need
viewport overrides, some sort of custom layer that I can use as a
filter, etc. I'd rather not change how every single control behaves,
instead just filtering what interactions reach them in a way that can be
toggled on and off while a game is running.
Thanks.
|
You can use the Check out:
|
Thanks, lots to look over here. Here's another:
https://docs.godotengine.org/en/3.1/classes/class_itemlist.html#class-itemlist-method-select
"Note: This method does not trigger the item selection signal." Why is
that? I'm having to override some keyboard-handling on widgets because,
for instance, pressing down-arrow on the lowest item of a tree/list will
skitter focus onto a neighboring widget instead of simply not advancing
the selection. Same with `ItemList`. I'm also having to implement my own
selection logic. One odd issue I'm hitting is in the file selector,
where selecting an item in the list isn't updating the filename in the
text field. I end up having to select the directory that the file is in,
then type the filename into this field.
Given that I'm having to implement my own selection focus logic, I'm
wondering if the fact that `select` doesn't fire the signal might be
what's causing this? And that begs the question, why doesn't `select`
fire the signal indicating that an item was selected?
Thanks.
|
OK, I'm to the point where I'm exporting a game that uses the
accessibility plugin for its UI. This is posing a new challenge which I
don't know how to address.
I have code that attempts to guess a label for some fields. Part of this
algorithm involves traversing up through a node's parents, finding any
`EditorProperty` instances, and returning their labels if any. This
works if I run my game in the editor, or via a binary that has the
editor built in. It fails with an exported binary, because
`EditorProperty` isn't defined in binaries without the editor. Things
I've tried:
`if node.get_class() == "EditorProperty"` doesn't work because I need
the `is` check, not just class equality, and I'd rather not check
whether the class name equals any descendant of that class's name.
`if Engine.is_editor_hint()` doesn't work because the failing code still
runs in the exported binary.
Can I retrieve a class by its name into a variable, then perform logic
based on whether the variable is null or not? I need to run an `is`
check or its equivalent. Failing that, can I move this check into a
separate context that isn't run in exported binaries, or evaluates to
null? I still want this code to run generally, but would be happy to
move the editor-specific checks out of the code path for exports.
For reference, here's the code I'm trying to make work:
```
func guess_label():
var tokens = PoolStringArray([])
var to_check = node
while to_check:
if Engine.is_editor_hint():
print(to_check)
if to_check is EditorProperty and to_check.label:
tokens.append(to_check.label)
if (to_check is EditorProperty or to_check.get_class() ==
"EditorInspectorCategory") and to_check.get_tooltip_text():
tokens.append(to_check.get_tooltip_text())
var label = tokens.join(": ")
if label:
return label
to_check = to_check.get_parent()
```
Thanks.
|
Yup, worked nicely. Thanks! The alternative I was considering would have
been much messier.
|
Glad to hear it. I went back and read some of these posts and it's not
entirely clear what the outstanding issues are and what's been resolved,
but you did mention there is some difficulty with figuring out what's being
rendered. I need this plugin for a project I'm working on so I'm open to
helping out wherever you need a sighted developer for testing or resolving
weird quirks. Feel free to contact me with what you need done or populate
the issue tracker on your gitlab repos with bugs and feature requests you
need help with and I'll tackle whatever I think I can manage. My email is
[email protected]
…On Mon, Oct 14, 2019, 9:50 AM Nolan Darilek ***@***.***> wrote:
Yup, worked nicely. Thanks! The alternative I was considering would have
been much messier.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14011?email_source=notifications&email_token=AAOY262NSXUDGOMDFEF5NPTQOSPOXA5CNFSM4EG4X6EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBFRGQQ#issuecomment-541791042>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOY264T3T7KWWSTBIIJUFLQOSPOXANCNFSM4EG4X6EA>
.
|
When added to `TreeItem`, buttons are given tooltips. When returned via `get_button(...)`, however, the button is a `Texture` and the tooltip information isn't included. For accessibility purposes, it is useful to have access to the tooltip text. As such, we can retrieve a button's tooltip to use as a button label.
We may be able to close this one soon, OTOH I've had lots of questions answered here that IRC/the forums haven't helped with. That's true again. :) Hopefully I've kept the S/N ratio high, but when I need help with something, it's generally above and beyond what I can find in a tutorial or book, and there are plenty of skilled folks watching this issue and helping me build this support out. DId lots of work on this over the holidays. My godot-tts plugin now supports Android and HTML 5, and I've exported accessible games to both platforms. I also did some initial work on touchscreen accessibility. On my Linux desktop, UIs can now be explored accessibly on my $70 HDMI touchscreen. Simple touches speak the UI control being touched, a double-tap anywhere on-screen activates the last focused control, and a quick swipe right/left acts like Tab/Shift-tab and moves focus between elements. Unfortunately, swiping doesn't work at all on Android, and I'd appreciate help figuring out why. More specifically, the swipes themselves are detected just fine. They then inject
And those actions don't trigger on Android, even though the I plugged a keyboard into my phone, and Tab at least triggers Running out of ideas here and am open to suggestions. Thanks for the help so far. |
Superseded by godotengine/godot-proposals#983. Note that this might be worth splitting in a separate proposal again. We're closing old proposals on this repository to encourage migrating them to the new godot-proposals tracker where we want all proposals to reside and be discussed. |
Operating system or device, Godot version, GPU Model and driver (if graphics related):
Operating System: Arch Linux, might be true for blind users on other operating systems
Godot Version: 2.1.4, may apply to all
Issue description:
The Godot game editor does not work with the Orca screenreader.
I was expecting to at least be able to use Orca's flat review with the editor application, but nothing happened; it is equivellent to turning off the monitor.
Steps to reproduce:
Install the GNOME desktop environment, along with the Orca screenreader. MATE will also work.
With Orca running, open the Godot application. There will be no speech output from Orca.
Link to minimal example project:
The text was updated successfully, but these errors were encountered: