From 5b49fd4207b86fc4ee8303562ac87c27e67a3535 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?=
<7645683+bruvzg@users.noreply.github.com>
Date: Tue, 22 Apr 2025 11:57:16 +0300
Subject: [PATCH] Selectively apply `FOCUS_ACCESSIBILITY` to the `Label`s
instead of setting it by default.
---
doc/classes/Label.xml | 1 -
editor/animation_track_editor.cpp | 4 ++++
editor/code_editor.cpp | 4 ++++
editor/connections_dialog.cpp | 2 ++
editor/debugger/editor_performance_profiler.cpp | 1 +
editor/debugger/script_editor_debugger.cpp | 1 +
editor/dependency_editor.cpp | 2 ++
editor/directory_create_dialog.cpp | 1 +
editor/editor_about.cpp | 3 +++
editor/editor_asset_installer.cpp | 2 ++
editor/editor_audio_buses.cpp | 2 ++
editor/editor_autoload_settings.cpp | 1 +
editor/editor_help.cpp | 1 +
editor/editor_inspector.cpp | 2 ++
editor/editor_node.cpp | 6 +++++-
editor/editor_settings_dialog.cpp | 1 +
editor/export/export_template_manager.cpp | 1 +
editor/export/project_export.cpp | 9 +++++++++
editor/fbx_importer_manager.cpp | 1 +
editor/find_in_files.cpp | 2 ++
editor/group_settings_editor.cpp | 1 +
editor/groups_editor.cpp | 1 +
editor/gui/editor_file_dialog.cpp | 5 -----
editor/gui/editor_object_selector.cpp | 1 +
editor/gui/editor_quick_open_dialog.cpp | 2 ++
editor/gui/editor_toaster.cpp | 1 +
editor/gui/editor_validation_panel.cpp | 1 +
editor/gui/scene_tree_editor.cpp | 2 ++
editor/import/dynamic_font_import_settings.cpp | 9 +++++++++
editor/import_dock.cpp | 2 ++
editor/input_event_configuration_dialog.cpp | 1 +
editor/inspector_dock.cpp | 2 ++
editor/node_dock.cpp | 1 +
editor/plugins/animation_blend_space_1d_editor.cpp | 1 +
editor/plugins/animation_blend_space_2d_editor.cpp | 1 +
.../plugins/animation_blend_tree_editor_plugin.cpp | 1 +
editor/plugins/animation_state_machine_editor.cpp | 1 +
editor/plugins/asset_library_editor_plugin.cpp | 4 ++++
editor/plugins/bit_map_editor_plugin.cpp | 1 +
editor/plugins/camera_2d_editor_plugin.cpp | 1 +
editor/plugins/canvas_item_editor_plugin.cpp | 1 +
editor/plugins/input_event_editor_plugin.cpp | 1 +
editor/plugins/material_editor_plugin.cpp | 1 +
editor/plugins/mesh_instance_3d_editor_plugin.cpp | 1 +
editor/plugins/navigation_polygon_editor_plugin.cpp | 1 +
editor/plugins/node_3d_editor_plugin.cpp | 2 ++
editor/plugins/script_editor_plugin.cpp | 7 ++++++-
editor/plugins/script_text_editor.cpp | 1 +
editor/plugins/sprite_frames_editor_plugin.cpp | 1 +
editor/plugins/text_shader_editor.cpp | 1 +
editor/plugins/texture_3d_editor_plugin.cpp | 1 +
editor/plugins/texture_editor_plugin.cpp | 1 +
editor/plugins/texture_layered_editor_plugin.cpp | 1 +
editor/plugins/tiles/atlas_merging_dialog.cpp | 1 +
editor/plugins/tiles/tile_atlas_view.cpp | 1 +
editor/plugins/tiles/tile_map_layer_editor.cpp | 4 ++++
.../plugins/tiles/tile_set_atlas_source_editor.cpp | 3 +++
editor/plugins/tiles/tile_set_editor.cpp | 2 ++
.../tile_set_scenes_collection_source_editor.cpp | 1 +
editor/plugins/version_control_editor_plugin.cpp | 2 ++
editor/plugins/visual_shader_editor_plugin.cpp | 12 ++++++++++++
editor/project_manager.cpp | 5 ++++-
editor/project_manager/project_dialog.cpp | 5 +++++
editor/project_manager/project_list.cpp | 4 ++++
editor/project_settings_editor.cpp | 1 +
editor/rename_dialog.cpp | 1 +
editor/scene_tree_dock.cpp | 1 +
modules/gltf/editor/editor_scene_importer_blend.cpp | 1 +
modules/gridmap/editor/grid_map_editor_plugin.cpp | 1 +
.../multiplayer/editor/editor_network_profiler.cpp | 2 ++
modules/multiplayer/editor/replication_editor.cpp | 1 +
.../editor/navigation_mesh_editor_plugin.cpp | 1 +
.../editor/openxr_binding_modifiers_dialog.cpp | 1 +
.../editor/openxr_interaction_profile_editor.cpp | 4 ++++
.../openxr/editor/openxr_select_action_dialog.cpp | 1 +
.../openxr_select_interaction_profile_dialog.cpp | 1 +
scene/gui/box_container.cpp | 1 +
scene/gui/dialogs.cpp | 1 +
scene/gui/file_dialog.cpp | 4 +---
scene/gui/graph_node.cpp | 1 -
scene/gui/label.cpp | 1 -
scene/gui/line_edit.cpp | 1 +
scene/gui/rich_text_label.cpp | 1 +
scene/gui/text_edit.cpp | 1 +
84 files changed, 159 insertions(+), 14 deletions(-)
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 2e39d9539c1..b02c4ac05ea 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -58,7 +58,6 @@
Ellipsis character used for text clipping.
-
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 7df40cfec6e..1fe82aa2d0a 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -7602,6 +7602,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
timeline_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
info_message = memnew(Label);
+ info_message->set_focus_mode(FOCUS_ACCESSIBILITY);
info_message->set_text(TTR("Select an AnimationPlayer node to create and edit animations."));
info_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
@@ -7768,6 +7769,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
fps_compat->connect(SceneStringName(toggled), callable_mp(this, &AnimationTrackEditor::_update_fps_compat_mode));
nearest_fps_label = memnew(Label);
+ nearest_fps_label->set_focus_mode(FOCUS_ACCESSIBILITY);
nearest_fps_label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
bottom_hf->add_child(nearest_fps_label);
@@ -7890,6 +7892,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
VBoxContainer *icvb = memnew(VBoxContainer);
insert_confirm->add_child(icvb);
insert_confirm_text = memnew(Label);
+ insert_confirm_text->set_focus_mode(FOCUS_ACCESSIBILITY);
icvb->add_child(insert_confirm_text);
HBoxContainer *ichb = memnew(HBoxContainer);
icvb->add_child(ichb);
@@ -9198,6 +9201,7 @@ AnimationMarkerEdit::AnimationMarkerEdit() {
marker_rename_new_name_label->set_text(TTR("Change Marker Name:"));
marker_rename_vbox->add_child(marker_rename_new_name_label);
marker_rename_new_name = memnew(LineEdit);
+ marker_rename_new_name->set_accessibility_name(TTRC("Change Marker Name"));
marker_rename_new_name->connect(SceneStringName(text_changed), callable_mp(this, &AnimationMarkerEdit::_marker_rename_new_name_changed));
marker_rename_confirm->register_text_enter(marker_rename_new_name);
marker_rename_vbox->add_child(marker_rename_new_name);
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index b1b18eec537..ee197199bec 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -793,6 +793,7 @@ FindReplaceBar::FindReplaceBar() {
matches_label = memnew(Label);
hbc_button_search->add_child(matches_label);
+ matches_label->set_focus_mode(FOCUS_ACCESSIBILITY);
matches_label->hide();
find_prev = memnew(Button);
@@ -1891,6 +1892,7 @@ CodeTextEditor::CodeTextEditor() {
status_bar->add_child(scroll);
error = memnew(Label);
+ error->set_focus_mode(FOCUS_ACCESSIBILITY);
scroll->add_child(error);
error->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
error->set_mouse_filter(MOUSE_FILTER_STOP);
@@ -1949,6 +1951,7 @@ CodeTextEditor::CodeTextEditor() {
line_and_col_txt->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
line_and_col_txt->set_tooltip_text(TTR("Line and column numbers."));
line_and_col_txt->set_accessibility_name(TTRC("Line and Column Numbers"));
+ line_and_col_txt->set_focus_mode(FOCUS_ACCESSIBILITY);
line_and_col_txt->set_mouse_filter(MOUSE_FILTER_STOP);
status_bar->add_child(memnew(VSeparator));
@@ -1959,6 +1962,7 @@ CodeTextEditor::CodeTextEditor() {
indentation_txt->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
indentation_txt->set_tooltip_text(TTR("Indentation"));
indentation_txt->set_accessibility_name(TTRC("Indentation"));
+ indentation_txt->set_focus_mode(FOCUS_ACCESSIBILITY);
indentation_txt->set_mouse_filter(MOUSE_FILTER_STOP);
text_editor->connect(SceneStringName(gui_input), callable_mp(this, &CodeTextEditor::_text_editor_gui_input));
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 66c1c573e0e..172a396b02a 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -771,10 +771,12 @@ ConnectDialog::ConnectDialog() {
vbc_left->add_child(tree);
warning_label = memnew(Label);
+ warning_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
vbc_left->add_child(warning_label);
warning_label->hide();
error_label = memnew(Label);
+ error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
error_label->set_text(TTR("Scene does not contain any script."));
vbc_left->add_child(error_label);
error_label->hide();
diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp
index aac95b87215..dc1fab4c2cf 100644
--- a/editor/debugger/editor_performance_profiler.cpp
+++ b/editor/debugger/editor_performance_profiler.cpp
@@ -417,6 +417,7 @@ EditorPerformanceProfiler::EditorPerformanceProfiler() {
add_child(monitor_draw);
info_message = memnew(Label);
+ info_message->set_focus_mode(FOCUS_ACCESSIBILITY);
info_message->set_text(TTR("Pick one or more items from the list to display the graph."));
info_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 6efe1be8d37..e227f33d08e 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -1944,6 +1944,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
vbc->add_child(hbc);
reason = memnew(Label);
+ reason->set_focus_mode(FOCUS_ACCESSIBILITY);
reason->set_text("");
hbc->add_child(reason);
reason->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index e8182052335..195ad112075 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -667,6 +667,7 @@ DependencyRemoveDialog::DependencyRemoveDialog() {
add_child(vb);
text = memnew(Label);
+ text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
vb->add_child(text);
Label *files_to_delete_label = memnew(Label);
@@ -757,6 +758,7 @@ DependencyErrorDialog::DependencyErrorDialog() {
set_cancel_button_text(TTR("Close"));
text = memnew(Label);
+ text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
vb->add_child(text);
text->set_text(TTR("Which action should be taken?"));
diff --git a/editor/directory_create_dialog.cpp b/editor/directory_create_dialog.cpp
index 69198a37571..8a692a8825e 100644
--- a/editor/directory_create_dialog.cpp
+++ b/editor/directory_create_dialog.cpp
@@ -157,6 +157,7 @@ DirectoryCreateDialog::DirectoryCreateDialog() {
add_child(vb);
base_path_label = memnew(Label);
+ base_path_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
base_path_label->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
vb->add_child(base_path_label);
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index b1c327fd0fa..c7d9b1c1d57 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -108,6 +108,7 @@ ScrollContainer *EditorAbout::_populate_list(const String &p_name, const Listset_focus_mode(Control::FOCUS_ACCESSIBILITY);
lbl->set_theme_type_variation("HeaderSmall");
lbl->set_text(*itr);
vbc->add_child(lbl);
@@ -196,6 +197,7 @@ EditorAbout::EditorAbout() {
version_info_vbc->add_child(memnew(EditorVersionButton(EditorVersionButton::FORMAT_WITH_NAME_AND_BUILD)));
Label *about_text = memnew(Label);
+ about_text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
about_text->set_text(
String::utf8("\xc2\xa9 2014-present ") + TTR("Godot Engine contributors") + "." +
@@ -268,6 +270,7 @@ EditorAbout::EditorAbout() {
tc->add_child(license_thirdparty);
Label *tpl_label = memnew(Label);
+ tpl_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
tpl_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
tpl_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
tpl_label->set_text(TTR("Godot Engine relies on a number of third-party free and open source libraries, all compatible with the terms of its MIT license. The following is an exhaustive list of all such third-party components with their respective copyright statements and license terms."));
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 26393e03d3d..0bc6e492c8d 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -674,6 +674,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
asset_status->add_child(asset_label);
asset_title_label = memnew(Label);
+ asset_title_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
asset_status->add_child(asset_title_label);
// File remapping controls.
@@ -705,6 +706,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
remapping_tools->add_spacer();
asset_conflicts_label = memnew(Label);
+ asset_conflicts_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
asset_conflicts_label->set_theme_type_variation("HeaderSmall");
asset_conflicts_label->set_text(TTR("No files conflict with your project"));
remapping_tools->add_child(asset_conflicts_label);
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index d549d70ec52..4c74bb68c7e 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -682,6 +682,7 @@ Variant EditorAudioBus::get_drag_data_fw(const Point2 &p_point, Control *p_from)
fxd["effect"] = md;
Label *l = memnew(Label);
+ l->set_focus_mode(FOCUS_ACCESSIBILITY);
l->set_text(item->get_text(0));
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
effects->set_drag_preview(l);
@@ -921,6 +922,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
audio_value_preview_box->add_child(audioprev_hbc);
audio_value_preview_label = memnew(Label);
+ audio_value_preview_label->set_focus_mode(FOCUS_ACCESSIBILITY);
audio_value_preview_label->set_v_size_flags(SIZE_EXPAND_FILL);
audio_value_preview_label->set_h_size_flags(SIZE_EXPAND_FILL);
audio_value_preview_label->set_mouse_filter(MOUSE_FILTER_PASS);
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index bad06143d5a..dc0a39e5f1e 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -890,6 +890,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
add_child(hbc);
error_message = memnew(Label);
+ error_message->set_focus_mode(FOCUS_ACCESSIBILITY);
error_message->hide();
error_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
error_message->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index aebe0b40e88..29d1bb6d0ed 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -4755,6 +4755,7 @@ FindBar::FindBar() {
search_text->connect(SceneStringName(text_submitted), callable_mp(this, &FindBar::_search_text_submitted));
matches_label = memnew(Label);
+ matches_label->set_focus_mode(FOCUS_ACCESSIBILITY);
add_child(matches_label);
matches_label->hide();
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 8ad61a5ad7f..dff972160a3 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1145,6 +1145,7 @@ Variant EditorProperty::get_drag_data(const Point2 &p_point) {
dp["value"] = object->get(property);
Label *drag_label = memnew(Label);
+ drag_label->set_focus_mode(FOCUS_ACCESSIBILITY);
drag_label->set_text(property);
drag_label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate raw property name.
set_drag_preview(drag_label);
@@ -3191,6 +3192,7 @@ EditorPaginator::EditorPaginator() {
add_child(page_line_edit);
page_count_label = memnew(Label);
+ page_count_label->set_focus_mode(FOCUS_ACCESSIBILITY);
add_child(page_count_label);
next_page_button = memnew(Button);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index d4839bb3706..7844fc482a0 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6013,6 +6013,7 @@ Dictionary EditorNode::drag_resource(const Ref &p_res, Control *p_from
Control *drag_control = memnew(Control);
TextureRect *drag_preview = memnew(TextureRect);
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
Ref preview;
@@ -6066,6 +6067,7 @@ Dictionary EditorNode::drag_files_and_dirs(const Vector &p_paths, Contro
HBoxContainer *hbox = memnew(HBoxContainer);
TextureRect *icon = memnew(TextureRect);
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
if (p_paths[i].ends_with("/")) {
@@ -6084,6 +6086,7 @@ Dictionary EditorNode::drag_files_and_dirs(const Vector &p_paths, Contro
if (p_paths.size() > num_rows) {
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
if (has_file && has_folder) {
label->set_text(vformat(TTR("%d more files or folders"), p_paths.size() - num_rows));
} else if (has_folder) {
@@ -7750,7 +7753,6 @@ EditorNode::EditorNode() {
project_title = memnew(Label);
project_title->add_theme_font_override(SceneStringName(font), theme->get_font(SNAME("bold"), EditorStringName(EditorFonts)));
project_title->add_theme_font_size_override(SceneStringName(font_size), theme->get_font_size(SNAME("bold_size"), EditorStringName(EditorFonts)));
- project_title->set_focus_mode(Control::FOCUS_NONE);
project_title->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
project_title->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
project_title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -8050,6 +8052,7 @@ EditorNode::EditorNode() {
{
VBoxContainer *vbox = memnew(VBoxContainer);
install_android_build_template_message = memnew(Label);
+ install_android_build_template_message->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
install_android_build_template_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
install_android_build_template_message->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
vbox->add_child(install_android_build_template_message);
@@ -8138,6 +8141,7 @@ EditorNode::EditorNode() {
vbc->add_child(dl);
disk_changed_list = memnew(Tree);
+ disk_changed_list->set_accessibility_name(TTRC("The following files are newer on disk:"));
vbc->add_child(disk_changed_list);
disk_changed_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index 7d424617c34..3a5c0adba6d 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -929,6 +929,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
restart_icon->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
restart_hb->add_child(restart_icon);
restart_label = memnew(Label);
+ restart_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
restart_label->set_text(TTR("The editor must be restarted for changes to take effect."));
restart_hb->add_child(restart_label);
restart_hb->add_spacer();
diff --git a/editor/export/export_template_manager.cpp b/editor/export/export_template_manager.cpp
index 71dd2f583a7..874ecda2745 100644
--- a/editor/export/export_template_manager.cpp
+++ b/editor/export/export_template_manager.cpp
@@ -990,6 +990,7 @@ ExportTemplateManager::ExportTemplateManager() {
current_hb->add_child(current_label);
current_value = memnew(Label);
+ current_value->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
current_hb->add_child(current_value);
// Current version statuses.
diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp
index 299a887e31b..5846fe7ee66 100644
--- a/editor/export/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -81,6 +81,7 @@ void ProjectExportTextureFormatError::show_for_texture_format(const String &p_fr
ProjectExportTextureFormatError::ProjectExportTextureFormatError() {
// Set up the label.
texture_format_error_label = memnew(Label);
+ texture_format_error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
add_child(texture_format_error_label);
// Set up the fix button.
fix_texture_format_button = memnew(LinkButton);
@@ -764,6 +765,7 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
tr->set_texture(presets->get_item_icon(pos));
drag->add_child(tr);
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_text(presets->get_item_text(pos));
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate user input.
drag->add_child(label);
@@ -782,6 +784,7 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
d["patch"] = item_metadata;
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_text(item->get_text(0));
patches->set_drag_preview(label);
@@ -1563,6 +1566,7 @@ ProjectExportDialog::ProjectExportDialog() {
include_files->connect("custom_popup_edited", callable_mp(this, &ProjectExportDialog::_tree_popup_edited));
server_strip_message = memnew(Label);
+ server_strip_message->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
server_strip_message->set_visible(false);
server_strip_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
server_strip_message->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
@@ -1692,6 +1696,7 @@ ProjectExportDialog::ProjectExportDialog() {
script_key->set_accessibility_name(TTRC("Encryption Key"));
script_key->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_script_encryption_key_changed));
script_key_error = memnew(Label);
+ script_key_error->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
script_key_error->set_text(String::utf8("• ") + TTR("Invalid Encryption Key (must be 64 hexadecimal characters long)"));
script_key_error->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
sec_vb->add_margin_child(TTR("Encryption Key (256-bits as hexadecimal):"), script_key);
@@ -1704,6 +1709,7 @@ ProjectExportDialog::ProjectExportDialog() {
sec_vb->add_margin_child(TTR("Initialization vector seed"), seed_input);
Label *sec_info = memnew(Label);
+ sec_info->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
sec_info->set_text(TTR("Note: Encryption key needs to be stored in the binary,\nyou need to build the export templates from source."));
sec_vb->add_child(sec_info);
@@ -1789,12 +1795,14 @@ ProjectExportDialog::ProjectExportDialog() {
export_texture_format_error->connect("texture_format_enabled", callable_mp(this, &ProjectExportDialog::_update_current_preset));
export_error = memnew(Label);
+ export_error->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
main_vb->add_child(export_error);
export_error->hide();
export_error->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
export_error->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
export_warning = memnew(Label);
+ export_warning->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
main_vb->add_child(export_warning);
export_warning->hide();
export_warning->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
@@ -1805,6 +1813,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_templates_error->hide();
Label *export_error2 = memnew(Label);
+ export_error2->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
export_templates_error->add_child(export_error2);
export_error2->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
export_error2->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
diff --git a/editor/fbx_importer_manager.cpp b/editor/fbx_importer_manager.cpp
index 72806ad64a9..2ea434a74e4 100644
--- a/editor/fbx_importer_manager.cpp
+++ b/editor/fbx_importer_manager.cpp
@@ -162,6 +162,7 @@ FBXImporterManager::FBXImporterManager() {
vb->add_child(hb);
path_status = memnew(Label);
+ path_status->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
vb->add_child(path_status);
add_child(vb);
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index bb79e0ea049..96f84cabf8e 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -593,6 +593,7 @@ FindInFilesPanel::FindInFilesPanel() {
hbc->add_child(find_label);
_search_text_label = memnew(Label);
+ _search_text_label->set_focus_mode(FOCUS_ACCESSIBILITY);
hbc->add_child(_search_text_label);
_progress_bar = memnew(ProgressBar);
@@ -602,6 +603,7 @@ FindInFilesPanel::FindInFilesPanel() {
set_progress_visible(false);
_status_label = memnew(Label);
+ _status_label->set_focus_mode(FOCUS_ACCESSIBILITY);
hbc->add_child(_status_label);
_refresh_button = memnew(Button);
diff --git a/editor/group_settings_editor.cpp b/editor/group_settings_editor.cpp
index 33d29819612..f2edca594d5 100644
--- a/editor/group_settings_editor.cpp
+++ b/editor/group_settings_editor.cpp
@@ -404,6 +404,7 @@ void GroupSettingsEditor::_show_remove_dialog() {
VBoxContainer *vbox = memnew(VBoxContainer);
remove_label = memnew(Label);
+ remove_label->set_focus_mode(FOCUS_ACCESSIBILITY);
vbox->add_child(remove_label);
remove_check_box = memnew(CheckBox);
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index 3534f16554e..9fd47b9b5be 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -741,6 +741,7 @@ void GroupsEditor::_show_remove_group_dialog() {
VBoxContainer *vbox = memnew(VBoxContainer);
remove_label = memnew(Label);
+ remove_label->set_focus_mode(FOCUS_ACCESSIBILITY);
vbox->add_child(remove_label);
remove_check_box = memnew(CheckBox);
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp
index b268b992484..cff8c5d2dd4 100644
--- a/editor/gui/editor_file_dialog.cpp
+++ b/editor/gui/editor_file_dialog.cpp
@@ -2061,7 +2061,6 @@ void EditorFileDialog::_update_option_controls() {
} else {
Label *lbl = memnew(Label);
lbl->set_text(opt.name);
- lbl->set_focus_mode(Control::FOCUS_NONE);
grid_select_options->add_child(lbl);
OptionButton *ob = memnew(OptionButton);
@@ -2428,7 +2427,6 @@ EditorFileDialog::EditorFileDialog() {
dir_up->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_go_up));
Label *l = memnew(Label(TTRC("Path:")));
- l->set_focus_mode(Control::FOCUS_NONE);
l->set_theme_type_variation("HeaderSmall");
pathhb->add_child(l);
@@ -2504,7 +2502,6 @@ EditorFileDialog::EditorFileDialog() {
fav_vb->add_child(fav_hb);
l = memnew(Label(TTRC("Favorites:")));
- l->set_focus_mode(Control::FOCUS_NONE);
l->set_theme_type_variation("HeaderSmall");
fav_hb->add_child(l);
@@ -2555,7 +2552,6 @@ EditorFileDialog::EditorFileDialog() {
lower_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
l = memnew(Label(TTRC("Directories & Files:")));
- l->set_focus_mode(Control::FOCUS_NONE);
l->set_theme_type_variation("HeaderSmall");
l->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -2665,7 +2661,6 @@ EditorFileDialog::EditorFileDialog() {
file_box = memnew(HBoxContainer);
l = memnew(Label(TTRC("File:")));
- l->set_focus_mode(Control::FOCUS_NONE);
l->set_theme_type_variation("HeaderSmall");
file_box->add_child(l);
diff --git a/editor/gui/editor_object_selector.cpp b/editor/gui/editor_object_selector.cpp
index 7dd08432404..810aeed8109 100644
--- a/editor/gui/editor_object_selector.cpp
+++ b/editor/gui/editor_object_selector.cpp
@@ -226,6 +226,7 @@ EditorObjectSelector::EditorObjectSelector(EditorSelectionHistory *p_history) {
main_hb->add_child(current_object_icon);
current_object_label = memnew(Label);
+ current_object_label->set_focus_mode(FOCUS_ACCESSIBILITY);
current_object_label->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
current_object_label->set_h_size_flags(SIZE_EXPAND_FILL);
current_object_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
diff --git a/editor/gui/editor_quick_open_dialog.cpp b/editor/gui/editor_quick_open_dialog.cpp
index f1dd34f15fe..108a19233d5 100644
--- a/editor/gui/editor_quick_open_dialog.cpp
+++ b/editor/gui/editor_quick_open_dialog.cpp
@@ -205,6 +205,7 @@ QuickOpenResultContainer::QuickOpenResultContainer() {
panel_container->add_child(no_results_container);
no_results_label = memnew(Label);
+ no_results_label->set_focus_mode(FOCUS_ACCESSIBILITY);
no_results_label->add_theme_font_size_override(SceneStringName(font_size), 24 * EDSCALE);
no_results_container->add_child(no_results_label);
no_results_container->hide();
@@ -245,6 +246,7 @@ QuickOpenResultContainer::QuickOpenResultContainer() {
{
// Selected filepath
file_details_path = memnew(Label);
+ file_details_path->set_focus_mode(FOCUS_ACCESSIBILITY);
file_details_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
file_details_path->set_horizontal_alignment(HorizontalAlignment::HORIZONTAL_ALIGNMENT_CENTER);
file_details_path->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
diff --git a/editor/gui/editor_toaster.cpp b/editor/gui/editor_toaster.cpp
index e4707b40b82..0b98635089f 100644
--- a/editor/gui/editor_toaster.cpp
+++ b/editor/gui/editor_toaster.cpp
@@ -435,6 +435,7 @@ void EditorToaster::_popup_str(const String &p_message, Severity p_severity, con
hb->add_theme_constant_override("separation", 0);
Label *label = memnew(Label);
+ label->set_focus_mode(FOCUS_ACCESSIBILITY);
hb->add_child(label);
Label *count_label = memnew(Label);
diff --git a/editor/gui/editor_validation_panel.cpp b/editor/gui/editor_validation_panel.cpp
index a4ca743bd78..11a77632664 100644
--- a/editor/gui/editor_validation_panel.cpp
+++ b/editor/gui/editor_validation_panel.cpp
@@ -64,6 +64,7 @@ void EditorValidationPanel::add_line(int p_id, const String &p_valid_message) {
ERR_FAIL_COND(valid_messages.has(p_id));
Label *label = memnew(Label);
+ label->set_focus_mode(FOCUS_ACCESSIBILITY);
message_container->add_child(label);
label->set_custom_minimum_size(Size2(200 * EDSCALE, 0));
label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp
index a7b836612ef..3376f9435d4 100644
--- a/editor/gui/scene_tree_editor.cpp
+++ b/editor/gui/scene_tree_editor.cpp
@@ -2176,6 +2176,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
VBoxContainer *vb = memnew(VBoxContainer);
revoke_dialog->add_child(vb);
revoke_dialog_label = memnew(Label);
+ revoke_dialog_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
vb->add_child(revoke_dialog_label);
ask_before_revoke_checkbox = memnew(CheckBox(TTR("Don't Ask Again")));
ask_before_revoke_checkbox->set_tooltip_text(TTR("This dialog can also be enabled/disabled in the Editor Settings: Docks > Scene Tree > Ask Before Revoking Unique Name."));
@@ -2255,6 +2256,7 @@ void SceneTreeDialog::set_valid_types(const Vector &p_valid) {
Label *label = memnew(Label);
hb->add_child(label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_text(name);
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
}
diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp
index 5bb860f6577..3cba6e2c622 100644
--- a/editor/import/dynamic_font_import_settings.cpp
+++ b/editor/import/dynamic_font_import_settings.cpp
@@ -1362,6 +1362,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
root_vb->add_child(main_pages);
label_warn = memnew(Label);
+ label_warn->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label_warn->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
label_warn->set_text("");
root_vb->add_child(label_warn);
@@ -1374,6 +1375,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
main_pages->add_child(page1_vb);
page1_description = memnew(Label);
+ page1_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
page1_description->set_text(TTR("Select font rendering options, fallback font, and metadata override:"));
page1_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
page1_vb->add_child(page1_description);
@@ -1389,6 +1391,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
page1_hb->add_child(page1_lbl_vb);
font_name_label = memnew(Label);
+ font_name_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
font_name_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
font_name_label->set_clip_text(true);
font_name_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1415,6 +1418,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
main_pages->add_child(page2_vb);
page2_description = memnew(Label);
+ page2_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
page2_description->set_text(TTR("Add font size, and variation coordinates, and select glyphs to pre-render:"));
page2_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
page2_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
@@ -1446,6 +1450,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
vars_list = memnew(Tree);
vars_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
+ vars_list->set_accessibility_name(TTRC("Configuration"));
vars_list->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
vars_list->set_hide_root(true);
vars_list->set_columns(2);
@@ -1477,6 +1482,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
preload_pages_vb->add_child(gl_hb);
label_glyphs = memnew(Label);
+ label_glyphs->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label_glyphs->set_text(vformat(TTR("Preloaded glyphs: %d"), 0));
label_glyphs->set_custom_minimum_size(Size2(50 * EDSCALE, 0));
gl_hb->add_child(label_glyphs);
@@ -1491,6 +1497,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
preload_pages->add_child(page2_0_vb);
page2_0_description = memnew(Label);
+ page2_0_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
page2_0_description->set_text(TTR("Select translations to add all required glyphs to pre-render list:"));
page2_0_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
page2_0_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
@@ -1524,6 +1531,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
preload_pages->add_child(page2_1_vb);
page2_1_description = memnew(Label);
+ page2_1_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
page2_1_description->set_text(TTR("Enter a text and select OpenType features to shape and add all required glyphs to pre-render list:"));
page2_1_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
page2_1_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
@@ -1562,6 +1570,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
preload_pages->add_child(page2_2_vb);
page2_2_description = memnew(Label);
+ page2_2_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
page2_2_description->set_text(TTR("Add or remove glyphs from the character map to pre-render list:\nNote: Some stylistic alternatives and glyph variants do not have one-to-one correspondence to character, and not shown in this map, use \"Glyphs from the text\" tab to add these."));
page2_2_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
page2_2_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 1bbd06111bf..706e0e10d2c 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -752,6 +752,7 @@ ImportDock::ImportDock() {
content->hide();
imported = memnew(Label);
+ imported->set_focus_mode(FOCUS_ACCESSIBILITY);
imported->add_theme_style_override(CoreStringName(normal), EditorNode::get_singleton()->get_editor_theme()->get_stylebox(CoreStringName(normal), SNAME("LineEdit")));
imported->set_clip_text(true);
content->add_child(imported);
@@ -813,6 +814,7 @@ ImportDock::ImportDock() {
params = memnew(ImportDockParameters);
select_a_resource = memnew(Label);
+ select_a_resource->set_focus_mode(FOCUS_ACCESSIBILITY);
select_a_resource->set_text(TTRC("Select a resource file in the filesystem or in the inspector to adjust import settings."));
select_a_resource->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
select_a_resource->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp
index 84168e11423..c1e5e014853 100644
--- a/editor/input_event_configuration_dialog.cpp
+++ b/editor/input_event_configuration_dialog.cpp
@@ -643,6 +643,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
add_child(main_vbox);
event_as_text = memnew(Label);
+ event_as_text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
event_as_text->set_custom_minimum_size(Size2(500, 0) * EDSCALE);
event_as_text->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
event_as_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 6521580c588..14bf3c55ff5 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -841,6 +841,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
unique_resources_confirmation->add_child(container);
unique_resources_label = memnew(Label);
+ unique_resources_label->set_focus_mode(FOCUS_ACCESSIBILITY);
container->add_child(unique_resources_label);
unique_resources_list_tree = memnew(Tree);
@@ -851,6 +852,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
container->add_child(unique_resources_list_tree);
Label *bottom_label = memnew(Label);
+ bottom_label->set_focus_mode(FOCUS_ACCESSIBILITY);
bottom_label->set_text(TTRC("This cannot be undone. Are you sure?"));
container->add_child(bottom_label);
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index 0865c080e63..3012d44aa35 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -147,6 +147,7 @@ NodeDock::NodeDock() {
groups->hide();
select_a_node = memnew(Label);
+ select_a_node->set_focus_mode(FOCUS_ACCESSIBILITY);
select_a_node->set_text(TTRC("Select a single node to edit its signals and groups."));
select_a_node->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
select_a_node->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 407a9bec97f..e285ffb470c 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -805,6 +805,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
add_child(error_panel);
error_label = memnew(Label);
+ error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
error_panel->add_child(error_label);
menu = memnew(PopupMenu);
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 934300d45d4..4abc76f46b5 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -1088,6 +1088,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
error_panel = memnew(PanelContainer);
add_child(error_panel);
error_label = memnew(Label);
+ error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
error_panel->add_child(error_label);
set_custom_minimum_size(Size2(0, 300 * EDSCALE));
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 137dffc031b..add71c668af 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -1222,6 +1222,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
error_panel = memnew(PanelContainer);
add_child(error_panel);
error_label = memnew(Label);
+ error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
error_panel->add_child(error_label);
error_label->set_text("eh");
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 943451584cb..8998f0c3c4a 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -1861,6 +1861,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
error_panel = memnew(PanelContainer);
add_child(error_panel);
error_label = memnew(Label);
+ error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
error_panel->add_child(error_label);
error_panel->hide();
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 394622ac992..5acd4ae7ea2 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -186,6 +186,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
label_margin->set_content_margin_all(0);
price = memnew(Label);
+ price->set_focus_mode(FOCUS_ACCESSIBILITY);
price->add_theme_style_override(CoreStringName(normal), label_margin);
price->set_tooltip_text(TTR("License"));
price->set_accessibility_name(TTRC("License"));
@@ -579,6 +580,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
HBoxContainer *title_hb = memnew(HBoxContainer);
vb->add_child(title_hb);
title = memnew(Label);
+ title->set_focus_mode(FOCUS_ACCESSIBILITY);
title_hb->add_child(title);
title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1713,6 +1715,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
library_vb->add_child(library_message_box);
library_message = memnew(Label);
+ library_message->set_focus_mode(FOCUS_ACCESSIBILITY);
library_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
library_message_box->add_child(library_message);
@@ -1746,6 +1749,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
error_hb = memnew(HBoxContainer);
library_main->add_child(error_hb);
error_label = memnew(Label);
+ error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
error_hb->add_child(error_label);
error_tr = memnew(TextureRect);
error_tr->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
diff --git a/editor/plugins/bit_map_editor_plugin.cpp b/editor/plugins/bit_map_editor_plugin.cpp
index 7d5724efb78..125673ff2ba 100644
--- a/editor/plugins/bit_map_editor_plugin.cpp
+++ b/editor/plugins/bit_map_editor_plugin.cpp
@@ -85,6 +85,7 @@ BitMapEditor::BitMapEditor() {
centering_container->add_child(outline_overlay);
size_label = memnew(Label);
+ size_label->set_focus_mode(FOCUS_ACCESSIBILITY);
size_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
add_child(size_label);
diff --git a/editor/plugins/camera_2d_editor_plugin.cpp b/editor/plugins/camera_2d_editor_plugin.cpp
index ec6db977d70..e35e1a0b826 100644
--- a/editor/plugins/camera_2d_editor_plugin.cpp
+++ b/editor/plugins/camera_2d_editor_plugin.cpp
@@ -156,6 +156,7 @@ Camera2DEditorPlugin::Camera2DEditorPlugin() {
camera_2d_editor->connect(SNAME("_editor_theme_changed"), callable_mp(this, &Camera2DEditorPlugin::_editor_theme_changed));
approach_to_move_rect = memnew(Label);
+ approach_to_move_rect->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
approach_to_move_rect->set_text(TTRC("In Move Mode: \nHold Ctrl + left mouse button to move the limit rectangle.\nHold left mouse button to move the camera only."));
approach_to_move_rect->hide();
_editor_theme_changed();
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 28749170e24..cd333949ca5 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -6445,6 +6445,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_it
canvas_item_editor->get_controls_container()->add_child(label);
label_desc = memnew(Label);
+ label_desc->set_focus_mode(FOCUS_ACCESSIBILITY);
label_desc->add_theme_color_override(SceneStringName(font_color), Color(0.6f, 0.6f, 0.6f, 1));
label_desc->add_theme_color_override("font_shadow_color", Color(0.2f, 0.2f, 0.2f, 1));
label_desc->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE);
diff --git a/editor/plugins/input_event_editor_plugin.cpp b/editor/plugins/input_event_editor_plugin.cpp
index 0c3ceff9776..7646da347d5 100644
--- a/editor/plugins/input_event_editor_plugin.cpp
+++ b/editor/plugins/input_event_editor_plugin.cpp
@@ -79,6 +79,7 @@ void InputEventConfigContainer::set_event(const Ref &p_event) {
InputEventConfigContainer::InputEventConfigContainer() {
input_event_text = memnew(Label);
+ input_event_text->set_focus_mode(FOCUS_ACCESSIBILITY);
input_event_text->set_h_size_flags(SIZE_EXPAND_FILL);
input_event_text->set_autowrap_mode(TextServer::AutowrapMode::AUTOWRAP_WORD_SMART);
input_event_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 26161db2434..ef970b1a2be 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -230,6 +230,7 @@ MaterialEditor::MaterialEditor() {
layout_error->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
error_label = memnew(Label);
+ error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
error_label->set_text(TTR("Preview is not available for this shader mode."));
error_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
error_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index f975fd6edb3..480bcedb606 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -668,6 +668,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
navigation_mesh_dialog->add_child(navigation_mesh_dialog_vbc);
Label *navigation_mesh_l = memnew(Label);
+ navigation_mesh_l->set_focus_mode(FOCUS_ACCESSIBILITY);
navigation_mesh_l->set_text(TTR("Before converting a rendering mesh to a navigation mesh, please verify:\n\n- The mesh is two-dimensional.\n- The mesh has no surface overlap.\n- The mesh has no self-intersection.\n- The mesh surfaces have indices.\n\nIf the mesh does not fulfill these requirements, the pathfinding will be broken."));
navigation_mesh_dialog_vbc->add_child(navigation_mesh_l);
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index 777eb7aeeed..8c00caddee4 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -158,6 +158,7 @@ NavigationPolygonEditor::NavigationPolygonEditor() {
button_reset->connect(SceneStringName(pressed), callable_mp(this, &NavigationPolygonEditor::_clear_pressed));
bake_info = memnew(Label);
+ bake_info->set_focus_mode(FOCUS_ACCESSIBILITY);
bake_hbox->add_child(bake_info);
rebake_timer = memnew(Timer);
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 3e5c82e1f0c..01244be70bb 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -5769,6 +5769,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
info_panel->hide();
info_label = memnew(Label);
+ info_label->set_focus_mode(FOCUS_ACCESSIBILITY);
info_panel->add_child(info_label);
cinema_label = memnew(Label);
@@ -5805,6 +5806,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
surface->add_child(preview_material_label);
preview_material_label_desc = memnew(Label);
+ preview_material_label_desc->set_focus_mode(FOCUS_ACCESSIBILITY);
preview_material_label_desc->set_anchors_and_offsets_preset(LayoutPreset::PRESET_BOTTOM_LEFT);
preview_material_label_desc->set_offset(Side::SIDE_TOP, -50 * EDSCALE);
Key key = (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) ? Key::META : Key::CTRL;
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 1170382e99a..0731818be1c 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1784,7 +1784,10 @@ void ScriptEditor::_notification(int p_what) {
[[fallthrough]];
}
- case NOTIFICATION_TRANSLATION_CHANGED:
+ case NOTIFICATION_TRANSLATION_CHANGED: {
+ disk_changed_list->set_accessibility_name(TTR("The following files are newer on disk"));
+ [[fallthrough]];
+ }
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_THEME_CHANGED: {
tab_container->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("ScriptEditor"), EditorStringName(EditorStyles)));
@@ -4227,6 +4230,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
overview_vbox->add_child(buttons_hbox);
filename = memnew(Label);
+ filename->set_focus_mode(FOCUS_ACCESSIBILITY);
filename->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
filename->set_clip_text(true);
filename->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -4385,6 +4389,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
script_icon = memnew(TextureRect);
menu_hb->add_child(script_icon);
script_name_label = memnew(Label);
+ script_name_label->set_focus_mode(FOCUS_ACCESSIBILITY);
menu_hb->add_child(script_name_label);
script_icon->hide();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 09f95abdbad..06e8833bf7b 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -99,6 +99,7 @@ ConnectionInfoDialog::ConnectionInfoDialog() {
add_child(vbc);
method = memnew(Label);
+ method->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
method->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
vbc->add_child(method);
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index f03c55a9914..2c7d0c951c8 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -2045,6 +2045,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
delete_anim->set_shortcut(ED_SHORTCUT("sprite_frames/delete_animation", TTRC("Delete Animation"), Key::KEY_DELETE));
missing_anim_label = memnew(Label);
+ missing_anim_label->set_focus_mode(FOCUS_ACCESSIBILITY);
missing_anim_label->set_text(TTR("This resource does not have any animations."));
missing_anim_label->set_h_size_flags(SIZE_EXPAND_FILL);
missing_anim_label->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
index 48d25952305..ee620f83a97 100644
--- a/editor/plugins/text_shader_editor.cpp
+++ b/editor/plugins/text_shader_editor.cpp
@@ -1257,6 +1257,7 @@ TextShaderEditor::TextShaderEditor() {
disk_changed->add_child(vbc);
Label *dl = memnew(Label);
+ dl->set_focus_mode(FOCUS_ACCESSIBILITY);
dl->set_text(TTR("This shader has been modified on disk.\nWhat action should be taken?"));
vbc->add_child(dl);
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp
index 094ec99d82d..b3500e4ca50 100644
--- a/editor/plugins/texture_3d_editor_plugin.cpp
+++ b/editor/plugins/texture_3d_editor_plugin.cpp
@@ -265,6 +265,7 @@ Texture3DEditor::Texture3DEditor() {
add_child(channel_selector);
info = memnew(Label);
+ info->set_focus_mode(FOCUS_ACCESSIBILITY);
info->add_theme_color_override(SceneStringName(font_color), Color(1, 1, 1));
info->add_theme_color_override("font_shadow_color", Color(0, 0, 0));
info->add_theme_font_size_override(SceneStringName(font_size), 14 * EDSCALE);
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 5adc6406bc3..cf4e06b3a1b 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -284,6 +284,7 @@ TexturePreview::TexturePreview(Ref p_texture, bool p_show_metadata) {
if (p_show_metadata) {
metadata_label = memnew(Label);
+ metadata_label->set_focus_mode(FOCUS_ACCESSIBILITY);
if (p_texture.is_valid()) {
_update_metadata_label_text();
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index b261bd0ea36..56263ca5a98 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -403,6 +403,7 @@ TextureLayeredEditor::TextureLayeredEditor() {
add_child(channel_selector);
info = memnew(Label);
+ info->set_focus_mode(FOCUS_ACCESSIBILITY);
info->add_theme_color_override(SceneStringName(font_color), Color(1, 1, 1));
info->add_theme_color_override("font_shadow_color", Color(0, 0, 0));
info->add_theme_font_size_override(SceneStringName(font_size), 14 * EDSCALE);
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index 000915731b2..91aedf1893f 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -352,6 +352,7 @@ AtlasMergingDialog::AtlasMergingDialog() {
atlas_merging_right_panel->add_child(preview);
select_2_atlases_label = memnew(Label);
+ select_2_atlases_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
select_2_atlases_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
select_2_atlases_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
select_2_atlases_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp
index 1fb89945aa2..24272a188a6 100644
--- a/editor/plugins/tiles/tile_atlas_view.cpp
+++ b/editor/plugins/tiles/tile_atlas_view.cpp
@@ -666,6 +666,7 @@ TileAtlasView::TileAtlasView() {
panel->add_child(center_container);
missing_source_label = memnew(Label);
+ missing_source_label->set_focus_mode(FOCUS_ACCESSIBILITY);
missing_source_label->set_text(TTR("The selected atlas source has no valid texture. Assign a texture in the TileSet bottom tab."));
center_container->add_child(missing_source_label);
diff --git a/editor/plugins/tiles/tile_map_layer_editor.cpp b/editor/plugins/tiles/tile_map_layer_editor.cpp
index 4bd0ae138b7..d823e5caff8 100644
--- a/editor/plugins/tiles/tile_map_layer_editor.cpp
+++ b/editor/plugins/tiles/tile_map_layer_editor.cpp
@@ -2389,6 +2389,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
tiles_bottom_panel->set_name(TTR("Tiles"));
missing_source_label = memnew(Label);
+ missing_source_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
missing_source_label->set_text(TTR("This TileMap's TileSet has no Tile Source configured. Go to the TileSet bottom panel to add one."));
missing_source_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
missing_source_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -2480,6 +2481,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
// Invalid source label.
invalid_source_label = memnew(Label);
+ invalid_source_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
invalid_source_label->set_text(TTR("Invalid source selected."));
invalid_source_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
invalid_source_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -2509,6 +2511,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
patterns_bottom_panel->add_child(patterns_item_list);
patterns_help_label = memnew(Label);
+ patterns_help_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
patterns_help_label->set_text(TTR("Drag and drop or paste a TileMap selection here to store a pattern."));
patterns_help_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
@@ -4552,6 +4555,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
// A label for editing errors.
cant_edit_label = memnew(Label);
+ cant_edit_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
cant_edit_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
cant_edit_label->set_anchors_and_offsets_preset(Control::PRESET_HCENTER_WIDE);
cant_edit_label->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 6fd24a38642..419cc35d7b8 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -2575,6 +2575,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
middle_vbox_container->add_child(tile_inspector);
tile_inspector_no_tile_selected_label = memnew(Label);
+ tile_inspector_no_tile_selected_label->set_focus_mode(FOCUS_ACCESSIBILITY);
tile_inspector_no_tile_selected_label->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
tile_inspector_no_tile_selected_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
tile_inspector_no_tile_selected_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
@@ -2668,6 +2669,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tool_settings->add_child(middle_space);
tool_tile_id_label = memnew(Label);
+ tool_tile_id_label->set_focus_mode(FOCUS_ACCESSIBILITY);
tool_tile_id_label->set_mouse_filter(Control::MOUSE_FILTER_STOP);
tool_settings->add_child(tool_tile_id_label);
_update_tile_id_label();
@@ -2688,6 +2690,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
right_panel->add_child(tile_atlas_view);
help_label = memnew(Label);
+ help_label->set_focus_mode(FOCUS_ACCESSIBILITY);
help_label->set_mouse_filter(MOUSE_FILTER_IGNORE);
help_label->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
help_label->set_vertical_alignment(VERTICAL_ALIGNMENT_BOTTOM);
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index e30527efaf1..1fd0dee93f0 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -915,6 +915,7 @@ TileSetEditor::TileSetEditor() {
// No source selected.
no_source_selected_label = memnew(Label);
+ no_source_selected_label->set_focus_mode(FOCUS_ACCESSIBILITY);
no_source_selected_label->set_text(TTR("No TileSet source selected. Select or create a TileSet source.\nYou can create a new source by using the Add button on the left or by dropping a tileset texture onto the source list."));
no_source_selected_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
no_source_selected_label->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
@@ -956,6 +957,7 @@ TileSetEditor::TileSetEditor() {
patterns_item_list->hide();
patterns_help_label = memnew(Label);
+ patterns_help_label->set_focus_mode(FOCUS_ACCESSIBILITY);
patterns_help_label->set_text(TTR("Add new patterns in the TileMap editing mode."));
patterns_help_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
index 06b7be6c988..1b04f777808 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
@@ -525,6 +525,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
// Scenes collection source inspector.
scenes_collection_source_inspector_label = memnew(Label);
+ scenes_collection_source_inspector_label->set_focus_mode(FOCUS_ACCESSIBILITY);
scenes_collection_source_inspector_label->set_text(TTR("Scenes collection properties:"));
middle_vbox_container->add_child(scenes_collection_source_inspector_label);
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index ecf7eafe59b..91c14749fc1 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -1139,6 +1139,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_ssh_passphrase_input->add_child(set_up_ssh_passphrase);
set_up_warning_text = memnew(Label);
+ set_up_warning_text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
set_up_warning_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
set_up_warning_text->set_h_size_flags(Control::SIZE_EXPAND_FILL);
set_up_settings_vbc->add_child(set_up_warning_text);
@@ -1503,6 +1504,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
version_control_dock->add_child(diff_heading);
diff_title = memnew(Label);
+ diff_title->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
diff_title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
diff_heading->add_child(diff_title);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index ad1444b5cc9..b89c2806a63 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -762,6 +762,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
// Add hint label.
Label *frame_hint_label = memnew(Label);
+ frame_hint_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
node->add_child(frame_hint_label);
frame_hint_label->set_horizontal_alignment(HorizontalAlignment::HORIZONTAL_ALIGNMENT_CENTER);
frame_hint_label->set_vertical_alignment(VerticalAlignment::VERTICAL_ALIGNMENT_CENTER);
@@ -878,6 +879,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
String prop_name = dp.name.strip_edges();
if (!prop_name.is_empty()) {
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_auto_translate_mode(Node::AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
label->set_text(prop_name + ":");
hbox->add_child(label);
@@ -1151,6 +1153,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
hb->add_child(remove_btn);
} else {
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_auto_translate_mode(Node::AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
label->set_text(name_left);
label->add_theme_style_override(CoreStringName(normal), editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor")));
@@ -1158,6 +1161,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
if (vsnode->is_input_port_default(j, mode) && !port_left_used) {
Label *hint_label = memnew(Label);
+ hint_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
hint_label->set_text(TTR("[default]"));
hint_label->add_theme_color_override(SceneStringName(font_color), editor->get_theme_color(SNAME("font_readonly_color"), SNAME("TextEdit")));
hint_label->add_theme_style_override(CoreStringName(normal), editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor")));
@@ -1201,6 +1205,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
type_box->connect(SceneStringName(item_selected), callable_mp(editor, &VisualShaderEditor::_change_output_port_type).bind(p_id, i), CONNECT_DEFERRED);
} else {
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_auto_translate_mode(Node::AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
label->set_text(name_right);
label->add_theme_style_override(CoreStringName(normal), editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor"))); //more compact
@@ -1369,6 +1374,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
}
if (!error.is_empty()) {
Label *error_label = memnew(Label);
+ error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
error_label->add_theme_color_override(SceneStringName(font_color), editor->get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
error_label->set_text(error);
error_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
@@ -6142,6 +6148,7 @@ Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
d["id"] = id;
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_text(it->get_text(0));
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
set_drag_preview(label);
@@ -6525,6 +6532,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SAMPLER, VisualShaderNode::PORT_TYPE_SAMPLER);
info_label = memnew(Label);
+ info_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
info_label->set_text(vformat(TTR("Hold %s Key To Swap Connections"), keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL)));
info_label->set_anchors_and_offsets_preset(Control::PRESET_BOTTOM_WIDE, PRESET_MODE_MINSIZE, 20);
info_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
@@ -6689,6 +6697,7 @@ VisualShaderEditor::VisualShaderEditor() {
error_panel->set_visible(false);
error_label = memnew(Label);
+ error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
error_panel->add_child(error_label);
error_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
@@ -6842,6 +6851,7 @@ VisualShaderEditor::VisualShaderEditor() {
desc_hbox->add_spacer();
highend_label = memnew(Label);
+ highend_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
desc_hbox->add_child(highend_label);
highend_label->set_visible(false);
highend_label->set_text("Vulkan");
@@ -6908,6 +6918,7 @@ VisualShaderEditor::VisualShaderEditor() {
varying_mode->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_varying_mode_changed));
varying_error_label = memnew(Label);
+ varying_error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
vb->add_child(varying_error_label);
varying_error_label->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -7999,6 +8010,7 @@ public:
add_child(hbox);
Label *prop_name = memnew(Label);
+ prop_name->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
String prop_name_str = p_names[i];
if (p_overrided_names.has(p_names[i])) {
prop_name_str = p_overrided_names[p_names[i]] + ":";
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 7dfa9fc9138..ed6faf060a4 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1461,7 +1461,6 @@ ProjectManager::ProjectManager() {
sort_label = memnew(Label);
sort_label->set_text(TTRC("Sort:"));
- sort_label->set_focus_mode(Control::FOCUS_NONE);
hb->add_child(sort_label);
filter_option = memnew(OptionButton);
@@ -1535,6 +1534,7 @@ ProjectManager::ProjectManager() {
empty_list_open_assetlib->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_open_asset_library_confirmed));
empty_list_online_warning = memnew(Label);
+ empty_list_online_warning->set_focus_mode(FOCUS_ACCESSIBILITY);
empty_list_online_warning->set_horizontal_alignment(HorizontalAlignment::HORIZONTAL_ALIGNMENT_CENTER);
empty_list_online_warning->set_custom_minimum_size(Size2(220, 0) * EDSCALE);
empty_list_online_warning->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
@@ -1679,6 +1679,7 @@ ProjectManager::ProjectManager() {
erase_ask->add_child(erase_ask_vb);
erase_ask_label = memnew(Label);
+ erase_ask_label->set_focus_mode(FOCUS_ACCESSIBILITY);
erase_ask_vb->add_child(erase_ask_label);
// Comment out for now until we have a better warning system to
@@ -1710,6 +1711,7 @@ ProjectManager::ProjectManager() {
ask_update_vb = memnew(VBoxContainer);
ask_update_settings->add_child(ask_update_vb);
ask_update_label = memnew(Label);
+ ask_update_label->set_focus_mode(FOCUS_ACCESSIBILITY);
ask_update_label->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
ask_update_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
ask_update_label->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1809,6 +1811,7 @@ ProjectManager::ProjectManager() {
create_tag_dialog->connect("about_to_popup", callable_mp((Control *)new_tag_name, &Control::grab_focus), CONNECT_DEFERRED);
tag_error = memnew(Label);
+ tag_error->set_focus_mode(FOCUS_ACCESSIBILITY);
tag_vb->add_child(tag_error);
create_tag_btn = memnew(Button);
diff --git a/editor/project_manager/project_dialog.cpp b/editor/project_manager/project_dialog.cpp
index 4734112df40..38fd094ae84 100644
--- a/editor/project_manager/project_dialog.cpp
+++ b/editor/project_manager/project_dialog.cpp
@@ -1011,6 +1011,7 @@ ProjectDialog::ProjectDialog() {
iphb->add_child(install_browse);
msg = memnew(Label);
+ msg->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
msg->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
msg->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
msg->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
@@ -1086,10 +1087,12 @@ ProjectDialog::ProjectDialog() {
rvb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
rshc->add_child(rvb);
renderer_info = memnew(Label);
+ renderer_info->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
renderer_info->set_modulate(Color(1, 1, 1, 0.7));
rvb->add_child(renderer_info);
rd_not_supported = memnew(Label);
+ rd_not_supported->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
rd_not_supported->set_text(vformat(TTRC("RenderingDevice-based methods not available on this GPU:\n%s\nPlease use the Compatibility renderer."), RenderingServer::get_singleton()->get_video_adapter_name()));
rd_not_supported->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
rd_not_supported->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
@@ -1100,6 +1103,7 @@ ProjectDialog::ProjectDialog() {
_renderer_selected();
l = memnew(Label);
+ l->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
l->set_text(TTRC("The renderer can be changed later, but scenes may need to be adjusted."));
// Add some extra spacing to separate it from the list above and the buttons below.
l->set_custom_minimum_size(Size2(0, 40) * EDSCALE);
@@ -1118,6 +1122,7 @@ ProjectDialog::ProjectDialog() {
vcs_metadata_selection->add_item(TTRC("None"), (int)EditorVCSInterface::VCSMetadata::NONE);
vcs_metadata_selection->add_item(TTRC("Git"), (int)EditorVCSInterface::VCSMetadata::GIT);
vcs_metadata_selection->select((int)EditorVCSInterface::VCSMetadata::GIT);
+ vcs_metadata_selection->set_accessibility_name(TTRC("Version Control Metadata"));
default_files_container->add_child(vcs_metadata_selection);
Control *spacer = memnew(Control);
spacer->set_h_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/project_manager/project_list.cpp b/editor/project_manager/project_list.cpp
index 72ba88a5774..ee889ea337d 100644
--- a/editor/project_manager/project_list.cpp
+++ b/editor/project_manager/project_list.cpp
@@ -357,6 +357,7 @@ ProjectListItemControl::ProjectListItemControl() {
main_vbox->add_child(title_hb);
project_title = memnew(Label);
+ project_title->set_focus_mode(FOCUS_ACCESSIBILITY);
project_title->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
project_title->set_name("ProjectName");
project_title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -387,6 +388,7 @@ ProjectListItemControl::ProjectListItemControl() {
project_path = memnew(Label);
project_path->set_name("ProjectPath");
+ project_path->set_focus_mode(FOCUS_ACCESSIBILITY);
project_path->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_FILE);
project_path->set_clip_text(true);
project_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -400,11 +402,13 @@ ProjectListItemControl::ProjectListItemControl() {
project_unsupported_features->hide();
project_version = memnew(Label);
+ project_version->set_focus_mode(FOCUS_ACCESSIBILITY);
project_version->set_name("ProjectVersion");
project_version->set_mouse_filter(Control::MOUSE_FILTER_PASS);
path_hb->add_child(project_version);
last_edited_info = memnew(Label);
+ last_edited_info->set_focus_mode(FOCUS_ACCESSIBILITY);
last_edited_info->set_name("LastEditedInfo");
last_edited_info->set_mouse_filter(Control::MOUSE_FILTER_PASS);
last_edited_info->set_tooltip_text(TTRC("Last edited timestamp"));
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index cf9f8080b36..80f02bf1e9b 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -734,6 +734,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
restart_hb->add_child(restart_icon);
restart_label = memnew(Label);
+ restart_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
restart_label->set_text(TTR("Changed settings will be applied to the editor after restarting."));
restart_hb->add_child(restart_label);
restart_hb->add_spacer();
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 153d663691f..1302847e45f 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -293,6 +293,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor) {
vbc->add_child(lbl_preview_title);
lbl_preview = memnew(Label);
+ lbl_preview->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
lbl_preview->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
lbl_preview->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
vbc->add_child(lbl_preview);
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 8d088b57781..6fe27a5ae21 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -4846,6 +4846,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
delete_dialog->add_child(vb);
delete_dialog_label = memnew(Label);
+ delete_dialog_label->set_focus_mode(FOCUS_ACCESSIBILITY);
vb->add_child(delete_dialog_label);
delete_tracks_checkbox = memnew(CheckBox(TTR("Delete Related Animation Tracks")));
diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp
index c55b9ba20f5..5bada389638 100644
--- a/modules/gltf/editor/editor_scene_importer_blend.cpp
+++ b/modules/gltf/editor/editor_scene_importer_blend.cpp
@@ -529,6 +529,7 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() {
vb->add_child(hb);
path_status = memnew(Label);
+ path_status->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
vb->add_child(path_status);
configure_blender_dialog->add_child(vb);
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index e52fa217701..834c230f0e0 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -1594,6 +1594,7 @@ GridMapEditor::GridMapEditor() {
mesh_library_palette->connect(SceneStringName(gui_input), callable_mp(this, &GridMapEditor::_mesh_library_palette_input));
info_message = memnew(Label);
+ info_message->set_focus_mode(FOCUS_ACCESSIBILITY);
info_message->set_text(TTR("Give a MeshLibrary resource to this GridMap to use its meshes."));
info_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
diff --git a/modules/multiplayer/editor/editor_network_profiler.cpp b/modules/multiplayer/editor/editor_network_profiler.cpp
index 0c0f5a45d1e..0790b6b7a75 100644
--- a/modules/multiplayer/editor/editor_network_profiler.cpp
+++ b/modules/multiplayer/editor/editor_network_profiler.cpp
@@ -332,6 +332,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
Label *lb = memnew(Label);
// TRANSLATORS: This is the label for the network profiler's incoming bandwidth.
+ lb->set_focus_mode(FOCUS_ACCESSIBILITY);
lb->set_text(TTR("Down", "Network"));
hb->add_child(lb);
@@ -348,6 +349,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
lb = memnew(Label);
// TRANSLATORS: This is the label for the network profiler's outgoing bandwidth.
+ lb->set_focus_mode(FOCUS_ACCESSIBILITY);
lb->set_text(TTR("Up", "Network"));
hb->add_child(lb);
diff --git a/modules/multiplayer/editor/replication_editor.cpp b/modules/multiplayer/editor/replication_editor.cpp
index 797d2cf320f..90232aa0f84 100644
--- a/modules/multiplayer/editor/replication_editor.cpp
+++ b/modules/multiplayer/editor/replication_editor.cpp
@@ -275,6 +275,7 @@ ReplicationEditor::ReplicationEditor() {
vb->add_child(tree);
drop_label = memnew(Label);
+ drop_label->set_focus_mode(FOCUS_ACCESSIBILITY);
drop_label->set_text(TTR("Add properties using the options above, or\ndrag them from the inspector and drop them here."));
drop_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
drop_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
diff --git a/modules/navigation_3d/editor/navigation_mesh_editor_plugin.cpp b/modules/navigation_3d/editor/navigation_mesh_editor_plugin.cpp
index f41dfa6af7e..7ce798b4550 100644
--- a/modules/navigation_3d/editor/navigation_mesh_editor_plugin.cpp
+++ b/modules/navigation_3d/editor/navigation_mesh_editor_plugin.cpp
@@ -140,6 +140,7 @@ NavigationMeshEditor::NavigationMeshEditor() {
button_reset->connect(SceneStringName(pressed), callable_mp(this, &NavigationMeshEditor::_clear_pressed));
bake_info = memnew(Label);
+ bake_info->set_focus_mode(FOCUS_ACCESSIBILITY);
bake_hbox->add_child(bake_info);
err_dialog = memnew(AcceptDialog);
diff --git a/modules/openxr/editor/openxr_binding_modifiers_dialog.cpp b/modules/openxr/editor/openxr_binding_modifiers_dialog.cpp
index b8fc502974a..4bf2556a2dc 100644
--- a/modules/openxr/editor/openxr_binding_modifiers_dialog.cpp
+++ b/modules/openxr/editor/openxr_binding_modifiers_dialog.cpp
@@ -204,6 +204,7 @@ OpenXRBindingModifiersDialog::OpenXRBindingModifiersDialog() {
binding_modifier_sc->add_child(binding_modifiers_vb);
binding_warning_label = memnew(Label);
+ binding_warning_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
binding_warning_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
binding_warning_label->set_text(TTR("Note: modifiers will only be applied if supported on the host system."));
binding_modifiers_vb->add_child(binding_warning_label);
diff --git a/modules/openxr/editor/openxr_interaction_profile_editor.cpp b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
index f4f26aebff3..8fe6fd00556 100644
--- a/modules/openxr/editor/openxr_interaction_profile_editor.cpp
+++ b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
@@ -242,6 +242,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
p_container->add_child(path_hb);
Label *path_label = memnew(Label);
+ path_label->set_focus_mode(FOCUS_ACCESSIBILITY);
if (p_io_path->openxr_extension_name.is_empty()) {
path_label->set_text(p_io_path->display_name);
} else {
@@ -252,6 +253,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
path_hb->add_child(path_label);
Label *type_label = memnew(Label);
+ type_label->set_focus_mode(FOCUS_ACCESSIBILITY);
switch (p_io_path->action_type) {
case OpenXRAction::OPENXR_ACTION_BOOL: {
type_label->set_text(TTR("Boolean"));
@@ -297,6 +299,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
action_hb->add_child(indent_node);
Label *action_label = memnew(Label);
+ action_label->set_focus_mode(FOCUS_ACCESSIBILITY);
action_label->set_text(action->get_name_with_set() + ": " + action->get_localized_name());
action_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
action_hb->add_child(action_label);
@@ -361,6 +364,7 @@ void OpenXRInteractionProfileEditor::_update_interaction_profile() {
panel->add_child(container);
Label *label = memnew(Label);
+ label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_text(OpenXRInteractionProfileMetadata::get_singleton()->get_top_level_name(top_level_paths[i]));
container->add_child(label);
diff --git a/modules/openxr/editor/openxr_select_action_dialog.cpp b/modules/openxr/editor/openxr_select_action_dialog.cpp
index 96f46006d28..2535d2b8773 100644
--- a/modules/openxr/editor/openxr_select_action_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_action_dialog.cpp
@@ -82,6 +82,7 @@ void OpenXRSelectActionDialog::open() {
Ref action_set = action_sets[i];
Label *action_set_label = memnew(Label);
+ action_set_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
action_set_label->set_text(action_set->get_localized_name());
main_vb->add_child(action_set_label);
diff --git a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
index 60a7eb2fab3..7b0250416da 100644
--- a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
@@ -126,6 +126,7 @@ OpenXRSelectInteractionProfileDialog::OpenXRSelectInteractionProfileDialog() {
scroll->add_child(main_vb);
all_selected = memnew(Label);
+ all_selected->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
all_selected->set_text(TTR("All interaction profiles have been added to the action map."));
main_vb->add_child(all_selected);
}
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index 557e71dd810..da01ff01002 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -394,6 +394,7 @@ MarginContainer *VBoxContainer::add_margin_child(const String &p_label, Control
if (p_expand) {
mc->set_v_size_flags(SIZE_EXPAND_FILL);
}
+ p_control->set_accessibility_name(p_label);
return mc;
}
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index a79ba285e9a..35df95facbb 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -463,6 +463,7 @@ AcceptDialog::AcceptDialog() {
buttons_hbox = memnew(HBoxContainer);
message_label = memnew(Label);
+ message_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
message_label->set_anchor(SIDE_RIGHT, Control::ANCHOR_END);
message_label->set_anchor(SIDE_BOTTOM, Control::ANCHOR_END);
add_child(message_label, false, INTERNAL_MODE_FRONT);
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index f335d82a519..a3e2291a786 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -1442,7 +1442,6 @@ void FileDialog::_update_option_controls() {
for (const FileDialog::Option &opt : options) {
Label *lbl = memnew(Label);
lbl->set_text(opt.name);
- lbl->set_focus_mode(Control::FOCUS_NONE);
grid_options->add_child(lbl);
if (opt.values.is_empty()) {
CheckBox *cb = memnew(CheckBox);
@@ -1753,7 +1752,6 @@ FileDialog::FileDialog() {
dir_up->connect(SceneStringName(pressed), callable_mp(this, &FileDialog::_go_up));
Label *lbl_path = memnew(Label(ETR("Path:")));
- lbl_path->set_focus_mode(Control::FOCUS_NONE);
hbc->add_child(lbl_path);
drives_container = memnew(HBoxContainer);
@@ -1813,6 +1811,7 @@ FileDialog::FileDialog() {
vbox->add_margin_child(ETR("Directories & Files:"), tree, true);
message = memnew(Label);
+ message->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
message->hide();
message->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
@@ -1833,7 +1832,6 @@ FileDialog::FileDialog() {
file_box = memnew(HBoxContainer);
Label *lbl_file = memnew(Label(ETR("File:")));
- lbl_file->set_focus_mode(Control::FOCUS_NONE);
file_box->add_child(lbl_file);
file = memnew(LineEdit);
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 45ac0e2e92e..e4d446af890 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -1264,7 +1264,6 @@ GraphNode::GraphNode() {
title_label = memnew(Label);
title_label->set_theme_type_variation("GraphNodeTitleLabel");
title_label->set_h_size_flags(SIZE_EXPAND_FILL);
- title_label->set_focus_mode(Control::FOCUS_NONE);
titlebar_hbox->add_child(title_label);
set_mouse_filter(MOUSE_FILTER_STOP);
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 6418125fc50..7b4211c2ea2 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -1484,7 +1484,6 @@ void Label::_bind_methods() {
}
Label::Label(const String &p_text) {
- set_focus_mode(FOCUS_ACCESSIBILITY);
set_mouse_filter(MOUSE_FILTER_IGNORE);
set_text(p_text);
set_v_size_flags(SIZE_SHRINK_CENTER);
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 87148d5e62d..4f3721be793 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -1041,6 +1041,7 @@ Variant LineEdit::get_drag_data(const Point2 &p_point) {
String t = get_selected_text();
Label *l = memnew(Label);
l->set_text(t);
+ l->set_focus_mode(FOCUS_ACCESSIBILITY);
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate user input.
set_drag_preview(l);
return t;
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 3bb510ef318..87e1be1dd16 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -6343,6 +6343,7 @@ Variant RichTextLabel::get_drag_data(const Point2 &p_point) {
String t = get_selected_text();
Label *l = memnew(Label);
l->set_text(t);
+ l->set_focus_mode(FOCUS_ACCESSIBILITY);
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Text is already translated.
set_drag_preview(l);
return t;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 7e3bf4519dd..efb1bd11265 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3381,6 +3381,7 @@ Variant TextEdit::get_drag_data(const Point2 &p_point) {
String t = get_selected_text();
Label *l = memnew(Label);
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate user input.
+ l->set_focus_mode(FOCUS_ACCESSIBILITY);
l->set_text(t);
set_drag_preview(l);
return t;