1. Home
  2. SiteLint
  3. Accessibility Rules
  4. links-language-destination


Print this article


This rule determines if a given href on <a> element is pointing to an external URL and marks for manual verification when the destination URL pointing to a different location than the current page.

Examples of correct code for this rule:

<p>Find the documentation <a href="product-swedish.html" hreflang="sv">about product</a>.</p>

How to fix it

Links that pointing to a location in a different language than origin should have an attribute hreflang and specify the language code.

Additionally you can use CSS to display link destination language.

a[hreflang]:after { content: " [" attr(hreflang) "]"; }

Note:don’t use flags to indicate languages! Flags represent countries, not languages.


Accessibility, Best Practices

Was this article helpful to you? No Yes

How can we help?