a11y: Only support blur and focus actions on widgets that are actually focusable#114444
Merged
akien-mga merged 1 commit intogodotengine:masterfrom Jan 1, 2026
Merged
Conversation
bruvzg
reviewed
Dec 30, 2025
Member
bruvzg
left a comment
There was a problem hiding this comment.
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 {2654e6d to
7f13b04
Compare
bruvzg
approved these changes
Dec 30, 2025
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.