Success criterion 2.4.1 of WCAG 2.X requires web authors to provide "a mechanism to bypass blocks of content that are repeated on multiple Web pages" (e.g. navigation sidebars, headers).
One of the proposed techniques to accomplish this is a hidden "skip to main content" link that a screenreader-assisted user may use to jump to the main content.
My question is, isn't the "skip to main content" link redundant, would it be acceptable to automatically auto-focus on the main content (or main heading element of the main content) when the page is navigated to? Intuitively this would feel more usable to me since the focus is automatically in the correct place a soon as the page is first loaded/navigated to.
I have implemented "skip to main navigation" links on my site. However, these links add technical complexity and maintenance; moveover the link feels like an extra step compared to the auto-focus solution.
Autofocus is not listed in the Sufficient techniques to Bypass Blocks for some good reasons.
It would work exactly once, while skip links can be reused while working with the site. Just as a site’s home page is often the least visited page, users do not read the site once from top to down and are done with it. Their navigation needs differ, they need to quickly find stuff again, that’s why bypassing big blocks of repeating content is important.
If the whole page is loaded (in contrast to a single page application) you should avoid autofocus except for some rare valid use cases, as it’s disorienting not only for screen reader users.
From Accessibility Considerations for autofocus on MDN:
Use careful consideration for accessibility when applying the autofocus attribute. Automatically focusing […] can cause the page to scroll on load. […] the screen reader will not announce anything before the label, and the sighted user on a small device will equally miss the context created by the preceding content.
That means that all users risk to miss the page header with the main menu, which causes confusion for everyone.
For a single page application, on the other hand, I believe it to be best practice to focus the main content’s headline after navigation.