tabvengers / spicy-sections

Creative Commons Zero v1.0 Universal
128 stars 10 forks source link

Scroll top of section into view (exclusive-collapse) #41

Open Dan503 opened 2 years ago

Dan503 commented 2 years ago

There is a common issue on mobile with auto-collapsing accordion segments. When the user opens a section that is below the current section, the previous section collapses and the new one opens. Due to the small size of mobile screens, the user is left at the bottom of the content area of the new tab they just opened.

The user often has to manually scroll up to view the top of the content they opened. This is bad UX.

When in the exclusive-collapse view, the section header should scroll into view after the user opens a section.