Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(page): skip to content should point to primary content container #2519
What: Currently, skip to content link sends users to an in-page anchor that sits alongside the main page content container. This generally has the desired effect for sighted keyboard users, however, for screen reader users (SRU) this basically leads to a dead end. It's a dead-end in that the target anchor doesn't contain the page content, so nothing further is announced after the element has been focused.
I think what would be better is if we allow the main content container to carry an id, which can be used as the target of the
For sighted users, I don't think this will cause any difference in behavior (we may want to add a style like
Additional issues: #2591
These changes are driven by a technique suggested in https://dequeuniversity.com where in response to dynamic content changes (like navigating to a new "Page" in a SPA) we want to send focus to the new content so that it is announced and SRU receive some feedback about the new content.
@tlabaj good catch, I updated the tests to reflect what we can expect in the current state. If users don't supply a
Your changes have been released in:
Thanks for your contribution!