Open
Conversation
Implements a focus anchoring strategy to prevent unwanted upward scrolling when expanding accordion sections in group items and collapsible forms. Key changes: - Add useFocusHeading hook with robust element targeting (headings, ARIA roles, MUI components, fallbacks) - Update GroupAccordion to focus on expansion with 100ms animation delay - Add semantic h2 heading to FormBodySingleCollapsible for better anchor points - Include debug logging to help diagnose scroll behavior Fixes issue #1796
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.
Hi Clinton,
I’ve resolved the upward expansion behaviour — the accordion no longer expands upward. What remains unclear is the best approach to ensure the viewport/focus stays aligned with the top of the expanded section after expansion.
Do you have any recommendations for managing this cleanly in our current implementation?
Thanks!