How to fix ADA compliance error: Document language missing.

Young0886
Tourist
5 0 4

I am trying to get my site as ADA compliant as I am able to do but you have to know a lot of coding to do it.  I have googled much of it but I am stuck on this error:  

 

The following applies to the entire page. 

Document language missing
The language of the document is not identified.
 
I went to Theme Settings>Theme actions>Edit language and it says :  Language (English)

does anyone know how to fix this?

miamibeachlira
Tourist
5 0 0

maybe the language  they are referring  to  is UTF-8 ? so your site can load correctly on browsers from other countries ? 

0 Likes
Coveted_
Tourist
18 0 2

That is how you correct the issue. But only if the theme developer/creator added the proper annotation for it in the liquid template. 

We’ve developed a fix for this with Tenably.app

 

Are you up to chatting about accessibility solutions? 

We’ve been working on Tenably for some time now and it would be great to chat with you. 

cheers 

0 Likes
amandaatremix
Tourist
7 0 2

I added this code right after the <doctypeHTML> tag in theme.liquid and it fixed the error on the wave.webaim.org website. 

 

<html lang="en">

 

0 Likes
Coveted_
Tourist
18 0 2

Yes that is correct, but that will hardcode English as the language and you won't be able to adjust it via the Shopify admin console.

 

You'll want to change that value to "{{ request.locale.iso_code }}"

 

That way it takes the value from the Shopify store language setting.

0 Likes
Coveted_
Tourist
18 0 2

Use this snippet of code

<html lang="{{ request.locale.iso_code }}">
amandaatremix
Tourist
7 0 2

Thank you so much! I really appreciate it. 

Coveted_
Tourist
18 0 2

Reach out if you need further assistance. Here to help. 

0 Likes