Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After running Functional Accessibility Evaluator 1.1 from The University of Illinois at Urbana-Champaign on the boldy.d7.garethalexander.co.uk demo site.
Under Navigation & Orientation in the Default Language section there is:
Fail: 31 pages (of 31) with this error
Each page must have a lang attribute on its html element whose value or initial subtag is a valid two-character language code.
Comments
Comment #1
the_g_bomb CreditAttribution: the_g_bomb commentedSee http://html.cita.illinois.edu/nav/lang/ for best practices.
Comment #2
the_g_bomb CreditAttribution: the_g_bomb commentedThis is a strange one and possibly a bug somewhere else, but I might need to take advisement on this before I go blaming others.
The Doctype being output by boldy D7 at the moment is:
<html class="js cufon-active cufon-ready" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:og="http://ogp.me/ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/terms/" xmlns:content="http://purl.org/rss/1.0/modules/content/" dir="ltr" version="XHTML+RDFa 1.0" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
looking closely you can see the:
xml:lang="en"
which should satisfy this criteria.
However I can only presume that because the FAE tool clearly states in the best practices that:
Does that mean I am failing this because I am using xml:lang on a html doctype rather than a xhtml doctype. Does it require me to change to use lang="en"? or change my doctype to xhtml?
I'll need to look into this further.
Comment #3
the_g_bomb CreditAttribution: the_g_bomb commentedOK, I found this:
http://html.cita.uiuc.edu/tools/faq.php
Comment #4
the_g_bomb CreditAttribution: the_g_bomb commentedThere is a trade off here, valid xhtml or passing this checkpoint.
If the lang="en" is included in the doctype the markup fails validation, however if the lang="en" is dropped in favour of the xml:lang="en", then there is a potential that some assistive technology might not recognise the language of the document.
I will have to validate the currency/accuracy of the claim that screen-readers ignore xml:lang.
Comment #5
the_g_bomb CreditAttribution: the_g_bomb commentedI have added a html.tpl.php file to the theme with the lang attribute added to pass this checkpoint for the moment, I might remove it again if I find out the xml:lang is better supported than is hinted at.
If you prefer to have valid markup, just delete the html.tpl.php file and the theme will use drupal's standard one and will validate fine. The only difference between the two is the lang attribute.
Comment #6.0
(not verified) CreditAttribution: commentedAdding more detail