Landmarks

Back to Overview
00:00 --> 00:14
All right, let's move over to landmarks. So basically this is now structure of the pages themselves, like on every website has their own structure.

00:14 --> 00:39
So in this case, the way website, they have like these three or four even parts on the top with a skip to content and then the must head section and then the main navigation, breadcrumb navigation, and then basically a section that has the site navigation in it and one that has the main content in it.

00:39 --> 00:43
And then you have footers and stuff like that.

00:43 --> 00:47
So this is always the same structure and that's good.

00:48 --> 00:51
You want to have this purpose on there.

00:52 --> 00:57
You want to have a good understanding of what's going on.

00:57 --> 01:07
Now, for people who are using assistive technology or screen readers, this might be something that they can't see, right?

01:07 --> 01:15
for them it's like mostly a linear thing or it's like hard to know what's going on where so

01:15 --> 01:24
to make it easier for assistive technologies to know where to go you can put in basically

01:24 --> 01:29
meta information that gives users more information on where they are on the page

01:29 --> 01:32
and also allows them to jump around.

01:33 --> 01:37
So you get the big picture view organizational wise,

01:38 --> 01:41
and then you get the way to jump to individual places.

01:42 --> 01:44
And so we call that landmarks.

01:44 --> 01:50
And landmarks are basically sections on the page that you can refer to.

01:51 --> 01:54
So if you look at the page structure tutorial,

01:54 --> 01:59
is what I would suggest you to look at after this.

02:00 --> 02:03
There are actually a couple of examples in there,

02:03 --> 02:09
and we're going to go through them just to give you the big picture of you.

02:11 --> 02:20
And these are the page regions or landmarks that are defined in the ARIA specification and in HTML.

02:21 --> 02:25
So you have like, it's really easy to get to those and to use those.

02:26 --> 02:33
So for example, if you have the page header, you can just use the header element and boom,

02:33 --> 02:35
you have your header landmark.

02:35 --> 02:40
It will be announced as a banner landmark actually because of history.

02:42 --> 02:50
And you get the way for user with assistive technology, they can immediately go there

02:50 --> 02:53
If they want to get that shown.

02:54 --> 02:56
Page footer, same thing.

02:56 --> 03:00
You just use the footer element and that works.

03:00 --> 03:06
Now for both header and footer, you have to make sure that they are not inside of

03:06 --> 03:11
an article or a section element, because then they only apply to this article or

03:11 --> 03:18
section element and are basically not general page wide headers and footers.

03:18 --> 03:26
Then you have the navigation, for example, you can have the main navigation and you can

03:26 --> 03:30
have the side navigation.

03:30 --> 03:36
And that is a super easy way to say like, oh yeah, we have these nav elements and that

03:36 --> 03:43
allows a screen reader user to just jump directly to those nav elements and doesn't need to

03:43 --> 03:52
like hunt around on the website, making sure that they find what they need. Same goes for the main

03:52 --> 04:02
element. So this can be only once on the page. In contrast to the navigation nav element, which can

04:02 --> 04:09
be multiple times on the page, you only want to have one main because, you know, it's the main

04:09 --> 04:15
information on the page. So it should be unique and you can jump to that as well.

04:16 --> 04:22
So this would be the main navigation. Then you can have complementary content, which is like

04:23 --> 04:33
additional information that pertains to the main content. And those are already the main

04:34 --> 05:04
landmarks that you can use. And using them is super useful, as I said, for people to know what's going on. So we can use, let me see, is this the tool? No. So here I have landmarks, a thing that shows landmarks. So here we have the nav

05:04 --> 05:13
landmark at the top, then we have a header, then we have another nav, then we have another nav, then we have a main that actually starts here.

05:13 --> 05:18
It's just the CSS is not cooperating.

05:18 --> 05:22
We have here nav, then we have a header inside of this main.

05:23 --> 05:27
So that is basically scoped to this article here.

05:28 --> 05:38
And then we have a navigation here for this in-page navigation as well.

05:38 --> 05:46
And you might say like, oh, that's a lot of navigations. How are users supposed to be like moving around there?

05:47 --> 05:55
Now, we already have seen in the example here, like in this example, that you can label those navigation areas.

05:55 --> 06:07
So when a screen reader gets into these navigation areas or shows them in the list, it will use the ARIA label basically as a name for that region.

06:07 --> 06:27
So if I go into the first accessibility fundamentals link and I tap to it, screen readers would announce main navigation or accessibility foundations link, main navigation.

06:28 --> 06:31
So you know that you are in a main navigation there.

06:32 --> 06:36
And then when you go through this, it would jump here, it would say home.

06:37 --> 06:45
And, you know, on some websites you would think like, oh, this is the main navigation and I'm in home, but you're actually in the breadcrumb navigation.

06:45 --> 06:49
So in this case, it has an ARIA label that says breadcrumb.

06:49 --> 06:53
So it's clear that like this is the breadcrumb navigation.

06:54 --> 06:55
Pretty clever.

06:57 --> 07:01
And yeah, and this is this is how you usually use page regions.

07:01 --> 07:06
It's very simple. This is already like a lot and probably too much.

07:08 --> 07:15
And yes, you have two good ways to label those regions. So you can use aria-labeled-by,

07:15 --> 07:25
which basically says like, oh, I'm pointing at this ID region heading. And I label my region,

07:25 --> 07:38
in this case nav, with this h2 region heading. So when I get inside of this container it will say,

07:38 --> 07:46
oh you're now reached region heading on the page. But you can, as I have shown, use aria-label as

07:46 --> 07:53
well. It depends a little bit on if you want to have the label shown or not. I'm a big fan of

07:53 --> 08:04
having visible content on the page that is also read for screen reader users. So for example,

08:04 --> 08:21
this page contents heading that should be used as the ARIA label, using ARIA labeled by for this

08:21 --> 08:30
navigation and so it is visible. So if this was to be copied over somewhere else and the title

08:30 --> 08:37
changed because that makes more sense in that context, it would change automatically. And if

08:37 --> 08:44
you use aria-label and you have a visible content there, you always have to make sure that they

08:45 --> 08:53
match up and yeah and that always creates problems so that that is how you look for those

08:54 --> 09:03
um probably a way to say uh show show show show show

09:07 --> 09:08
no

09:08 --> 09:32
Yeah, so this is the visual ARIA bookmarklet and that can show you all the ARIA accessible

09:32 --> 09:42
names, for example, and all the content depends a little bit on what you're hovering over.

09:43 --> 09:51
There's no accessible description, that should be okay. Yeah, and you get a good overview on

09:51 --> 09:57
what that does. I don't know if that's really what's supposed to be happening. Oh, there we saw

09:57 --> 10:04
like breadcrumb on the top left. I can't hover over there, but I will make it bigger in the video.

10:04 --> 10:10
Maybe on the top left it says "Egg name breadcrumb" and if I hover over here it says "Egg name main"

10:12 --> 10:15
and that basically means the ARIA label is properly applied.

10:18 --> 10:25
Take a really quick look at the success criteria around that landmarks.

10:27 --> 10:30
And the first one is bypass blocks.

10:30 --> 10:32
And the second one is meaningful sequence.

10:35 --> 10:39
So bypass blocks is the much, much more important one,

10:39 --> 10:41
especially in this context, but I want to mention both.

10:43 --> 10:46
Bypass blocks basically says a mechanism is available

10:46 --> 10:49
to bypass blocks of content that are repeated

10:49 --> 10:50
on multiple web pages.

10:51 --> 10:53
And this is what landmarks are.

10:53 --> 10:56
They allow you to freely bypass blocks

10:56 --> 11:25
and move there, especially if you're using screen reader. If you're using only a keyboard and you don't have assistive technology that you use, then skip link is super important. Like we have here, if I start from the top, there is the skip to content link. And if I press that, I immediately get navigated to the main content and then can move from there without having to like go through all of the pages at the top.

11:25 --> 11:32
Because if I start from the top and I don't have a skip to content link, then I'm here in for a long time.

11:32 --> 11:32
And press tap, tap, tap, tap, tap, tap, tap, tap

11:55 --> 12:02
but in general this makes sure that you know everyone has the same opportunity

12:02 --> 12:10
and then a little bit on meaningful sequence that doesn't really apply to the like landmarks and

12:10 --> 12:20
stuff but it helps to think about the landmarks when you are looking at the code and meaningful

12:20 --> 12:31
sequence basically asks that the sequence in which content is presented, that if that affects the

12:31 --> 12:38
meaning, that the correct reading sequence can be programmatically determined. So basically,

12:38 --> 12:46
if changing up the reading order would make something harder to understand, that should be

12:46 --> 13:16
avoid it. And I have a good example for that. So if I go to w3.org/wai/bed, no, it's demos/bed. This is a website that has basically an inaccessible and inaccessible website on it. And yeah, the design is

13:16 --> 13:26
very old and it needs an overhaul at some point, but it still shows the issues pretty nicely.

13:26 --> 13:35
So if you go to the inaccessible homepage, we have these three, what looks like three news items

13:35 --> 13:42
here. So we have the heat wave linked to temperatures, man gets nine months in violin case,

13:42 --> 13:54
and lack of brains hinders research. Now, if I look at that without CSS and linearizing this,

13:54 --> 14:02
basically you would see that these three, these three and then these three sections,

14:02 --> 14:13
So the headings, the images and the, um, uh, the like teaser text, they are in that order,

14:13 --> 14:14
like from left to right.

14:14 --> 14:24
So they don't, um, they don't form like one cohesive, uh, heading image, teaser text,

14:24 --> 14:26
uh, order.

14:26 --> 14:30
They do heading, heading, heading, teaser image, teaser image, teaser image.

14:30 --> 14:35
And then teaser text, teaser text, teaser text.

14:35 --> 14:46
So this reads actually like, after three years of effort, city scientists now agree that the primary cause of the 2003 heat wave was hot air from our mayor.

14:47 --> 14:51
These kinds of crimes need more creative, effective punishments.

14:51 --> 14:55
For example, we could require compulsory brain donations.

14:55 --> 15:02
huge drop off in brand donations due to the great success of slow traffic safe streets policy.

15:03 --> 15:11
So this shouldn't happen, right? That like the content gets distorted that way. And we see that

15:11 --> 15:19
sometimes these days, but it's like super rare as well. But I thought it weren't a mention here. So

15:20 --> 15:26
a meaningful sequence that the reading order is programmatically determined. Usually you do that

15:27 --> 15:36
by putting it in the reading order inside the HTML. Every section is the same. And so if we

15:36 --> 15:49
look at these in our inspector, we see that, just making it more visible here, this diff news bar

15:49 --> 16:00
goes among those three stories and then you have three stories here. And yeah, because that's

16:01 --> 16:08
how this is set up, it breaks to demonstrate exactly this issue.