Some people access website links using the tab key on the keyboard instead of the mouse. This could be due to being blind or having mobility problems in the hands.
Tabbing through each item in the menu to get to the main content can be tedious for such users. A solution to this is to create links which will allow the user to skip past the menu.
This can be hidden for sighted users unless they are using the tab key in which case the skip link needs to become visible so that the user will know it is there. Users can hit the tab key multiple times and miss the link. The skip link can be made to appear and stay using jQuery.
This technique is used on this website.
First, you need to add the html content for the skip link. Use an internal anchor to the place you want to skip to. Here is an example:
Next include jQuery and a file with the following code after it in your HTML page.
The code selects the item with the class of “tab_accessibility” and adds a class of “tab_visible” when it comes into focus which is when the user tabs to that link.
Next you add the CSS markup for the accessibility link.
You need to hide the text for sighted users then make it appear when the class “tab_visible” is present.
This is a method of hiding text with CSS but making it available for screen readers from the Coolfields Consulting blog: https://www.coolfields.co.uk/2016/05/text-for-screen-readers-only-updated/
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
You need to make the text appear when the skip link has the class of “tab-visible”. Here rem units are used so em units are added for older browsers.
padding: 0 0.2em;
padding: 0 0.2rem;
That is it. Do you think you would use this for your website?