The hash-mode router point is the one that bites most SPAs. The link looks right in review, then the router treats #main as a route and nothing moves. The tabindex="-1" on main is a nice detail as well, since without it some browsers scroll to the target but leave focus in the header, so the next Tab goes back to the nav.
Thanks — that's a useful confirmation of the SPA catch. If a hash-mode router treats #main as a route, the link can look right in review and still go nowhere. Handling the click and focusing main (with tabindex="-1") keeps the next Tab in the content, instead of back in the header.
StackShortlist
The hash-mode router point is the one that bites most SPAs. The link looks right in review, then the router treats #main as a route and nothing moves. The tabindex="-1" on main is a nice detail as well, since without it some browsers scroll to the target but leave focus in the header, so the next Tab goes back to the nav.