Handle sticky position with focus inside #4780
Labels
💜 accessibility
🐞 bug
Something isn't working
📦 components
Related to the @swisspost/design-system-components package
Header
Everything related to our composible header components
Milestone
I think a better idea would be to only apply the sticky behaviour when the focus is not inside the global navigation. When the page is scrolled, header is sticky, and the user navigates to the language switch via keyboard, we should show the header in full to make sure everything is properly visible. I think that could be done through CSS alone, making it more reliable.
Originally posted by @gfellerph in #4767 (comment)
Since we're using
position: sticky
on the.global-header
and on the.local-header
elements, we can simply override the point, when they get sticky toinset-block-start: 0px
for the.global-header
andinset-block-start: var(--global-header-height)
for the.local-header
element to show them as if we were scrolling to the top.The text was updated successfully, but these errors were encountered: