Merge pull request #113392 from ndarilek/project-dialog-accessibility

Editor: Improve accessibility in Create New Project dialog
This commit is contained in:
Rémi Verschelde 2025-12-02 14:17:05 +01:00
commit 5ef6b01b3f
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1007,6 +1007,7 @@ ProjectDialog::ProjectDialog() {
project_name = memnew(LineEdit);
project_name->set_virtual_keyboard_show_on_focus(false);
project_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
project_name->set_accessibility_name(TTRC("Project Name:"));
name_container->add_child(project_name);
project_path_container = memnew(VBoxContainer);
@ -1073,6 +1074,7 @@ ProjectDialog::ProjectDialog() {
msg = memnew(Label);
msg->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
msg->set_accessibility_live(DisplayServer::LIVE_POLITE);
msg->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
msg->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
msg->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
@ -1100,6 +1102,7 @@ ProjectDialog::ProjectDialog() {
Button *rs_button = memnew(CheckBox);
rs_button->set_button_group(renderer_button_group);
rs_button->set_text(TTRC("Forward+"));
rs_button->set_accessibility_name(TTRC("Renderer:"));
#ifndef RD_ENABLED
rs_button->set_disabled(true);
#endif
@ -1112,6 +1115,7 @@ ProjectDialog::ProjectDialog() {
rs_button = memnew(CheckBox);
rs_button->set_button_group(renderer_button_group);
rs_button->set_text(TTRC("Mobile"));
rs_button->set_accessibility_name(TTRC("Renderer:"));
#ifndef RD_ENABLED
rs_button->set_disabled(true);
#endif
@ -1124,6 +1128,7 @@ ProjectDialog::ProjectDialog() {
rs_button = memnew(CheckBox);
rs_button->set_button_group(renderer_button_group);
rs_button->set_text(TTRC("Compatibility"));
rs_button->set_accessibility_name(TTRC("Renderer:"));
#if !defined(GLES3_ENABLED)
rs_button->set_disabled(true);
#endif