Functional Images

Back to Overview
00:00 --> 00:03
Let's talk about functional images.

00:03 --> 00:08
So these are images that actually carry out a function where you have something that is

00:08 --> 00:16
an image, but if you click it or if you interact with it, it's also a user interface element.

00:16 --> 00:21
Usually those images are inside of a link or a button, but not always.

00:21 --> 00:28
But if you want to have keyboard accessibility, then they should, and Hampus is going to talk

00:28 --> 00:38
more about that. And let's see how that works. So here we have just an image of a logo. And

00:38 --> 00:44
the scenario here is that's on the top left, like it is actually on this website. Here

00:44 --> 00:50
you have the link here to W3C and then to Web Accessibility Initiative. And this is

00:50 --> 01:20
is an image and this is another image. So you have these images that are linked. And so W3C might be enough in this case, but you could even say like W3C home, just to make sure that this is where you link to. Having W3C logo would probably also work because people are used to having a link on the top left. But in general, it would be better to

01:20 --> 01:36
like really be specific what the action does. Here is the other way around. Again, this is a little

01:36 --> 01:44
bit the crocus bulbs example, where you have W3C home as actual text inside of the link and the

01:44 --> 01:53
logo so you don't want to repeat W3C home. So you just leave the alt text empty. Here

01:53 --> 02:02
we have an image, an icon that conveys that a link opens in a new window. In general,

02:02 --> 02:09
you should avoid opening links in a new window, but it's a good example for this. And so in

02:09 --> 02:15
In this case, the alternative text says "new window".

02:15 --> 02:24
And so if you read this with a screen reader, it would say "W3C homepage new window image".

02:24 --> 02:30
And then you would know, oh yeah, this opens a new window.

02:30 --> 02:36
So this is the functional part of this.

02:36 --> 02:43
Sometimes you have standalone icons like this print icon and as an alternative text you

02:43 --> 02:45
can use print this page.

02:45 --> 02:51
You don't want to use something like printer because that would not tell you what the functionality

02:51 --> 02:59
is that happens when you click the link or press the button.

02:59 --> 03:04
The same goes for the search input.

03:04 --> 03:07
In this case, we're using the input type image.

03:07 --> 03:10
It's a terrible way to do this.

03:10 --> 03:16
You should better use a button element around this and a normal image element, but this

03:16 --> 03:20
works and you can still do it.

03:20 --> 03:23
And here the alternative text is search.

03:23 --> 03:28
So when you go here, it says search button, which is, you know, that's what you want.

03:28 --> 03:29
Yeah.

03:29 --> 03:32
And those are all the functional use cases.

03:32 --> 03:34
I think this is pretty straightforward.

03:34 --> 03:41
You always want to, when you look at the button or the link, you want it to say what happens

03:41 --> 03:44
when you activate it.

03:44 --> 03:46
That's the main point.