<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Christopher Hall</title>
    <description>The latest articles on DEV Community by Christopher Hall (@chrishall78).</description>
    <link>https://dev.to/chrishall78</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F146829%2Faf388e6a-5aad-4df5-9835-e46b410f5e5e.jpg</url>
      <title>DEV Community: Christopher Hall</title>
      <link>https://dev.to/chrishall78</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chrishall78"/>
    <language>en</language>
    <item>
      <title>Accessibility Tips: Setting language</title>
      <dc:creator>Christopher Hall</dc:creator>
      <pubDate>Sun, 21 Jul 2019 16:52:43 +0000</pubDate>
      <link>https://dev.to/chrishall78/accessibility-tips-setting-language-13f9</link>
      <guid>https://dev.to/chrishall78/accessibility-tips-setting-language-13f9</guid>
      <description>&lt;p&gt;It helps to set the language of a page when you're developing to meet WCAG 2.0 standards. Specifically, the &lt;a href="https://www.w3.org/WAI/WCAG21/quickref/#language-of-page"&gt;3.1.1 - Language of Page&lt;/a&gt; rule.&lt;/p&gt;

&lt;p&gt;You can accomplish this with the &lt;strong&gt;lang&lt;/strong&gt; attribute on the &lt;strong&gt;html&lt;/strong&gt; tag, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Besides the &lt;a href="https://www.w3schools.com/tags/ref_language_codes.asp"&gt;language code&lt;/a&gt;, you can also add a &lt;a href="https://www.w3schools.com/tags/ref_country_codes.asp"&gt;country code&lt;/a&gt; to make the language more specific. For example, this would indicate British English:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en-GB"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you would like to set a specific piece of content to a different language, use the &lt;strong&gt;lang&lt;/strong&gt; attribute there as well. This will help screen readers pronounce the content correctly.&lt;/p&gt;

&lt;p&gt;For example, a link to the Japanese version of a website would be pronounced "Nihongo", not "Ideographic Character Ideographic Character Ideographic Character".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"ja"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;日本語&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>a11y</category>
      <category>html</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
