{"id":1106,"date":"2017-01-24T11:00:17","date_gmt":"2017-01-24T19:00:17","guid":{"rendered":"http:\/\/blogs.lanecc.edu\/webteam\/?p=1106"},"modified":"2019-09-17T23:56:54","modified_gmt":"2019-09-18T06:56:54","slug":"understanding-wcag-2-0-3-1-1-language-of-page","status":"publish","type":"post","link":"https:\/\/blogs.lanecc.edu\/webteam\/2017\/01\/24\/understanding-wcag-2-0-3-1-1-language-of-page\/","title":{"rendered":"Understanding WCAG 2.0: 3.1.1 &#8211; Language of Page"},"content":{"rendered":"<p>The next standard we&#8217;ll explore in our series on understanding WCAG 2.0 is <a href=\"https:\/\/www.w3.org\/TR\/UNDERSTANDING-WCAG20\/meaning-doc-lang-id.html\">3.1.1 Language of Page<\/a>. This standard is required for WCAG level A compliance, which is part of what Section 508 requires. Here&#8217;s the complete text:<\/p>\n<blockquote class=\"scquote\">\n<div>\n<p class=\"sctxt\"><strong class=\"sc-handle\">3.1.1 Language of Page:<\/strong> The default human language of each Web page can be programmatically determined. (Level A)<\/p>\n<\/div>\n<\/blockquote>\n<p>When a screen reader reads a page, it needs a voice to use. Here&#8217;s the default voice on my Mac reading some words in Spanish:<\/p>\n<audio class=\"wp-audio-shortcode\" id=\"audio-1106-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2017\/01\/en_us.mp3?_=1\" \/><a href=\"https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2017\/01\/en_us.mp3\">https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2017\/01\/en_us.mp3<\/a><\/audio>\n<p>That&#8217;s not too dissimilar from how I sound, which isn&#8217;t a coincidence. The default voice tried to pronounce words like an American English speaker (<a href=\"https:\/\/en.wikipedia.org\/wiki\/IETF_language_tag\">IETF code<\/a> EN_US), which is what I am. The problem in the audio file above is that we told my computer to pronounce Spanish words (&#8220;<span lang=\"es\">\u00a1Hola! C\u00f3mo est\u00e1s!<\/span>&#8220;) as though they were in English.<\/p>\n<p>If we&#8217;d instead told the computer the words were in Spanish, we&#8217;d have heard this:<\/p>\n<audio class=\"wp-audio-shortcode\" id=\"audio-1106-2\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2017\/01\/es_es.mp3?_=2\" \/><a href=\"https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2017\/01\/es_es.mp3\">https:\/\/blogs.lanecc.edu\/webteam\/wp-content\/uploads\/sites\/25\/2017\/01\/es_es.mp3<\/a><\/audio>\n<p>That uses the ES_ES voice (which, on a Mac, <a href=\"http:\/\/www.techradar.com\/how-to\/computing\/apple\/terminal-101-making-your-mac-talk-with-say-1305649\">is named Monica<\/a>). And it sounds totally natural (or, at least, as natural as computer generated language can be).<\/p>\n<p>To specify a language for your entire document, simply add a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Global_attributes\/lang\"><code>lang<\/code> attribute<\/a> to the <code>html<\/code> tag:<\/p>\n<pre>&lt;html lang=\"en\"&gt;<\/pre>\n<p>Confusingly, the language codes we use in HTML are different from the IETF codes. Instead, we use <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes\">ISO-639-1<\/a>.<\/p>\n<p>Sometimes it isn&#8217;t possible to modify the tags on the page. For instance, you might be using a platform that generates HTML, and you don&#8217;t have access to change the output. In those cases, you can instead add a Content-Language header to your server:<\/p>\n<pre>Content-Language: en<\/pre>\n<p>But sometimes, that&#8217;s not an option either. You might be stuck with a platform that can only generate HTML 4.01, or you might only be able to insert tags into the header and body, but not modify <code>html<\/code> tag directly.<\/p>\n<p>For those times, your only option is to use the absolute wrong way to specify a language:<\/p>\n<p><code>&lt;meta http-equiv=\"content-language\" content=\"en\"&gt;<\/code><\/p>\n<p>This meta tag (meaning a tag that&#8217;s about a page, rather than part of a page), is now <a href=\"https:\/\/www.w3.org\/TR\/2011\/WD-html-markup-20110113\/meta.http-equiv.content-language.html\">considered obsolete<\/a>. But if it&#8217;s your only option, it&#8217;s your only option.<\/p>\n<p>If you&#8217;d like to read more document language codes, you may also be interested in <a href=\"https:\/\/www.w3.org\/TR\/2016\/NOTE-WCAG20-TECHS-20161007\/H57#H57-related-techs\">these techniques<\/a>, which provides more detail. I also found this <a href=\"http:\/\/nimbupani.com\/declaring-languages-in-html-5.html\">blog post<\/a> very helpful, as well as this page on <a href=\"https:\/\/www.w3.org\/International\/questions\/qa-html-language-declarations\">w3.org<\/a>.<\/p>\n<p>Interested in more? Check out the listing of <a href=\"http:\/\/blogs.lanecc.edu\/webteam\/2016\/10\/11\/updated-accessibility-requirements\/\">all the posts in this series<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The next standard we&#8217;ll explore in our series on understanding WCAG 2.0 is 3.1.1 Language of Page. This standard is required for WCAG level A compliance, which is part of what Section 508 requires. Here&#8217;s the complete text: 3.1.1 Language of Page: The default human language of each Web page can be programmatically determined. (Level &hellip; <a href=\"https:\/\/blogs.lanecc.edu\/webteam\/2017\/01\/24\/understanding-wcag-2-0-3-1-1-language-of-page\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Understanding WCAG 2.0: 3.1.1 &#8211; Language of Page&#8221;<\/span><\/a><\/p>\n","protected":false},"author":86,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":"","_wpscppro_dont_share_socialmedia":false,"_wpscppro_custom_social_share_image":0,"_facebook_share_type":"","_twitter_share_type":"","_linkedin_share_type":"","_pinterest_share_type":"","_linkedin_share_type_page":"","_instagram_share_type":"","_medium_share_type":"","_threads_share_type":"","_google_business_share_type":"","_selected_social_profile":[],"_wpsp_enable_custom_social_template":false,"_wpsp_social_scheduling":{"enabled":false,"datetime":null,"platforms":[],"status":"template_only","dateOption":"today","timeOption":"now","customDays":"","customHours":"","customDate":"","customTime":"","schedulingType":"absolute"},"_wpsp_active_default_template":true},"categories":[31],"tags":[6],"class_list":["post-1106","post","type-post","status-publish","format-standard","hentry","category-wcag-20","tag-accessibility"],"_links":{"self":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/1106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/comments?post=1106"}],"version-history":[{"count":4,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/1106\/revisions"}],"predecessor-version":[{"id":1306,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/1106\/revisions\/1306"}],"wp:attachment":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/media?parent=1106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/categories?post=1106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/tags?post=1106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}