• Resolved sherinhashtag

    (@sherinhashtag)


    When we check ADA test for my website, it showing a major error that is “Ensure the language of a document is set”.

    This is the Instance Details
    <html><head><script type=”text/javascript”>Object.defineProperty(document, ‘domain’, {‘writable’: false, ‘value’: ‘trunk.ssbbartgroup.com’});</script><script type=”text/javascript”>Object.defineProperty(document, ‘domain’, {‘writable’: false, ‘value’: ‘trunk.ssbbartgroup.com’});</script><base href=”https://accessible19.wpengine.com/”&gt;

    But we are unable to find this code from the theme file.We can only add the language type only we can access this file section, Please let me know the file name for the given code. it is not in the header file also.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    There is no such code in the theme. I can’t even find such code on your website when I preview the source in the browser (right click your website → View page source, or CTRL+U).

    Maybe the code is actually coming from your ADA test tool? Please check with your ADA test tool support or documentation for what the error actually mean and where it comes from.

    I’ve run your website through WAVE accessibility evaluation tool and it looks perfectly fine, with no errors.

    For tips on testing accessibility of your website, please check the official theme support center knowledge base article.

    Best regards,

    Oliver

    Thread Starter sherinhashtag

    (@sherinhashtag)

    Hi Oliver,

    when you preview the source in the browser (right click your website → View page source, or CTRL+U). There is a script(<script type=”text/javascript”>) called in the line number 16. Can you please mention in which file I can able to see this code? I want to add the language=javascript action inside this script. We are checking the ADA with a lot of tools including WAVE accessibility evaluation tool and this issue we have found through https://webaccessibility.com/ tool. We need to fix this soon and need to increase the ADA percentage.

    Hi,

    That code does not come from the theme.

    It seem it is an emoji JavaScript WordPress includes automatically. Here are some tips I’ve found that may help you: https://crunchify.com/not-using-emoji-on-your-wordpress-blog-stop-loading-wp-emoji-release-min-js-and-css-file/

    However, I don’t quite understand why you need to language=javascript into a JavaScript code. I don’t think that would even work. Could you please share a URL where this accessibility requirement is explained?

    If you mean changing <script type="text/javascript"> to <script language="javascript"> then I do not recommend it. It is a very old HTML syntax, obsolete by now. And from what I know, today it is much more preferred to just omit even the type attribute (but WordPress includes this automatically). You can simply test this HTML code on https://validator.w3.org/nu/#textarea to see for yourself:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Test</title>
    <script language="javascript"></script>
    </head>
    <body>
    </body>
    </html>

    Best regards,

    Oliver

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Couldn’t access script source in the filles of reykjavik theme’ is closed to new replies.