Skip to content

Issue/1796#1802

Open
MaryamMehd wants to merge 2 commits intomainfrom
issue/1796
Open

Issue/1796#1802
MaryamMehd wants to merge 2 commits intomainfrom
issue/1796

Conversation

@MaryamMehd
Copy link
Collaborator

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!

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
@MaryamMehd MaryamMehd requested a review from clinnygee January 19, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants