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

the_g_bomb’s picture

the_g_bomb’s picture

Status: Active » Needs work

This 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:

The lang attribute can be used on almost all html elements...

If an xhtml DOCTYPE is used the for the page, the xml:lang attribute should be defined...

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.

the_g_bomb’s picture

OK, I found this:

1.3 Why do I get errors for not including the lang attribute when I am using XHTML 1.1 DOCTYPE?

Screen readers, which are used to read web pages for people with disabilities, right now only support the lang attribute for switching speech to match the language of content. The XHTML 1.1 DOCTYPE only supports the xml:lang. Use of the lang attribute causes a validation error. If possible, use the XHTML 1.0 or HTML 4.01 DOCTYPE and use the lang attribute to mark the default language on the html element and elements where the content language is different from the default language.

http://html.cita.uiuc.edu/tools/faq.php

the_g_bomb’s picture

There 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.

the_g_bomb’s picture

Status: Needs work » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Adding more detail