fix: skip visibility check in Focusable and Pressable dev warnings - #10547
Open
SimenB wants to merge 1 commit into
Open
fix: skip visibility check in Focusable and Pressable dev warnings#10547SimenB wants to merge 1 commit into
SimenB wants to merge 1 commit into
Conversation
Author
|
I've signed the CLA (I think 😀) |
snowystinger
approved these changes
Sep 1, 2026
snowystinger
left a comment
Member
There was a problem hiding this comment.
Thanks, this seems like the right approach
yihuiliao
approved these changes
Sep 2, 2026
Member
|
Just fyi, we are in a sort of merge freeze right now but will merge it later |
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.
📖 Summary
The dev-only mount check in
FocusableandPressableasks whethertabIndexreached the DOM child, butisFocusablealso walks ancestors for visibility. A correct child mounted inside a hidden subtree - e.g. a collapsedDisclosurePanel- warned even thoughtabIndexwas applied.Both call sites now pass
{skipVisibilityCheck: true}, as the tree walk ininteractions/utils.tsalready does.matches()still catches a child that drops its props, and the other two checks in the effect are untouched.Closes #10546
✅ Pull Request Checklist:
📝 Test Instructions:
One test per file: a correct child inside
<div hidden>must not warn. Both fail onmainand pass with this change. The existing "child is not focusable" tests are unchanged and still pass.🧢 Your Project:
N/A