Skip links help keyboard users bypass menus, making sites more inclusive for disabled users.

At the time of this writing, Etch does not provide built-in skip link functionality, but because you have access to the full HTML, it is pretty easy to add one. One thing I didn’t account for initially is that Automatic CSS includes a native skip-link style, and some of those had to be modified in my CSS.

Borrowing heavily from another website for inspiration, here is the final result.

Image 12
Screenshot of the main content skip link.

My approach

Since these are necessary on every page, I added them to the header component of the catch-all template. I may revisit this and make them a separate component so they can be easily added to any template with a custom header.

Image 10
Screenshot showing the site header component structure

Each anchor tag contains a div for the enter button. This is an ooh-ahh feature and not necessary.

Image 11
Anchor tag with nested div.

Once these are created, open your footer component and add an ID (id=”footer”), and do the same for your main element (id=”main-content”). Right now, neither my header nor footer is so elaborate that they need skipping over or to, but it is a good practice.

The HTML

<!-- Skip to Main -->
 
<a href="#main-content" aria-label="Skip to main content" class="skip-link">Skip to main content <div aria-hidden="true" class="content"><span class="icon">↵</span>Enter</div></a>

<!-- Skip to Footer -->
 
<a href="#footer" aria-label="Skip to main content" class="skip-link">Skip to footer <div aria-hidden="true" class="content"><span class="icon">↵</span>Enter</div></a>
<!-- Skip to Main -->
 
<a href="#main-content" aria-label="Skip to main content" class="skip-link">Skip to main content <div aria-hidden="true" class="content"><span class="icon">↵</span>Enter</div></a>

<!-- Skip to Footer -->
 
<a href="#footer" aria-label="Skip to main content" class="skip-link">Skip to footer <div aria-hidden="true" class="content"><span class="icon">↵</span>Enter</div></a>
HTML

The CSS

skip-link 
.content 
.icon 
skip-link 
.content 
.icon 
CSS