The skip link that doesn't skip

Both panels have a "Skip to main content" link. Only one actually works.

Try it with the keyboard. Click inside a panel, press Tab once to reach its "Skip to main content" link, press Enter, then press Tab again. Watch the "Focus now on" line at the bottom of each panel. In the broken panel, focus goes back to a nav link. In the fixed panel, focus lands in the heading, below the header bar.

Before: link and target exist, focus is not managed

Main content

Press the skip link, then Tab. Focus returns to "Programs" in the nav, not here.

(more content)

Focus now on: nothing yet

After: tabindex on the target, room for the header

Main content

Press the skip link, then Tab. Focus is here, below the bar, and Tab continues into the content.

(more content)

Focus now on: nothing yet

The only difference between the two panels is tabindex="-1" on the target and scroll-margin-top to clear the fixed header. The markup a scanner inspects is otherwise identical, which is why an automated check passes both. Owned demo, reuse freely.