How to add a skip to content link?

How can I had a skip to content link at the top of every page that is only visible when it receives keyboard focus?

Please add more in more details what you’re trying to do. Maybe add a screenshot example.

I need to add a link to every page that is the first active element in the page and only visible when it receives keyboard focus. It will link to an anchor in the main content area of the page to allow keyboard only users to skip the navigation menu that is repeated on every page. It is an accessibility requirement.

It sounds as if you need to use Anchors .

For complete details of Wix’s accessibility features, see the Help Center article on Accessibility .

If you need further details or clarification, I would recommend contacting Wix Customer Care .

I know how to add a anchor. I don’t know how to add the link itself in a way that it is not visible on the page unless it receives keyboard focus (a:focus). Basically, the HTML needs to look like this:

Skip to Main Content

This CSS would be similar to this:

a.hidden {
position: absolute;
top: -5rem;
}
a.hidden:focus {
top: 0;
}

Normally, this JavaScript would add the needed HTML:

window.onload = function() {
var skipLinks = document.createElement(“div”);
skipLinks.innerHTML +=
Skip to Main Content’;
document.body.insertBefore(skipLinks, document.body.firstChild);
};

How can I write this JS so that it works in Wix?

@kellykchilds Wix sites do not support receiving keyboard focus.

Wix is constantly working on improving the developer experience. Feel free to make your voice heard. The Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.

I would suggest reviewing the various accessibility options detailed in the Help Center article on Accessibility .

If you need further assistance, contact Wix Customer Care as they will be better able to help with this issue.