accessibility

I'm using https://webaccessibility.com/ to check web accessibility, I get to 89% with one error. The error is Ensure the language of a document is set
<script>
Added the code to the header.php (<html lang="en" xml:lang="en" xmlns= "http://www.w3.org/1999/xhtml">:wink: . But still get error, any ideas where i'm going wrong please. I will open access

  • Nithin
    • Support Wizard

    Hi Chez,

    Hope you are doing good today. :slight_smile:

    The theme already adds language attribute automatically via the following line in the header.php file:
    <html class="<?php avada_the_html_class(); ?>" <?php language_attributes(); ?>>

    So at the moment, there are two HTML added in the header.php file like this:

    <html lang="en" xml:lang="en" xmlns= "http://www.w3.org/1999/xhtml">
    <html class="<?php avada_the_html_class(); ?>" <?php language_attributes(); ?>>

    Currently, the language is set as en-GB, which can be changed to "en"(English US) via the WordPress dashboard, under Settings > General > Site Language

    Once done, remove the HTML added by you, and edit the existing HTML added via the theme to the following:

    <html class="<?php avada_the_html_class(); ?>" <?php language_attributes(); ?> xml:lang="en">

    Please do clear the cache, and then check how the results go with accessibility. Hope this helps.

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.