1. Home
  2. Docs
  3. SiteLint
  4. Accessibility Rules
  5. 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? Yes No