Solution for warning 'No "skip to" link detected' for accessibility

For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
Post Reply
BfzPL
Rank 0 - Newcomer
Posts: 8
Joined: Sun Jul 22, 2018 8:44 am

Solution for warning 'No "skip to" link detected' for accessibility

Post by BfzPL »

Hello Albert and all Validator friends together!
The new Version 19 (2019) warns for every file of my website by;
''No "skip to" links were detected in this document. Consider adding skip links if it would improve accessibility.
These links help some users navigate the site and/or quickly skip to the main content. [A, 2.4.1]. Visit
https://www.w3.org/TR/UNDERSTANDING-WCA ... -skip.html
for more information.''
What is the resolution? The referred page don't give hints for real attributes and/or values to use in the 'a'-tag(s) or any other technic.
As long as my website is for blind and seeing handicapt people, it has already many links to content start and to navigation section.
But it seems they are not detected, so what I've forgotten to set?
Many thanks and best regards, Thomas
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Solution for warning 'No "skip to" link detected' for accessibility

Post by Albert Wiersch »

Hello,

On the page you linked to, there are links to more information like this page:
https://www.w3.org/TR/2016/NOTE-WCAG20- ... 0161007/G1

There are also some examples here (although the last update was in 2009):
https://www.jimthatcher.com/skipnav.htm

Basically the validator is looking for "a" links with a link text that begins with "skip to", like this: <a href="#maincontent">Skip to main content</a>

I'll update the message with a simple example:
No "skip to" links were detected in this document. Consider adding skip links (like <a href="#maincontent">Skip to main content</a>) if it would improve accessibility. These links help some users navigate the site and/or quickly skip to the main content. [A, 2.4.1]. Visit https://www.w3.org/TR/UNDERSTANDING-WCA ... -skip.html for more information.

Other solutions to the validator message (besides adding the 'skip to' links that the validator is looking for) would be to disable the validator message if you've already addressed the issue in other ways or you don't need to be informed of it any longer.

If you think your HTML already contains suitable links so that this warning message should not be displayed, then please post a sample document. I'll see if I can suppress the message if other suitable links seem to exist in the document.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
BfzPL
Rank 0 - Newcomer
Posts: 8
Joined: Sun Jul 22, 2018 8:44 am

Re: Solution for warning 'No "skip to" link detected' for accessibility

Post by BfzPL »

Hello Albert and all Validator friends,
Now I see the real problem of these checks. All the checks are entirely and only in English.
What about other languages (ruled by html-lang-values other than starting with "en")?
We can't prerequisite that all visitors of our pages understand English! (Not saying that such people are with lower cognition.)
It is like the Canadian rules for navigation and access-keys. I can fit these rules completely - but in German,
but no tool will declare my page conforming to the rules because of the "special" words to check for aren't fount at all...
I don't know how difficult it is to enhance the check by a customer filled list of words or pairs (check English "skip" --> try German "überspringen" or "springe" or "gehen" ...).
Nearely all my German pages use e.g. "zum Inhalt Kopfbereich &uuml;berspringen" (to content skip header),
"zur Navigation Inhalt &uuml;berspringen" (to navigation skip content) and "zum Seitenanfang" (to page begin).
Mostly the Germans leave out the verb (go/skip --> gehe/springe) and use the not written word in imperative form.
What is Your opinion?
Many thanks and best regards
Thomas
BfzPL
Rank 0 - Newcomer
Posts: 8
Joined: Sun Jul 22, 2018 8:44 am

Re: Solution for warning 'No "skip to" link detected' for accessibility

Post by BfzPL »

Hello Albert and Validator friends,
after reading Your technical details again I suggest an a-link check for page-internal positions, e.g. looking only for <a href="#...">anything not checked</a>.
This offers solutions where the text "skip to ..." is placed in img-alt as well as in other languages too.
Additionally it makes no sense to have such warnings to occur on only small/short amount of header/nav content.
The extra click or hotkey press of the visitor to skip one or two lines is too heavy for me.
Only on big sites it make sense, but only to have consistency.
Many thanks and best regards
Thomas
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Solution for warning 'No "skip to" link detected' for accessibility

Post by Albert Wiersch »

Hi Thomas,

You are right that the check to disable this message is based on English. I wish I spoke more languages but English is it for me so it is difficult to support/manage other languages, especially without help.

I could possibly add some additional checks to disable the message but I would need to know exactly what to add and it would have to be reliable and not too time-consuming to add (trying to check the size of header/nav content could be problematic).

Besides looking for link text that begins with "Skip to", what other strings should CSS HTML Validator look for to disable this warning? Can you list some specific strings that you think would work as replacements or substitutes for "Skip to"? Would also looking for link text that begins with these strings be helpful: "überspringen", "springe", "gehen"? Adding additional strings to check should be relatively easy. I know you listed some possibilities. Can you give me an exact list that would be appropriate to add to the program for general use by everyone?

Another option would be to add a custom comment that can be used to disable the message in any document that you place that comment in. You'd have to write a simple user function to process the comment (I can help with this). Here is more information:
https://www.htmlvalidator.com/2019/docs ... ml_cse.htm

While it's impractical to make this warning perfect (i.e. it's generated only when it's perfectly relevant), I'm sure it can be improved so that it appears less often when it's not needed or not helpful.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
BfzPL
Rank 0 - Newcomer
Posts: 8
Joined: Sun Jul 22, 2018 8:44 am

Re: Solution for warning 'No "skip to" link detected' for accessibility

Post by BfzPL »

Hello Albert,

thanks for Your response.
My best suggestion is: Do not depend on the language of the link-enclosed text (or img-alt)!
Instead use the URI directly. If it is a same-page location (simply starting with "#"), than we can assume it is a "skip to"-link.
Maybe You are able to look for the same URI in front, saying e.g. we have already loaded page "https://www.example.com/page.htm",
then "#main" and "/page.htm#main" and "https://www.example.com/page.htm#main" are all the same - and therefore OK!

Talking about the "distance"/"amount of lines", when a "skip to"-link should appear; You may use e.g. 100 characters/20 words or something similar.
My native language is German. Therefore I can provide only examples for this. There are much more visitors in Spain/Portuguese and French I think.
Maybe You've statistics of Your buyer's countries to get more insights? I'm "old fashioned" and try every time to use German where ever possible and not use Anglicism (we call it "Denglisch" for Deutsch-Englisch = German-English). Mostly the used English can't understand the same from a English people as long as the words are used with German context only. (E.g. "Handy" sounds English, but means "mobile pone".)

Do You have more questions regarding languages other than English? (I remember many requests of this type in the last few years from my side.)
We could start a "Language-specific Group" to collect and solve such issues... I bring my German into this team.

By the way, it is no problem to me to hide the corresponding warning. But my goal is to get an as most as possible accessible site.

Best greetings from Germany, Thomas
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Solution for warning 'No "skip to" link detected' for accessibility

Post by Albert Wiersch »

HI Thomas,

Thank you for your feedback and suggestion.

I'm concerned about making such assumptions about links starting with '#'. I'm not sure if that would be an improvement or not. It's an interesting idea though, and would definitely cut back on the false messages if there are such skip links at the top of the document... but what if they are some other type of link?

Trying to compute a "distance" and determine where a "skip-to" link should appear would likely be time-consuming to implement and may not be that reliable.

I'm not a language expert, but if CSS HTML Validator can detect 75%+ of skip links by simply checking to see if there is link text that begins with a specific string, then I think that may be the best overall detection strategy for CSS HTML Validator to take. The issue then becomes what are the strings to check for in order to detect skip links? I would hope there would be a small number of strings that skip links usually start with for the most popular/used languages... although your posts seem to imply that German would need multiple strings, but that's OK.

There is no perfect and practical solution (as there often isn't) to this issue... but CSS HTML Validator does bring it to the developer's attention which I think is the important thing. The developer can then evaluate the situation and see if the proper 'skip to' links exist (and if they are needed at all).
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply