HTML5 Lang Attribute problems
-
Hi,
I’ve come across something that I can’t find an answer to anywhere else on the web. Feel free to have a look at the website here – h t t p : / / w w w . s o h a i l t e c h . c o m / (without spaces). My design validates perfectly to HTML5. Now what I’m trying to get is make the design accessible to WCAG 2.0 AA. You can test this at https://achecker.ca/checker/, first of all, no matter what I do to the theme, I can’t get rid of the XML namespace as I thought that may resolve the issue. The problem is the following:
Check 49: Document has invalid language code.
Repair: Add a valid 2 letter or 3 letter language code as defined in the ISO 639 specification to the HTML ‘lang’ attribute. For XHTML, both ‘lang’ and ‘xml:lang’ must be set.
Line 1, Column 1:
<html lang=”en” xmlns=”https://www.w3.org/1999/xhtml”>
<head>
<link rel=”stylesheet” type=”text/css” …If I’ve already got a valid language code ‘en’ (and I’ve tried everything) using the ‘lang’ attribute, then why is it not validating the website I don’t understand what’s wrong. I had a feeling the XML namespace has something to do with it though I have no way to get rid of it, it seems to be built in.
I should be able to fix this being a web designer but this is the first time I’ve ever come across anything like this. I look forward to hearing what other people have to say about this and if anyone knows how to sort it out then that would be amazing.
Thanks!
- The topic ‘HTML5 Lang Attribute problems’ is closed to new replies.