fix: Improve robustness of IFocusableNode uses#9031
Merged
BenHenning merged 3 commits intoRaspberryPiFoundation:rc/v12.0.0from May 12, 2025
Merged
fix: Improve robustness of IFocusableNode uses#9031BenHenning merged 3 commits intoRaspberryPiFoundation:rc/v12.0.0from
IFocusableNode uses#9031BenHenning merged 3 commits intoRaspberryPiFoundation:rc/v12.0.0from
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Collaborator
Author
|
Feel free to take a look @rachel-fenichel if you have a free moment--I don't think this PR needs to be specifically reviewed by anyone in particular and I suspect that it's a largely non-controversial change. |
BenHenning
commented
May 12, 2025
Collaborator
Author
BenHenning
left a comment
There was a problem hiding this comment.
Self-reviewed changes.
Collaborator
Author
|
Will be affected a bit by #9033 so waiting for that to be merged, first. |
gonfunko
approved these changes
May 12, 2025
1 task
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.
The basics
The details
Resolves
Fixes RaspberryPiFoundation/blockly-keyboard-experimentation#515
Proposed Changes
This adds
canBeFocused()checks to all the places that could currently cause problems if a node were to returnfalse.Reason for Changes
This can't introduce a problem in current Core and, in fact, most of these classes can never return
falseeven through subclasses. However, this adds better robustness and fixes the underlying issue by ensuring thatgetFocusableElement()isn't called for a node that has indicated it cannot be focused.Test Coverage
I've manually tested this through the keyboard navigation plugin. However, there are clearly additional tests that would be nice to add both for the traverser and for
WorkspaceSvg, both likely as part of resolving #8915.Documentation
No new documentation changes should be needed here.
Additional Information
This is fixing theoretical issues in Core, but a real issue tracked by the keyboard navigation plugin repository.