Repository navigation
Conversation
🤖 PR meta 🤖📦 Bundle sizeSize Change: +159 B (0%) Total Size: 9.07 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
|
Contributor
|
#85486 merged, feel free to iterate and refine this approach. Happy to review it when ready |
This branch has not been deployed
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.
What?
As a means, this extends the hook
useFocusOnMountandDropdownto facilitate the proper focus behavior by interaction type when openingDropdownbased components. As an end, this makesDropdownMenufocus its popover element when opening with a pointer device whereas keyboard and virtual activation focus the first tabbable element within its popover.Why?
As an alternative to #85486. In the current state this is not a complete alternative since it lacks the feature where "arrow keys can enter a pointer-opened menu" and some test updates.
How?
useFocusOnMountto accept a callback for dynamically determining focus behavior.onToggleproperty passed toDropdownrender props so that it accepts an event that's used to detect the appropriate focus behavior.DropdownMenupass the events used for invokingonTogglethrough it.Testing Instructions
These are pulled from #85486 and represent what this should do to be a complete alternative which it is not yet.
popoverProps.focusOnMountsettings and consumer focus handlers. A later controlled opening should use the default first-item focus.Testing Instructions for Keyboard
TabbableContainer cycle={false}. Shift+Tab should leave it; Tab should enter its first tab stop.Screenshots or screencast
Use of AI Tools
None so far.