What is “Skip to main content”?

In any Salesforce page, if no element is in focus and you press Tab⇄, a hidden element Skip to main content is put into focus.

enter image description here

What does Skip to main content do?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The purpose of the “Skip to main content” link (skip link) is to allow users who don’t have the motor control to use a pointer device, or who use assistive technologies such as screen readers and can’t see the screen (and thus use a keyboard or other device to navigate), to bypass repetitive header content and navigate directly to the main content on the page.

If you use the tab key to navigate through the page, you’ll see that the skip link appears when it receives focus, and that pressing the return key while it’s focused will take you to the main div. If you press the tab key again after that, the next element that receives focus will be in the main content section. If you had not used the skip link, you would have to tab through all the links and tabs in the header area before getting to any useful content.

Being able to bypass repetitive content is a requirement for Section 508 in the United States, and also a success criteria for the W3C Web Content Accessibility Guidelines. The skip link isn’t the only way to do this, but it’s been around the longest.

Method 2

If you use something like Firebug (on Firefox) or Chrome developer tools to inspect the element source you can see that it is a link to an anchor on the page.

The “skip to main content” links to an anchor called “skiplink”. The anchor skiplink is the main body of the page (the div underneath the tabs).

So clicking on that link would navigate you to the section beneath the tabs (under the Home | Chatter | Profile etc). Maybe this is useful on a specific browser or with a very customised styled page or on a mobile device with a small screen?

You can actually see it working if you make your browser window very very short. If you have the “skip to main content” link visible in the browser window and reduce the height of the browser window so that the tabs are no longer visible. Then click the link and it moves you down the page to the main body.

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x