WEBVTT

1
00:00:00.120 --> 00:00:02.150
- Next, let's cover language.

2
00:00:02.150 --> 00:00:05.520
Most screen readers can read
several different languages.

3
00:00:05.520 --> 00:00:08.140
Users select a default
language when installing

4
00:00:08.140 --> 00:00:10.180
and configuring their screen reader.

5
00:00:10.180 --> 00:00:12.850
If you don't specify the
language of a page, the screen

6
00:00:12.850 --> 00:00:16.210
reader will read it in the
user's default language.

7
00:00:16.210 --> 00:00:19.110
Now, the page language and
default screen reader language

8
00:00:19.110 --> 00:00:22.330
may happen to match by luck,
but if not, it can make the

9
00:00:22.330 --> 00:00:25.370
content difficult or
impossible to understand.

10
00:00:25.370 --> 00:00:29.130
Imagine English being read with
Spanish pronunciation rules.

11
00:00:29.130 --> 00:00:31.330
In addition to specifying
the main page language,

12
00:00:31.330 --> 00:00:34.640
you must also specify
the language of parts.

13
00:00:34.640 --> 00:00:36.900
For example, you might
have a quote in Hindi

14
00:00:36.900 --> 00:00:38.250
on an English page.

15
00:00:38.250 --> 00:00:41.170
You must specify that
language change for the quote.

16
00:00:41.170 --> 00:00:42.670
Let's see an example.

17
00:00:42.670 --> 00:00:46.080
Here I'm on the accessibility
page of the IRS website.

18
00:00:46.080 --> 00:00:49.160
I'll right click and
select view page source.

19
00:00:49.160 --> 00:00:53.120
At the very top, on the HTML
element, I see this attribute.

20
00:00:53.120 --> 00:00:56.470
Lang equals en; en stands for English.

21
00:00:56.470 --> 00:00:58.540
So this is the main page language.

22
00:00:58.540 --> 00:01:01.790
The code en comes from a
standard list of language codes,

23
00:01:01.790 --> 00:01:03.220
which you must use.

24
00:01:03.220 --> 00:01:06.640
For example, lang equals
English is not valid.

25
00:01:06.640 --> 00:01:09.830
Now going back to the page,
here we see some links to access

26
00:01:09.830 --> 00:01:11.580
the page in other languages.

27
00:01:11.580 --> 00:01:13.750
And notice those links are
written in the languages

28
00:01:13.750 --> 00:01:14.760
themselves.

29
00:01:14.760 --> 00:01:17.680
For instance, Russian is written as русский.

30
00:01:17.680 --> 00:01:20.910
I'm going to right click
this link and select inspect.

31
00:01:20.910 --> 00:01:23.960
And here on the link element,
I have this attribute,

32
00:01:23.960 --> 00:01:27.510
lang equals ru, which tells me
that this link text is written

33
00:01:27.510 --> 00:01:28.640
in Russian.

34
00:01:28.640 --> 00:01:30.747
So you can apply the lang
attribute to block level

35
00:01:30.747 --> 00:01:32.423
and inline elements.

