Debugging a focus issue in a CodePen embed surfaced something odd about Firefox's tab behavior on macOS. Tab through a page and you can reach <button> elements, but plain <a> links are skipped entirely. That's not a rendering quirk or a JavaScript interference—it's an OS-level preference.

On macOS, the relevant setting lives in System Settings under Keyboard navigation. When it's disabled, the browser only tabs to form controls and not to other interactive elements like links. Enabling it and restarting Firefox restores the expected behavior of moving focus through all focusable elements, including anchors.

The Scroll Jump Was a Focus-Hiding Side Effect

The original problem—a page jumping to the top when tabbing to a certain element—turned out to be related to an iframe skip link. That link only appears when focused, as it's meant to let keyboard users bypass the iframe content. The link was visually hidden with position: absolute; top: -9999px; left: -9999px and then repositioned on focus. Firefox would hit those off-screen values at the moment of focus and jump the page up, even though the focus styles should have brought the element back into view. It behaved like a race condition between the focus event and the style change.

A more robust accessible hiding technique—one designed to keep content accessible to screen readers while reliably removing it from visual layout—resolves the jump without the fragile off-screen positioning. The fix avoids the issue entirely rather than relying on timing or style recalculations.