diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 055872e1964..6bac7694dcc 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -812,6 +812,13 @@
Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage.
[b]Note:[/b] Input accumulation is [i]enabled[/i] by default.
+
+ Editor accessibility support mode:
+ - [b]Auto[/b] ([code]0[/code]): Accessibility support is enabled, but updates to the accessibility information are processed only if an assistive app (such as a screen reader or a Braille display) is active (default).
+ - [b]Always Active[/b] ([code]1[/code]): Accessibility support is enabled, and updates to the accessibility information are always processed, regardless of the status of assistive apps.
+ - [b]Disabled[/b] ([code]2[/code]): Accessibility support is fully disabled.
+ [b]Note:[/b] Accessibility debugging tools, such as Accessibility Insights for Windows, Accessibility Inspector (macOS), or AT-SPI Browser (Linux/BSD) do not count as assistive apps. To test your project with these tools, use [b]Always Active[/b].
+
How to position the Cancel and OK buttons in the editor's [AcceptDialog]s. Different platforms have different standard behaviors for this, which can be overridden using this setting. This is useful if you use Godot both on Windows and macOS/Linux and your Godot muscle memory is stronger than your OS specific one.
- [b]Auto[/b] follows the platform convention: OK first on Windows, KDE, and LXQt, Cancel first on macOS and other Linux desktop environments.
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index c9466f59deb..0c2fb133a5c 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -261,10 +261,10 @@
Accessibility support mode:
- - [b]Auto[/b] ([code]0[/code]): accessibility support is enabled, but accessibility information updates are processed only if an assistive app (e.g. screen reader or Braille display) is active (default).
- - [b]Always Active[/b] ([code]1[/code]): accessibility support is enabled, and accessibility information updates are processed regardless of current assistive apps' status.
- - [b]Disabled[/b] ([code]2[/code]): accessibility support is fully disabled.
- [b]Note:[/b] Accessibility debugging tools, such as Accessibility Insights for Windows, macOS Accessibility Inspector, or AT-SPI Browser do not count as assistive apps. To test your app with these tools, use [code]1[/code].
+ - [b]Auto[/b] ([code]0[/code]): Accessibility support is enabled, but updates to the accessibility information are processed only if an assistive app (such as a screen reader or a Braille display) is active (default).
+ - [b]Always Active[/b] ([code]1[/code]): Accessibility support is enabled, and updates to the accessibility information are always processed, regardless of the status of assistive apps.
+ - [b]Disabled[/b] ([code]2[/code]): Accessibility support is fully disabled.
+ [b]Note:[/b] Accessibility debugging tools, such as Accessibility Insights for Windows, Accessibility Inspector (macOS), or AT-SPI Browser (Linux/BSD) do not count as assistive apps. To test your project with these tools, use [b]Always Active[/b].
The number of accessibility information updates per second.
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index e6e816e8fb0..c6cbe68dc60 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -568,6 +568,9 @@ void EditorSettings::_load_defaults(Ref p_extra_config) {
open_in_new_inspector_defaults.push_back("MeshLibrary");
_initial_set("interface/inspector/resources_to_open_in_new_inspector", open_in_new_inspector_defaults);
+ EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "interface/accessibility/accessibility_support", 0, "Auto (When Screen Reader is Running),Always Active,Disabled")
+ set_restart_if_changed("interface/accessibility/accessibility_support", true);
+
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "interface/inspector/default_color_picker_mode", (int32_t)ColorPicker::MODE_RGB, "RGB,HSV,RAW,OKHSL")
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "interface/inspector/default_color_picker_shape", (int32_t)ColorPicker::SHAPE_OKHSL_CIRCLE, "HSV Rectangle,HSV Rectangle Wheel,VHS Circle,OKHSL Circle,OK HS Rectangle:5,OK HL Rectangle") // `SHAPE_NONE` is 4.
EDITOR_SETTING_BASIC(Variant::BOOL, PROPERTY_HINT_NONE, "interface/inspector/color_picker_show_intensity", true, "");
diff --git a/main/main.cpp b/main/main.cpp
index e7a35bf0e25..96b178fdd11 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2909,6 +2909,7 @@ Error Main::setup2(bool p_show_boot_logo) {
print_header(false);
#ifdef TOOLS_ENABLED
+ int accessibility_mode_editor = 0;
int tablet_driver_editor = -1;
if (editor || project_manager || cmdline_tool) {
OS::get_singleton()->benchmark_begin_measure("Startup", "Initialize Early Settings");
@@ -2946,6 +2947,8 @@ Error Main::setup2(bool p_show_boot_logo) {
bool tablet_found = false;
+ bool ac_found = false;
+
if (editor) {
screen_property = "interface/editor/editor_screen";
} else if (project_manager) {
@@ -2960,7 +2963,7 @@ Error Main::setup2(bool p_show_boot_logo) {
prefer_wayland_found = true;
}
- while (!screen_found || !prefer_wayland_found || !tablet_found) {
+ while (!screen_found || !prefer_wayland_found || !tablet_found || !ac_found) {
assign = Variant();
next_tag.fields.clear();
next_tag.name = String();
@@ -2979,7 +2982,10 @@ Error Main::setup2(bool p_show_boot_logo) {
restore_editor_window_layout = value.operator int() == EditorSettings::InitialScreen::INITIAL_SCREEN_AUTO;
}
}
- if (assign == "interface/editor/expand_to_title") {
+ if (assign == "interface/accessibility/accessibility_support") {
+ accessibility_mode_editor = value;
+ ac_found = true;
+ } else if (assign == "interface/editor/expand_to_title") {
init_expand_to_title = value;
} else if (assign == "interface/editor/display_scale") {
init_display_scale = value;
@@ -3154,7 +3160,15 @@ Error Main::setup2(bool p_show_boot_logo) {
#endif
if (!accessibility_mode_set) {
- accessibility_mode = (DisplayServer::AccessibilityMode)GLOBAL_GET("accessibility/general/accessibility_support").operator int64_t();
+#ifdef TOOLS_ENABLED
+ if (editor || project_manager || cmdline_tool) {
+ accessibility_mode = (DisplayServer::AccessibilityMode)accessibility_mode_editor;
+ } else {
+#else
+ {
+#endif
+ accessibility_mode = (DisplayServer::AccessibilityMode)GLOBAL_GET("accessibility/general/accessibility_support").operator int64_t();
+ }
}
DisplayServer::accessibility_set_mode(accessibility_mode);