X Tutup
Skip to content

a11y: Only support blur and focus actions on widgets that are actually focusable#114444

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
ndarilek:only-focus-focusable
Jan 1, 2026
Merged

a11y: Only support blur and focus actions on widgets that are actually focusable#114444
akien-mga merged 1 commit intogodotengine:masterfrom
ndarilek:only-focus-focusable

Conversation

@ndarilek
Copy link
Contributor

No description provided.

@ndarilek ndarilek requested a review from a team as a code owner December 30, 2025 13:58
@ndarilek ndarilek changed the title a11y: Only support blur and focus actions on widgets that are actuallY FOCUSABLE a11y: Only support blur and focus actions on widgets that are actually focusable Dec 30, 2025
@bruvzg bruvzg self-requested a review December 30, 2025 13:59
@bruvzg bruvzg added this to the 4.6 milestone Dec 30, 2025
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's not always set, changing focus mode should trigger an update:

diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index edd83f3f39..610a3899a4 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2262,7 +2262,11 @@ void Control::set_focus_mode(FocusMode p_focus_mode) {
                release_focus();
        }

+       if (data.focus_mode == p_focus_mode) {
+               return;
+       }
        data.focus_mode = p_focus_mode;
+       queue_accessibility_update();
 }

 Control::FocusMode Control::get_focus_mode() const {
@@ -2286,6 +2290,7 @@ void Control::set_focus_behavior_recursive(FocusBehaviorRecursive p_focus_behavi
        }
        data.focus_behavior_recursive = p_focus_behavior_recursive;
        _update_focus_behavior_recursive();
+       queue_accessibility_update();
 }

 Control::FocusBehaviorRecursive Control::get_focus_behavior_recursive() const {

@ndarilek ndarilek force-pushed the only-focus-focusable branch from 2654e6d to 7f13b04 Compare December 30, 2025 14:28
@akien-mga akien-mga merged commit c753184 into godotengine:master Jan 1, 2026
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@ndarilek ndarilek deleted the only-focus-focusable branch January 4, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup