Live Session (2024)

Back to Overview
00:00-00:04
All right.

00:04-00:13
Welcome to the live session on Way ARIA, which is one of the most technical topics.

00:13-00:16
I think probably the most technical topic.

00:16-00:22
And so if you had like, you know, if this was like, and I know it's like the videos

00:22-00:26
are a lot of like just listing like things and trying to explain them.

00:26-00:33
But like I think the real like fun or the real like understanding comes when you actually

00:33-00:35
like use some of these.

00:35-00:38
So that's what we're going to do here in this session.

00:38-00:45
I will show a couple of like ARIA examples, a couple of non-ARIA examples and just show

00:45-00:50
also how they work using the screen reader.

00:50-00:58
So you can, you know, get more of a understanding of like what different things do.

00:58-01:02
And that's, yeah, that's like the main goal of the session.

01:02-01:07
I want to start as always asking if there are any questions or if you had like any,

01:07-01:09
you know, problems understanding.

01:09-01:15
If there's anything I should like explain again.

01:15-01:21
This is your time.

01:21-01:30
As always, I'm always a bit curious about the single page app or the app perspective

01:30-01:31
of things.

01:31-01:35
There's an angle there.

01:35-01:40
And the differences from web, like when it comes to ARIA use, because I think it's a

01:40-01:48
little bit like it's a little bit more extensive sometimes in apps, let's call it.

01:48-01:53
Yeah, I mean, the basis of ARIA is for accessible web applications, right?

01:53-01:54
It's right in the name.

01:54-02:03
So the idea is like when you have applications, you have more complicated interactions and

02:03-02:07
that's where you want to like use some of the ARIA stuff.

02:07-02:10
Most of the things are like just for like custom components.

02:10-02:18
So if you want to do it like really doing like things that are like very custom to your

02:18-02:24
application but should function like something that's not custom, that's when you would use

02:24-02:25
them.

02:25-02:37
And like and it's fun because ARIA is built upon those accessibility APIs, right?

02:37-02:46
And so that means basically that you have the you have built in there that a lot of

02:46-02:50
what you're doing with ARIA is also in the different platforms.

02:50-02:53
You know, it's not a one on one thing.

02:53-02:59
So if you're thinking about native applications on iOS, for example, it's called traits.

02:59-03:01
It's what like ARIA would call roles.

03:01-03:07
So there's always like these slightly different ways to express things and the ARIA way is

03:07-03:16
trying to like give us a common wording for that stuff and how it is applied to web.

03:16-03:17
That make sense?

03:17-03:18
Yes.

03:18-03:19
Thank you.

03:19-03:20
Yeah, sure.

03:20-03:27
Any other questions?

03:27-03:32
And I will have a couple of like examples on like, you know, what you can do in apps

03:32-03:34
when I show the demos.

03:34-03:36
Okay.

03:36-03:44
Looks like no other questions there.

03:44-03:51
Then I will start to show the demo.

03:51-03:52
Rearranging stuff.

03:52-03:57
Always think you have it arranged as you want it and then you don't.

03:57-03:59
Ah, fun.

03:59-04:00
Share.

04:00-04:03
There we go.

04:03-04:12
That's what I want to do.

04:12-04:16
Here we are.

04:16-04:19
And I will make this a little bit bigger.

04:19-04:26
I will make the screen smaller.

04:26-04:30
And then I want to go here and switch on that.

04:30-04:34
We see keystrokes because that's cool.

04:34-04:36
Good tab.

04:36-04:38
Perfect.

04:38-04:43
Because when I show screen reader, right, you want to know what I'm doing, I assume.

04:43-04:46
Make this bigger.

04:46-04:47
Yes.

04:47-04:48
Perfect.

04:48-04:49
Okay.

04:49-04:59
And then I'm going to so I have this code pen repository with ARIA demos and I put that

04:59-05:09
in the chat but it's also linked from the what's it called from the thing where I put

05:09-05:10
the things.

05:10-05:12
You know what I mean.

05:12-05:16
Where the video is from the page with the video.

05:16-05:19
That's what I wanted to say.

05:19-05:25
And basically it's like it's just a random collection of stuff that I've seen and that

05:25-05:27
I played around with.

05:27-05:32
It doesn't mean that all of these things are best practices, of course.

05:32-05:39
But just also to like figure out like how different things just work.

05:39-05:41
Yeah.

05:41-05:43
And it's a number of things.

05:43-05:47
Let's see if we can go through all probably.

05:47-05:53
So this the first one is like one of my first things I've ever done on code pen.

05:53-05:58
It's from November 13th, 2015.

05:58-06:06
And it was part of the blog post that I did for 24 ways.

06:06-06:12
Which was the accessibility mindset in 2015.

06:12-06:15
So where do I find this?

06:15-06:16
Archives.

06:16-06:18
There we go.

06:18-06:19
2015.

06:19-06:28
And then here on the 17th I did this the accessible mindset article.

06:28-06:29
Which I really like.

06:29-06:33
It's still something I'm incredibly proud of.

06:33-06:37
And if you don't know what 24 ways was, it basically was like an event calendar where

06:37-06:43
you got like, you know, one article a day from the 1st to the 24th.

06:43-06:45
And yeah.

06:45-06:47
And I was allowed to publish there.

06:47-06:48
Which is awesome.

06:48-06:49
But yeah.

06:49-06:52
Just wanted to start with that.

06:52-06:55
Because it's quite old.

06:55-07:02
But it still like shows some of the like thinking around buttons and how to use them.

07:02-07:08
So let's see.

07:08-07:10
So we have this edit button.

07:10-07:13
And it is basically just a pen.

07:13-07:16
And then we have a pen with edit next to it.

07:16-07:21
And then we have two other buttons with just the pen icon on it.

07:21-07:25
And then we have a button without an icon on it.

07:25-07:29
And then another button with an icon on it.

07:29-07:33
But they're all going to be announced like slightly differently.

07:33-07:36
Which is exactly what I want to show.

07:36-07:39
Because they have been implemented differently, too.

07:39-07:41
So let me close this.

07:41-07:43
And let me close that.

07:43-07:48
So we go from like just having the icon as a span.

07:48-07:54
So this is the typical like font awesome way to implement stuff.

07:54-07:56
We then have the edit visible.

07:56-07:57
Then we have a title here.

07:57-08:00
We have the ARIA label here on those two.

08:00-08:04
So this is the button where you see the icon.

08:04-08:08
And this is the button where the icon is broken.

08:08-08:11
Oh, that was not good.

08:11-08:12
Where the icon is broken.

08:12-08:14
That's why it says icon pencil, too.

08:14-08:17
Just like to break it.

08:17-08:21
And then here we have the SVG.

08:21-08:23
And we're putting a raw image on it.

08:23-08:33
And then using ARIA labeled by to reference this pencil title here inside of the SVG.

08:33-08:37
And that basically makes this an image with the alternative text edit.

08:37-08:40
And it will be read as such.

08:40-08:45
So let's show the live examples.

08:45-08:48
And then we can talk a little bit about that.

08:48-08:56
I'm switching my voice over.

08:56-08:59
And I think I'm not sharing my audio.

08:59-09:06
So I need to do that.

09:06-09:10
So now you should be able to hear the screen reader.

09:10-09:11
Perfect.

09:11-09:12
>> Safari.

09:12-09:13
ARIA.

09:13-09:19
>> And now we just tap through the individual buttons.

09:19-09:25
This says only button because there is no accessible name on the button.

09:25-09:28
Then we have the edit.

09:28-09:37
And here you see that like voiceover recognizes there is a character because this is always

09:37-09:39
using characters but can't read it.

09:39-09:41
So it doesn't.

09:41-09:46
But it recognizes there is a character there.

09:46-09:49
Then we have here edit button, edit.

09:49-09:55
And if you look at which of the examples that is.

09:55-10:01
That is actually this title edit button.

10:01-10:07
And it says it twice because title usually only gives you accessibility description.

10:07-10:12
So basically an ARIA described by.

10:12-10:16
But if there's no accessible name, it's also used as the ARIA label.

10:16-10:18
So it says edit button.

10:18-10:20
Like edit is the ARIA label.

10:20-10:25
And then it says edit at the end because the description is also edit.

10:25-10:32
So this is a fun little quirk that I like to share.

10:32-10:34
And then we press tab again.

10:34-10:36
It only says edit button.

10:36-10:38
This is the ARIA label.

10:38-10:40
So now there is no description.

10:40-10:45
So it doesn't like say the edit twice.

10:45-10:48
Then we have edit button on this one without the image.

10:48-10:56
And this is where I always warn between the disconnect between what's visually shown and

10:56-10:59
what's in the ARIA label.

10:59-11:03
Because here the visual could be anything.

11:03-11:05
It would still be announced as edit.

11:05-11:09
So you want to try to connect that a bit.

11:09-11:14
And that works well with the SVG example which is the last one.

11:14-11:19
It basically does the same thing because the accessible name again comes from the image

11:19-11:22
alternative text.

11:22-11:27
And then because it's like inside of the SVG, it's always consistent.

11:27-11:33
If you copy this, copy it in another button, it will always show an edit icon and also

11:33-11:40
have the edit alternative text which is exactly what we want.

11:40-11:47
>> Wondy has left the meeting.

11:47-11:49
Wondy has joined the meeting.

11:49-11:54
>> So can I mute those announcements?

11:54-11:55
Let's see.

11:55-11:56
>> Voice over off.

11:56-12:09
>> Because it's totally fine if you need to leave and join the meeting.

12:09-12:12
I don't think I can.

12:12-12:14
No problem at all.

12:14-12:21
So that's the first example about like the edit button and how that works.

12:21-12:24
I think it's pretty straightforward.

12:24-12:31
And you usually want to just make sure that like you keep track of your ARIA labels because

12:31-12:42
otherwise it's very hard to like to have an accessible UI, right?

12:42-12:45
Then let's talk here.

12:45-12:51
Here I have an example deactivating ARIA current item for mouse users.

12:51-12:58
So this is actually a technique I really like.

12:58-13:07
Maybe not doing this exact thing, but generally like technically making sure that if you use

13:07-13:15
an ARIA to convey something, that you use that as a styling hook for your content.

13:15-13:23
So here I use, you know, if it has ARIA current page, I cancel pointer events.

13:23-13:24
You can do that.

13:24-13:29
So this link, despite being a link in the code, I cannot click on it.

13:29-13:32
Just doesn't fire the event.

13:32-13:38
And I also put text decoration and color zero on it.

13:38-13:40
Usually you don't want to do that, right?

13:40-13:42
You usually want to just leave it as a link.

13:42-13:46
But this is just an example.

13:46-13:49
As I said, not all examples are best practices.

13:49-13:51
Some are only to show what's going on.

13:51-13:55
And let's switch voice over on again.

13:55-13:56
>> Voice over on Safari.

13:56-13:57
ARIA.

13:57-13:58
Deactivating ARIA current item for mouse users.

13:58-13:59
Live preview.

13:59-14:00
Web content.

14:00-14:01
>> Yeah, yeah.

14:01-14:02
You talk too much.

14:02-14:03
>> Link.

14:03-14:04
Menu item two.

14:04-14:05
List five items.

14:05-14:06
Link.

14:06-14:07
Menu item one.

14:07-14:08
Link.

14:08-14:09
Menu item two.

14:09-14:10
Current page.

14:10-14:11
Link.

14:11-14:12
Menu item three.

14:12-14:15
>> So it now says current page link menu item three.

14:15-14:20
And if I press return, it also would go there.

14:20-14:22
Because that's not a pointer event.

14:22-14:30
Now because this is like only hashtag as a URL, it doesn't actually activate.

14:30-14:33
But yeah, it's only disabled for pointer events.

14:33-14:35
You have to keep that in mind as well.

14:35-14:37
Yeah, and then -- >> Link.

14:37-14:38
Menu item four.

14:38-14:39
Menu item five.

14:39-14:43
>> And it will announce the other menu items.

14:43-14:47
But that's how you get this connection between the ARIA --

14:47-14:48
>> Deactivating ARIA current item for mouse users.

14:48-14:49
Web content.

14:49-14:52
>> That you should be using.

14:52-14:55
And the styling.

14:55-14:57
And of course, like if you would use -- >> ARIA demo.

14:57-14:58
A collection by Eric Egger.

14:58-14:59
Code pen.

14:59-15:00
Web content.

15:00-15:02
>> Don't talk so much.

15:02-15:05
If you want to -- >> Open link in the background.

15:05-15:06
HTML coeditor.

15:06-15:07
93% loaded.

15:07-15:10
>> In like a normal navigation.

15:10-15:20
Like here I have horizontal navigation with home products, services and about.

15:20-15:30
And the products is highlighted as the current menu item.

15:30-15:33
It's basically doing the same thing.

15:33-15:34
Here it says -- >> CSS coeditor.

15:34-15:35
Edit text.

15:35-15:38
>> When -- >> And ARIA current equals page background

15:38-15:41
color.

15:41-15:45
>> So this is a tip if you're using a screen reader and you're not used to it.

15:45-15:50
If you press the left control button on your keyboard, it shuts up immediately.

15:50-15:53
So that's good to know.

15:53-15:57
Because otherwise just going to talk again.

15:57-16:01
And if you're not used to it, like it's a little bit annoying.

16:01-16:11
But here I go like, you know, I format all my navigation items and then I say if something

16:11-16:16
is designated as the current page, then I do the background color as dark red and the

16:16-16:20
color as white and that highlights visually what's going on.

16:20-16:29
So I only -- so this makes sure that when I mark something as the current menu item,

16:29-16:34
it will be highlighted visually and for screen reader users, assistive technology users.

16:34-16:36
So that's usually what we want.

16:36-16:38
>> From WANDI to everyone.

16:38-16:43
Sorry can you slowly with Vokea -- >> One unread messages.

16:43-16:45
>> Zoom.us.

16:45-16:47
Show chat.

16:47-16:53
Press command plus -- >> Voiceover off.

16:53-16:59
>> Yeah, I can make the voiceover a little bit slower.

16:59-17:02
Sure.

17:02-17:03
No problem.

17:03-17:04
Good request.

17:04-17:10
Where do I do that?

17:10-17:28
Oh, it's on the speech.

17:28-17:34
That's too slow.

17:34-17:42
So let's try this.

17:42-17:50
Okay and I switch on voiceover and we see how it works with the navigation here.

17:50-17:52
>> Voiceover on Safari.

17:52-17:53
AXL/Chats.

17:53-17:54
Link.

17:54-17:55
Home.

17:55-17:59
List four items.

17:59-18:04
So here we -- and we get from the screen reader automatically that it's a list with four items

18:04-18:05
in it.

18:05-18:07
>> From WANDI to everyone.

18:07-18:08
It is good.

18:08-18:10
>> Thank you.

18:10-18:12
Great.

18:12-18:17
And then it says link home as the current thing that we're on.

18:17-18:19
And then if we press tab.

18:19-18:21
>> Current page link.

18:21-18:22
Products.

18:22-18:27
>> It says that this is the current page because I have ARIA current page on it and, you know,

18:27-18:35
make sure that when that's the case, it's also highlighted in color.

18:35-18:38
>> Voiceover off.

18:38-18:40
>> So that's the second of those.

18:40-18:49
Then I have another -- oh, yeah, this is also a fun one that many people are asking about.

18:49-18:59
Like, you know, you might want to use buttons instead of -- or you want to use divs instead

18:59-19:02
of buttons because for styling reasons.

19:02-19:09
That's often something that we hear and now here for the example, I have four buttons.

19:09-19:12
First, second, third and fourth.

19:12-19:13
That's the labels.

19:13-19:14
The visible labels.

19:14-19:19
And I will now go through with the tab key and see how they read.

19:19-19:26
Then we will go through it with the screen reader arrow key navigation to see, like,

19:26-19:28
what's the difference there.

19:28-19:32
And then I will explain what is the difference between those, like, four buttons that look

19:32-19:34
the same.

19:34-19:43
And if I'm clicking on them, they all open a dialog box and it just works, you know,

19:43-19:44
as expected.

19:44-19:49
Like, for a mouse user, there is no difference between those four.

19:49-19:53
It's all clickable with the mouse.

19:53-19:58
But that's obviously not the case with the screen reader or with the keyboard.

19:58-20:01
Because otherwise I wouldn't show you the demo; right?

20:01-20:06
And we can use the screen -- the non-screen reader keyboard first.

20:06-20:07
So I press tab.

20:07-20:09
I go to the first button.

20:09-20:16
And I can press return and it opens the dialog box and I close the dialog box again.

20:16-20:18
Then I press tab again.

20:18-20:20
It goes to third immediately.

20:20-20:24
So it just skips over second.

20:24-20:29
But I can then press return and nothing happens.

20:29-20:30
I press space.

20:30-20:31
Nothing happens, too.

20:31-20:35
So this is, like, the button is reachable.

20:35-20:37
But I cannot activate it.

20:37-20:39
Not optimal.

20:39-20:44
And then I press tab again and I go to fourth and I press return and that does nothing and

20:44-20:48
I press space and that also does nothing.

20:48-20:50
And these are four different implementations.

20:50-20:56
So only the first one is accessible using keyboard only.

20:56-21:02
Now, for screen readers, it's a little bit different.

21:02-21:06
>> VoiceOver on Safari.

21:06-21:12
>> Rani has joined the meeting.

21:12-21:15
>> So pressing tab to go to the first item.

21:15-21:16
>> First button.

21:16-21:19
>> So I get the information first and button.

21:19-21:25
So that means the ARIA label, the accessible name is first and the role is button and I

21:25-21:28
can open it with return and space.

21:28-21:30
>> Close toggle button.

21:30-21:31
First button.

21:31-21:34
>> And now space.

21:34-21:36
>> Close toggle button.

21:36-21:37
First button.

21:37-21:45
>> I don't know why the default close button in Safari dialog boxes, default dialog boxes

21:45-21:48
is a toggle button.

21:48-21:49
Don't @ me.

21:49-21:50
I didn't do this.

21:50-21:54
It's a default browser default thing.

21:54-21:58
Then I press tab again to go to the second one which will be skipped because we already

21:58-21:59
know that.

21:59-22:00
>> Third group.

22:00-22:07
>> And now it's announced as third group which is like this is weird and the reason is because

22:07-22:14
this is not designated as a button.

22:14-22:17
It's just a div with a tab index zero.

22:17-22:25
So you can reach it using the tab key but it will not give you your information that

22:25-22:28
you can activate it using return or space.

22:28-22:31
And in this case you actually can't.

22:31-22:34
So if I press return, nothing happens.

22:34-22:35
Space, nothing happens.

22:35-22:38
And then I press tab again.

22:38-22:39
>> Fourth button.

22:39-22:46
>> Now it says fourth button but it's still return and space do nothing.

22:46-22:54
What I can do is if I go back to the first, I can also use arrow key navigation.

22:54-22:57
>> Close tab first button.

22:57-23:03
>> And on voiceover that's pressing control and option at the same time and then use the

23:03-23:07
arrow keys.

23:07-23:11
And that basically skips through more than just interactive elements.

23:11-23:15
The tab key only goes through interactive elements.

23:15-23:20
The arrow key navigation also goes through text, through paragraphs and stuff like that.

23:20-23:22
So if I do this here.

23:22-23:24
>> Second clickable.

23:24-23:29
>> It goes to second and it announces it as clickable because there's a click event handler

23:29-23:30
on it.

23:30-23:36
Now this is the screen reader doing the work for you.

23:36-23:41
So this is reachable with the screen reader but keyboard only users have no chance of

23:41-23:42
reaching it.

23:42-23:44
And you still if you press return.

23:44-23:45
>> Close toggle button.

23:45-23:47
>> That actually works.

23:47-23:48
>> You first button.

23:48-23:50
>> Maria has joined the meeting.

23:50-23:56
But then it moves the focus to another like to the first item.

23:56-23:58
So that's not optimal.

23:58-24:02
>> Second clickable.

24:02-24:08
>> But that's basically how screen reader try to circumvent or give users options even

24:08-24:13
if the web developer did it wrong.

24:13-24:19
Now you can always use the voiceover keys so control and option and press return.

24:19-24:21
>> Manfred hand has been raised.

24:21-24:24
>> Zoom.us has new window.

24:24-24:27
>> Press CMD plus tilde to open pop up.

24:27-24:28
Manfred hand has been lowered.

24:28-24:29
>> Sorry.

24:29-24:33
>> It doesn't have to lower the hand.

24:33-24:36
We just have to like work through it.

24:36-24:40
Let me quickly show the rest of the demo.

24:40-24:42
And then I can answer the question.

24:42-24:49
So what you can do is you can press control, option and return and that will basically

24:49-24:53
simulate a click at that point on the page.

24:53-24:54
So if I do that.

24:54-24:57
Oh, maybe it's space.

24:57-24:59
Oh, yeah.

24:59-25:06
That doesn't work because I have overwritten that with like resize command for my window.

25:06-25:07
So that's good.

25:07-25:09
Why am I just in the room?

25:09-25:10
>> Third group.

25:10-25:12
>> Let me double check that.

25:12-25:13
>> Clickable.

25:13-25:16
>> It should work.

25:16-25:19
But yeah, I think it's command, option and space.

25:19-25:23
But I use that to resize my window because I'm not the screen reader user normally.

25:23-25:31
But that would like simulate a click in the middle of the selected thing.

25:31-25:36
And then this would be activated like clicking on it with the keyboard.

25:36-25:38
With the mouse.

25:38-25:39
And then we have third here.

25:39-25:40
>> Third.

25:40-25:41
Clickable.

25:41-25:43
>> And also third clickable.

25:43-25:46
So you have the tab index zero around it.

25:46-25:50
So you can have it with the tab key.

25:50-25:55
But it has a little bit different announcement when you're using arrow key navigation.

25:55-25:57
>> Fourth button.

25:57-26:02
>> And then fourth is button again because there is the roll button on it.

26:02-26:05
So Manfred, your question.

26:05-26:06
>> And now I was just.

26:06-26:07
>> Voiceover off.

26:07-26:08
>> Yeah.

26:08-26:11
Maybe you're coming to that later.

26:11-26:20
But I was thinking since we have voiceover or screen reader users using the arrows to

26:20-26:22
navigate in one sense.

26:22-26:29
And then sometimes, you know, in terms of tab or keyboard navigation, you can have non-screen

26:29-26:38
reader users using and screen reader users using like the keys to, the arrow keys to

26:38-26:40
navigate within a component.

26:40-26:43
For example, a drop down and things like that.

26:43-26:48
So are you, could you later, if you're going through that, take some examples a little

26:48-26:54
bit about how to handle the potential conflict there between the two.

26:54-26:55
>> Yeah.

26:55-27:04
So the reason is why you press usually voiceover keys and arrow keys is to avoid those conflicts.

27:04-27:10
So if I'm just navigating using the tab key, I don't press any of the modifiers, right?

27:10-27:15
I just use tab and shift tab to go through it.

27:15-27:19
If I'm using arrow key navigation for screen readers, I usually press another button.

27:19-27:20
Now there are screen readers.

27:20-27:21
>> Okay.

27:21-27:23
Command or option or something with that.

27:23-27:27
>> So control option is the default for voiceover.

27:27-27:29
But you can basically map that to anything.

27:29-27:30
>> Okay.

27:30-27:31
So I didn't catch that.

27:31-27:36
So you actually add another button to it.

27:36-27:39
So there won't be a conflict unless.

27:39-27:46
But I guess there could be conflicts like when people actually forget to or, you know,

27:46-27:47
accidentally.

27:47-27:48
>> Yeah.

27:48-27:57
I mean, I put a conflict on myself by like saying my window manager should use a command,

27:57-28:00
control option and space to like maximize the window, right?

28:00-28:02
So yeah, I brought that on myself.

28:02-28:07
But like a screen reader user wouldn't do that, I hope.

28:07-28:10
So they could fix it.

28:10-28:18
There can be websites that interfere with some screen reader things, for example.

28:18-28:22
So on voiceover, it's normal to press the voiceover keys.

28:22-28:27
That's the default expectation for navigation.

28:27-28:31
But in other browsers or screen readers, it's a bit different.

28:31-28:40
So for example, in I think JAWS, you just press the H button to go to the next heading.

28:40-28:49
And so if your application just uses the one H button to do something, then that's problematic.

28:49-28:50
>> Yeah.

28:50-28:51
Okay.

28:51-29:01
>> And that's why we have the WCAG character key shortcuts failure where you basically

29:01-29:06
cannot use like one like single character as a shortcut unless you have like --

29:06-29:10
>> Or your area like navigation, let's call it.

29:10-29:11
>> Yeah.

29:12-29:13
Okay.

29:13-29:14
Good.

29:14-29:15
Good stuff.

29:15-29:16
>> Yeah.

29:16-29:20
And just look -- just a quick look in the code.

29:20-29:28
And this one is actually pretty good documented, which I usually don't do.

29:28-29:32
Like my documentation skills are very bad.

29:32-29:34
So this is pretty nice.

29:34-29:42
So you have this button with the class, which I'm trying to be fancy here, just to make

29:42-29:46
the styling for all the same.

29:46-29:51
Then you have the diff with the class and second.

29:51-29:54
And then you have a diff with the class and tab index zero.

29:54-29:58
That's why you can get there with the tab key.

29:58-30:14
And I just blocked recently an article on my blog which talks about the difference between

30:14-30:20
programmatically focusable and sequentially focusable elements.

30:20-30:25
And things with tab index zero, like here, they are in the tab sequence.

30:25-30:36
So when you press tab, it will be set inside of the different -- yeah.

30:36-30:39
Inside or in sequence basically of what it is.

30:39-30:41
So this with tab index zero is on third.

30:41-30:47
Because there's -- or second, because there's one focusable element before it.

30:47-30:54
And then this is on third, because it comes later in the source order.

30:54-31:01
And if that fourth diff was like the -- like went one up, going to the third position,

31:01-31:05
it would be before the one that has the third on it.

31:05-31:08
This is, you know, very hard to explain.

31:08-31:12
But basically tab index zero makes stuff tabable.

31:12-31:18
But still, like, things like pressing return or space doesn't work if you only specify

31:18-31:23
an on click event handler, which I did here.

31:23-31:25
Because that only reacts on click.

31:25-31:33
And if you use a button, then by default it adds -- like basically it translates.

31:33-31:36
It says like, oh, on key down, return space.

31:36-31:39
I will also trigger the click event.

31:39-31:43
Although it's not really a click.

31:43-31:46
But if you use a diff, it will not do that for you.

31:46-31:51
So you basically have for everyone that is not a button.

31:51-32:00
Basically you have to put in your -- I don't know, on key down probably events to -- or

32:00-32:05
on key up events to like take care of return and space, you know, manually.

32:05-32:07
Which nobody wants to do.

32:07-32:11
Just use a f-ing button.

32:11-32:12
And yeah.

32:12-32:19
And I can show that in the example as well.

32:19-32:26
Like even if I use a screen reader, it should not react to pressing return or space on the

32:26-32:31
third and fourth buttons.

32:31-32:33
>> VoiceOver on Safari.

32:33-32:36
Close tab button first third group.

32:36-32:39
>> When I press return, nothing happens.

32:39-32:42
Space, nothing happens.

32:42-32:45
>> Fourth button.

32:45-32:46
>> For fourth.

32:46-32:53
And so you see that like putting that role, that button role on the fourth button makes

32:53-32:56
that promise that return and space works.

32:56-32:57
But it doesn't.

32:57-33:04
So you have to be, you know, aware that like you don't get any mechanical advantages from

33:04-33:05
just using roles.

33:05-33:07
That's just not what they do.

33:07-33:13
They are just for like information purposes in the end.

33:13-33:16
>> VoiceOver off.

33:16-33:17
>> Okay.

33:17-33:19
Let's try another one.

33:19-33:26
I should put the blog post in the chat.

33:26-33:32
There we go.

33:32-33:38
I'm bad at operating chat today.

33:38-33:39
Okay.

33:39-33:42
Oh, yeah.

33:42-33:47
Another nice example of like what you can do with ARIA because it is like it's very

33:47-33:54
powerful and you most of the things that you can do with ARIA you shouldn't do.

33:54-34:01
Like I put like I put into the videos, you know, the rules of ARIA and that you shouldn't

34:01-34:04
use it if you can do it another way.

34:04-34:11
Here we have fun thing that I saw on a blog a couple of years ago which basically was

34:11-34:19
like oh, I want to have this fancy like almost 3D or like I don't know what the name is.

34:19-34:25
Like RGB split up name of heading.

34:25-34:27
And this is for France Nouvelle.

34:27-34:31
I'm really bad at French words.

34:31-34:32
Sorry.

34:32-34:42
And basically the author did that do this with using a data attribute and basically

34:42-34:48
used the data attribute and then used before and after like I did here to like use the

34:48-34:50
content of the data attribute and put it out.

34:50-35:01
Now, if you use before and after, that these strings will usually be added to your accessible

35:01-35:02
name.

35:02-35:10
So if I have France Nouvelle in there and then I put France Nouvelle as the before and

35:10-35:18
the after attribute there, it will use those and it will basically read it three times.

35:18-35:21
We can actually just simulate that here.

35:21-35:26
I think real quick.

35:26-35:37
So I now do data, ARIA label and then I will do log.

35:37-35:41
Copy that.

35:41-35:45
I should copy everything.

35:45-35:46
No.

35:46-35:52
Good like it is.

35:52-35:56
Just a little CSS trickery here.

35:56-36:02
So data ARIA label.

36:02-36:10
Just like it's not a good data attribute.

36:10-36:17
And then you should get for before and after the content of the data ARIA label.

36:17-36:20
So now these two look the same.

36:20-36:26
Let me put the bad one first.

36:26-36:33
There we go.

36:33-36:36
And then we can see how that reads.

36:36-36:39
And you know, and we don't actually have to use a screen reader for this.

36:39-36:51
Like if you go right click inspect element and then you can here under node, this is

36:51-36:54
very small.

36:54-36:57
There.

36:57-37:08
This is better.

37:08-37:13
Here under node you can see under accessibility it says the label which is the accessible

37:13-37:14
name.

37:14-37:15
This is in Safari.

37:15-37:17
It's like terribly named.

37:17-37:25
It says three times France, but here on the H1 with the ARIA label, it basically overwrites

37:25-37:29
what's inside of the element with the ARIA label.

37:29-37:32
So you're reusing this for the visuals.

37:32-37:36
But then you basically say like, yeah, don't like listen to anything that's inside of this

37:36-37:39
H1, just override it.

37:39-37:45
So you get this like just much simpler announcement.

37:45-37:55
So let's try this out.

37:55-37:59
So using the arrow key navigation again.

37:59-38:02
Heading level one, three items.

38:02-38:03
France, Norway.

38:06-38:08
Three times.

38:08-38:10
And then we go to the next one.

38:10-38:12
Heading level one, three items.

38:12-38:15
France, Norway.

38:15-38:17
And this is also one of the fun things.

38:17-38:22
Like because this is now an ARIA label, it will read that in my system language instead

38:22-38:25
of the language specified.

38:25-38:30
Which like is not optimal, but I don't think there's an optimal way to do this.

38:30-38:31
In reality.

38:31-38:36
If you want to have it not as a graphic or something like that.

38:36-38:37
But yeah.

38:37-38:39
It's a fun -- >> Voice over off.

38:39-38:40
>> Fun thing to do.

38:40-38:46
And I mean, I specified the language on here.

38:46-38:50
So technically it should say it in the right language.

38:50-38:53
But like it's, you know, these things are fickle.

38:53-38:58
That's why the recommendation is don't use ARIA if you can.

38:58-39:05
What you could do is basically put the H1 inside of a diff and then, you know, do the

39:05-39:12
before and after with the like data attribute on the diff around it and then probably wouldn't

39:12-39:14
read it at all.

39:14-39:16
So there are probably ways around that.

39:16-39:20
Maybe I should investigate that at some point.

39:20-39:21
Yeah.

39:21-39:22
Then, yeah.

39:22-39:29
I want to show a couple of other things like this toggle button and the play/pause button

39:29-39:34
and this counter.

39:34-39:36
>> I have a question.

39:36-39:37
>> Sure.

39:37-39:38
Go ahead.

39:38-39:45
>> Do you have an example of a model where you trap the focus so you don't navigate with

39:45-39:47
all the elements in the background?

39:47-39:48
That would be interesting.

39:48-39:51
>> Yes, I do.

39:51-39:57
But like for models, I would just recommend not using ARIA for that but use the native

39:57-40:00
HTML dialog element.

40:00-40:07
Because it has everything built in and like doing a model properly with ARIA is like pretty

40:07-40:12
hard actually because you have to make everything in the background.

40:12-40:18
But when you're using the native dialog element, you get all of that for free.

40:18-40:25
So yeah, I can show the example here on my blog.

40:25-40:28
And that has like here the preferences have a dialog.

40:28-40:32
So I can switch on.

40:32-40:35
>> VoiceOver on.

40:35-40:36
Visit link.

40:36-40:37
Preferences.

40:37-40:39
Dialog popup button.

40:39-40:40
Banner.

40:40-40:41
So preferences.

40:41-40:42
Beta.

40:42-40:44
And five more items.

40:44-40:45
Web dialog.

40:45-40:46
Use system setting.

40:46-40:51
This setting adapts to the preference you chose in your system setting.

40:51-40:55
It changes the appearance of the site when you change your settings.

40:55-40:56
Use system setting.

40:56-41:01
This setting adapts to the preference you chose in your system setting.

41:01-41:05
It changes the appearance of the site when you change your settings.

41:05-41:07
Selected radio button.

41:07-41:09
One of three.

41:09-41:10
Select a theme.

41:10-41:11
Group.

41:11-41:17
>> Oh, it read a lot of things twice which it didn't do when I programmed this.

41:17-41:25
>> So this HTML element automatically like adapts the focus on this dialog.

41:25-41:34
>> So if you use the native dialog element and then you use open modal as the JavaScript

41:34-41:40
open modal, it will basically make everything in the background inactive.

41:40-41:43
It will focus on the dialog.

41:43-41:47
And you can choose where you want to put the focus on.

41:47-41:50
So I put the focus on the first item here.

41:50-41:54
I think by default it uses the first interactive element.

41:54-41:57
But you could also put it on the heading, for example.

41:57-42:01
You know, depends a little bit on what you want to do.

42:01-42:03
But yeah, that's how it works.

42:03-42:05
It's like super straightforward.

42:05-42:06
>> Okay.

42:06-42:07
Thanks.

42:07-42:10
>> Voice over off.

42:10-42:20
>> And yeah, and the like, you know, support for browsers is pretty good as well.

42:20-42:22
And I can just show really quick.

42:22-42:25
So I have the button here.

42:25-42:30
And then I have where do I see the event listeners?

42:30-42:41
Yeah, I do have click event listener, of course.

42:41-42:43
That's not my event listener.

42:43-42:47
Here we go.

42:47-42:55
Yeah, you shouldn't use my like code that I use for my private stuff.

42:55-42:58
That's an example.

42:58-43:08
But yeah, basically like if you have like here I just take the where is the dialog?

43:08-43:09
Close dialog.

43:09-43:10
Preferences.

43:10-43:11
Oh, yeah.

43:11-43:14
This is it.

43:14-43:21
So basically here when the preferences button is clicked, then it gets the data from the

43:21-43:24
local storage.

43:24-43:29
And then it just opens the modal dialog here at the bottom.

43:29-43:37
And dialog is set as a constant or as a variable here.

43:37-43:41
Which is theme selector as the ID.

43:41-43:52
And if you look at the HTML real quick, I think it's all the way on the bottom.

43:52-43:57
And you see that that's just a dialog element here at the end of the screen.

43:57-43:59
And it will just like pop it open.

43:59-44:03
And you can format the background, everything.

44:03-44:04
It's really convenient.

44:04-44:07
I always recommend that.

44:07-44:12
Yeah, so that HTML element is recognized by the screen readers.

44:12-44:14
Yeah, exactly.

44:14-44:19
Like it uses all the default ARIA roles and things that you would expect.

44:19-44:25
Yeah, so you would not recommend trapping the focus in JavaScript by like having a list

44:25-44:32
of the elements and like excluding every other element in the DOM tree.

44:32-44:33
No, no.

44:33-44:37
And like this is all done by the dialog anyway.

44:37-44:40
Like you cannot jump out of the dialog here.

44:40-44:41
Yeah.

44:41-44:43
You know, using the tab key.

44:43-44:45
And you can close it with escape.

44:45-44:47
Like get everything free.

44:47-44:48
And it just works.

44:48-44:49
Yeah, okay.

44:49-44:50
Thanks.

44:50-44:56
So yeah, I really don't bother like teaching people how to do their own dialog.

44:56-45:01
It's like teaching people how to make their own cars when like you can just buy a car

45:01-45:05
from like the store.

45:05-45:08
All right.

45:08-45:13
Just another couple of demos before I think we make a break.

45:13-45:17
I think this is one of those where we make a break and then come back.

45:17-45:21
So this is a mute toggle button.

45:21-45:25
And we have the icon that has like a mute switch.

45:25-45:26
Now it's muted.

45:26-45:27
And then we change.

45:27-45:38
And this is one of those examples I show to basically show that you want to, if you're

45:38-45:43
using a toggle button like this, a toggle button using ARIA press true and ARIA press

45:43-45:49
false, so that will be announced to screen readers.

45:49-45:55
That if you do that, you don't want to change the label inside of or the accessible name

45:55-45:56
of the button.

45:56-46:03
So you want to have mute pressed and mute unpressed, I guess.

46:03-46:09
But you don't want to say like it's mute pressed and then it's unmute pressed.

46:09-46:14
Because then you think like oh, is it now unmuted because it's pressed and stuff like

46:14-46:15
that.

46:15-46:19
Gets really complicated really quickly.

46:19-46:28
So either change the access of the name or change the status.

46:28-46:36
And here I opted to change the status from ARIA pressed to true to ARIA pressed false.

46:36-46:41
And it says mute selected toggle button.

46:41-46:44
So selected is the pressed state.

46:44-46:50
And then if I unpress it, you hear that you don't hear anything.

46:50-46:55
And that's because screen readers try to not overwhelm their users with announcements.

46:55-46:59
Though in this case it might be pretty okay to do it.

46:59-47:02
But sometimes they just don't.

47:02-47:08
And if I now navigate away, you get to mute toggle button.

47:08-47:10
So it's basically unmuted.

47:10-47:15
So the toggle button says you can have it selected or unselected.

47:15-47:21
And then you select it with the space bar with return in this case.

47:21-47:27
And if it says selected, you know that, yeah, this is activated basically.

47:27-47:32
And that's why you don't want to switch also the accessible name around.

47:32-47:34
That's actually a thing I did with the other example.

47:34-47:36
>> HTML code editor.

47:36-47:37
Edit text.

47:37-47:38
Play.

47:38-47:42
>> Which is this play/pause button.

47:42-47:46
And you can also see that I put in here an ARIA live polite.

47:46-47:49
So now we don't use a toggle button.

47:49-47:55
So no ARIA pressed true or false.

47:55-47:57
Just a normal button.

47:57-47:58
No ARIA stuff.

47:58-48:04
But I put on an ARIA live polite to make the screen reader announce the accessible name

48:04-48:06
when it changes.

48:06-48:11
So that's actually a pretty neat technique if you need like the immediate feedback for

48:11-48:12
users.

48:12-48:17
So let's see how that works.

48:17-48:19
Doesn't want to announce it because it already announced it.

48:19-48:21
And now I press return.

48:21-48:22
>> Pause.

48:22-48:24
>> Press return again.

48:24-48:25
Play.

48:25-48:30
>> So you always know what is the current state.

48:30-48:33
And that's pretty useful.

48:33-48:34
Yeah.

48:34-48:42
So an easy way to make a button announce when you need it is using ARIA live polite.

48:42-48:48
And then it will just announce it.

48:48-48:49
Because that's fun.

48:49-48:50
>> HTML code editor.

48:50-48:52
Edit text.

48:52-48:58
And here we have the example of like having a live region apart from the button that you're

48:58-49:01
using which is the normal thing.

49:01-49:05
In this case I use the output element in HTML.

49:05-49:07
This is automatically a live region.

49:07-49:09
So super useful.

49:09-49:13
If you need to convey something, you can use the output element.

49:13-49:15
And then here we have the count up event.

49:15-49:24
And we'll just, you know, use the text that's inside it and count up from it like it's metric.

49:24-49:30
The most simple coding examples here.

49:30-49:32
But the interaction is good.

49:32-49:35
So go here.

49:35-49:36
>> 55.

49:36-49:38
75% count.

49:38-49:40
Count up button.

49:40-49:41
One.

49:42-49:43
Two.

49:44-49:45
Three.

49:46-49:54
>> This is a fun thing that sometimes happens where the screen reader is reading stuff twice.

49:54-49:57
And in this case I don't know why that happens.

49:57-49:59
It shouldn't do that.

49:59-50:01
But it does.

50:01-50:05
So this is always the challenge with ARIA things.

50:05-50:10
Sometimes there are implementation differences.

50:10-50:13
Sometimes it's just, I don't know, just weird.

50:13-50:16
Because it shouldn't read that twice.

50:16-50:22
Because we're only changing the number in there.

50:22-50:28
So I don't know what's why it's doing that.

50:28-50:30
And I think that's also good learning.

50:30-50:35
That like not everything is like explainable.

50:35-50:40
When using ARIA, it's like you try it and you do your best.

50:40-50:42
I guess.

50:42-50:58
So my like hunch is that basically they think this three is the label and the description.

50:58-51:01
But then it's like I don't have an ARIA description on it.

51:01-51:03
So it shouldn't be a problem.

51:03-51:06
So it's like weird.

51:06-51:08
And there might be differences between browsers.

51:08-51:09
But this always works.

51:09-51:12
Some announcement is done.

51:12-51:17
And I think, you know, in this case, because it's so simple, it's okay if it's announced

51:17-51:18
twice.

51:18-51:19
It's not the best.

51:19-51:27
But, you know, also not like breaking anything here.

51:27-51:30
>> And different screen readers react differently.

51:30-51:33
Some repeats it twice and some does not.

51:33-51:35
>> Yeah, I think so.

51:35-51:41
Well, as I said, I cannot understand why it reads it twice.

51:41-51:48
So that probably points that it's a problem with like or like a thing that this voiceover

51:48-51:50
does particularly.

51:50-51:54
I'm pretty sure no other screen reader does it.

51:54-51:55
Yeah.

51:55-52:04
Let's take a five minute break until two let's take a ten minute break until two or five.

52:04-52:12
And then I have another couple of small things I want to show and explain.

52:12-52:16
And we can also talk about your questions a little bit.

52:16-52:25
So see you in about ten minutes.

52:25-52:33
Great.

52:33-52:36
I love that this is like for people who like use the recording.

52:36-52:39
They get like no pause at all.

52:39-52:42
So that's fun.

52:42-52:46
Yeah.

52:46-52:49
Let's look at some other things that I want to share.

52:49-52:51
I think this is a good example.

52:51-52:54
And this is a good example as well.

52:54-52:55
As I want to show.

52:55-53:02
And then oh, yeah, the ARIA live one.

53:02-53:03
This one.

53:03-53:04
Yeah.

53:04-53:05
Okay.

53:05-53:09
That's good.

53:09-53:17
So here we're talking a little bit like we're looking a little bit on a demo that has different

53:17-53:21
versions to make things nonfunctional.

53:21-53:30
So we have, you know, ARIA hidden is our normal way to remove content from screen reader users.

53:30-53:36
So, you know, for example, duplicated images, duplicated text, stuff like that.

53:36-53:39
You could use ARIA hidden true for that.

53:39-53:42
But the problem is what if you have an interactive element?

53:42-53:45
You have it ARIA hidden true.

53:45-53:47
This button I can click.

53:47-53:53
I didn't care about making like dialogues come up for those.

53:53-53:56
But it has an ARIA hidden true on it.

53:56-54:00
So the first icon is just a button.

54:00-54:03
The first one is a button with ARIA hidden true on it.

54:03-54:09
Third one, there is a button inside of a div style display none.

54:09-54:12
Which basically means you can't see it.

54:12-54:17
And spoiler alert, it also can't be reached by any assistive technology because it's just

54:17-54:19
hidden.

54:19-54:24
And then you have the inert div here at the right.

54:24-54:27
Which basically means this button cannot be clicked.

54:27-54:28
It cannot be tapped to.

54:28-54:31
It cannot be activated.

54:31-54:34
And it also doesn't exist when you navigate using arrow keys.

54:34-54:36
We will see that in a second.

54:36-54:41
So there are different ways to do it in HTML and ARIA.

54:41-54:44
And the important thing now is about ARIA hidden true.

54:44-54:50
Because usually you think like stuff that is set to ARIA hidden true is just not available

54:50-54:51
to anyone.

54:51-54:57
Now, in this case, because this second button is interactive, you can navigate to it.

54:57-55:02
You can technically you can also activate it using return and space.

55:02-55:09
There is this thing that happens now which is relatively new.

55:09-55:15
Like probably like now three or four years ago, there was a change that basically said

55:15-55:20
like if you have an interactive element inside of something that's ARIA hidden true or the

55:20-55:27
interactive element itself is ARIA hidden true, we just ignore the ARIA hidden true.

55:27-55:33
Because before this change happened, buttons like this would just be not announced.

55:33-55:35
Like you could tap to them.

55:35-55:38
But the screen reader would just make no sound at all.

55:38-55:43
Like it was like going into like the void or space or something like that.

55:43-55:46
You tap and it says like button, button, button.

55:46-55:49
And it was like just nothing happened.

55:49-55:51
Is that obviously bad?

55:51-55:54
At least I think so.

55:54-56:02
And let's see how this sounds now.

56:02-56:05
Which is not like the most like mind blowing demo.

56:05-56:06
I say that immediately.

56:06-56:08
Like this is button one.

56:08-56:09
Button one.

56:09-56:10
Button.

56:10-56:12
This is a normal button.

56:12-56:14
This is a normal button.

56:14-56:15
Group.

56:15-56:18
So this is the -- and it's inside of a field set.

56:18-56:23
That's why it's announcing that twice.

56:23-56:24
I don't know why it's announcing it twice.

56:24-56:25
It shouldn't.

56:25-56:27
But it does.

56:27-56:30
So now I tap to the ARIA hidden button.

56:30-56:31
Button two.

56:31-56:32
Button.

56:32-56:35
This button is ARIA hidden equals true.

56:35-56:39
This button is ARIA hidden equals true.

56:39-56:40
Group.

56:40-56:47
So basically it will not be announced differently than any other button that you have on the

56:47-56:48
page.

56:48-56:49
And that's on purpose.

56:49-56:53
Like, you know, as I said, a couple of years ago would not be announced at all.

56:53-56:54
But now it does.

56:54-56:56
And the inner button, we can't tap to it.

56:56-56:59
Show sidebar button.

56:59-57:00
Show sidebar.

57:00-57:01
Yeah, yeah.

57:01-57:05
It just jumps up to the browser UI.

57:05-57:08
And even if I'm using the arrow keys, it looks like this.

57:08-57:09
Button two.

57:09-57:10
Button.

57:10-57:14
This button is ARIA hidden equals true.

57:14-57:16
This button is display.

57:16-57:17
None.

57:17-57:18
Group.

57:18-57:20
This button is display.

57:20-57:21
None.

57:21-57:22
Colon.

57:22-57:23
End of.

57:23-57:25
This button is this.

57:25-57:27
This button is inert.

57:27-57:28
Group.

57:28-57:30
This button is inert.

57:30-57:31
Colon.

57:31-57:32
End of.

57:32-57:33
This button is inert.

57:33-57:34
Group.

57:34-57:37
And there is no button in there.

57:37-57:39
I cannot get to it.

57:39-57:41
Because it's set to inert.

57:41-57:43
Which basically says, like, yeah, you can't use that.

57:43-57:47
It's just for, like, visual purposes in there.

57:47-57:48
So that works pretty well.

57:48-57:52
I think it makes sense if you think about it.

57:52-57:57
But the anomaly, so to speak, is that ARIA hidden true, despite you saying actively this

57:57-58:06
should be hidden from screen reader users, is active because it's an interactive element.

58:06-58:13
And the browser basically says, like, yeah, before I tell my user nothing, I just reveal

58:13-58:14
what it is.

58:14-58:15
And that's the new fallback.

58:15-58:21
And I think that's, like, a really good change here.

58:21-58:26
Because if it's if you want to really hide it, you know, use display none or use inert

58:26-58:33
as a way to do it, you can do stuff with, like, tab index minus one and then it's at

58:33-58:37
least not available using the tab navigation.

58:37-58:43
But still, arrow navigation would focus on it.

58:43-58:45
Voice over off.

58:45-58:49
Because arrow navigation reach everything.

58:49-58:51
That's the goal of it.

58:51-58:55
And we have this fun little example here.

58:55-58:59
Where no, that's the wrong one.

58:59-59:03
That was the button one again.

59:03-59:08
So here in this we have a heading.

59:08-59:11
Just to just, you know, some heading.

59:11-59:15
And if you look at the code, it is an H2.

59:15-59:18
Which, like, that's nothing, like, special.

59:18-59:26
But then uses class H3 and it uses role heading and ARIA level one.

59:26-59:33
So this is an H2 that looks like an H3, but will be announced as an H1.

59:33-59:34
Because of the ARIA.

59:34-59:38
Because the ARIA always overrides what's inside.

59:38-59:42
Like, what the native HTML is.

59:42-59:48
You wouldn't need the role heading here, because the H2 automatically has a role heading.

59:48-59:56
But I thought it's cleaner as an example of what's going on to, like, put it in there.

59:56-59:57
But yeah.

59:57-59:59
So this is fun.

59:59-01:00:00
Looks like an H3.

01:00:00-01:00:04
Like, a little bit of a weird design for an H3.

01:00:04-01:00:06
But you know.

01:00:06-01:00:09
But it will be announced as an H1.

01:00:09-01:00:12
So, yeah.

01:00:12-01:00:22
I'm going to pass the wrong buttons.

01:00:22-01:00:24
>> VoiceOver on Safari.

01:00:24-01:00:25
AXL/Chaz/Duck.

01:00:25-01:00:28
Code pen pre.

01:00:28-01:00:32
>> Looks like I briefly forgot how to switch voiceover on brains.

01:00:32-01:00:34
How do they work?

01:00:34-01:00:35
So navigating.

01:00:35-01:00:36
>> Scroll area.

01:00:36-01:00:37
Scroll area.

01:00:37-01:00:38
Dull or not.

01:00:38-01:00:39
Scroll area.

01:00:39-01:00:40
Dull or.

01:00:40-01:00:41
Heading level one.

01:00:41-01:00:42
Some heading.

01:00:42-01:00:49
>> So it's a heading level one for all intents and purposes for screen reader user.

01:00:49-01:00:57
They cannot, like, know that this looks like an H2 or was like formatted like an H3 and

01:00:57-01:01:00
used an H2 underneath.

01:01:00-01:01:07
And this will also show up as an H1 in, like, your heading navigation.

01:01:07-01:01:11
So if I go control option and I think it's U.

01:01:11-01:01:12
>> Headings menu.

01:01:12-01:01:13
>> Yes.

01:01:13-01:01:19
You get to the headings menu and you can use the arrow keys to go into other menus as well.

01:01:19-01:01:21
And here you get heading level one.

01:01:21-01:01:22
Some heading.

01:01:22-01:01:23
>> One.

01:01:23-01:01:24
Some heading.

01:01:24-01:01:30
>> Then you can use the left and right arrow keys to go to other menus.

01:01:30-01:01:31
>> No item heading.

01:01:31-01:01:32
Window.

01:01:32-01:01:33
Spot.

01:01:33-01:01:34
Frames.

01:01:34-01:01:35
Headings menu.

01:01:35-01:01:38
>> I don't know if it's a demo page.

01:01:38-01:01:39
But yeah.

01:01:39-01:01:42
It's an H1 for all intents and purposes.

01:01:42-01:01:43
Don't do this.

01:01:43-01:01:46
Like, this is like.

01:01:46-01:01:47
>> Heading level one.

01:01:47-01:01:48
Some heading.

01:01:48-01:01:50
Voice over off.

01:01:50-01:01:52
>> Obviously not a good idea to do that.

01:01:52-01:01:55
But sometimes you are in a situation where you have to do it.

01:01:55-01:02:02
Like you have legacy code or it comes out of an application in a certain form and you

01:02:02-01:02:10
don't want to like spend the time or the resources like server side to like fix everything.

01:02:10-01:02:16
You could use JavaScript and put like the level and change the level accordingly.

01:02:16-01:02:23
So if you have for example, you are writing your blog posts in a markdown format and it's

01:02:23-01:02:28
always you start with an H1 and then H2 and H3.

01:02:28-01:02:33
But on your website, you already have an H1 and you want to start with an H2 and then

01:02:33-01:02:36
go H3 and H4.

01:02:36-01:02:41
You could use that section on your page.

01:02:41-01:02:48
I could just say, oh, yeah, I put an ARIA level on those headings and just put them

01:02:48-01:02:49
one up.

01:02:49-01:02:53
So it like fits into the rest of the structure of the website.

01:02:53-01:02:55
You know, it would be possible.

01:02:55-01:02:58
It's not the most clean thing to do.

01:02:58-01:03:03
But like ARIA is not always about doing things cleanly.

01:03:03-01:03:12
But often just like doing the, you know, fixing things that you don't have like the most influence

01:03:12-01:03:18
on the HTML code.

01:03:18-01:03:25
This is the input range slider.

01:03:25-01:03:30
And I use ARIA here to output the text.

01:03:30-01:03:40
So with a slider in HTML, you have like different options.

01:03:40-01:03:45
And so you can say slider, then you can have a range like min 5, max 50.

01:03:45-01:03:53
So this slider goes from 5 to 50.

01:03:53-01:03:57
And then value is the current value, which starts at 20.

01:03:57-01:03:59
So about here.

01:03:59-01:04:01
Close enough.

01:04:01-01:04:05
And then I have here ARIA value text, 20 euros.

01:04:05-01:04:12
So this is something that and that corresponds to the value here.

01:04:12-01:04:18
And this is something that only ARIA gives you basically.

01:04:18-01:04:25
So you can say ARIA value text basically is like takes the value and then adds like, you

01:04:25-01:04:29
know, how you want to pronounce it basically.

01:04:29-01:04:36
And then like because this is built into the input, the slider input here, it will be announced

01:04:36-01:04:41
when you're interacting with the slider itself.

01:04:41-01:04:43
So it's like a little bit different.

01:04:43-01:04:50
If you wouldn't have had the ARIA value text, it would just say 20 instead of 20 euro.

01:04:50-01:04:54
Which is a fun, good enhancement of like what you can do.

01:04:54-01:05:02
Because even if like it doesn't work, it's not the biggest deal, right?

01:05:02-01:05:07
So let's see how that works.

01:05:07-01:05:12
Over on Safari, I'm pressing tab.

01:05:12-01:05:15
20 euro, your donation slider.

01:05:15-01:05:20
And yes, it says 20 euro because I couldn't make a change from euro to euro.

01:05:20-01:05:22
I was like lazy to do that.

01:05:22-01:05:25
But now I can use the arrow keys.

01:05:25-01:05:27
21 euro.

01:05:27-01:05:28
22 euro.

01:05:28-01:05:30
23 euro.

01:05:30-01:05:31
Wow.

01:05:31-01:05:32
It's amazing.

01:05:32-01:05:37
Like it's not the most like amazing thing.

01:05:37-01:05:42
But like it's really good that you have the option to like announce that.

01:05:42-01:05:50
And how I do that voiceover off in this demo is that I basically with JavaScript, I put

01:05:50-01:05:55
in the target value in the ARIA value text attribute.

01:05:55-01:05:57
And that will be announced automatically.

01:05:57-01:06:01
There's no ARIA live that you need to set.

01:06:01-01:06:02
Nothing like that.

01:06:02-01:06:08
It's just automatically it's a feature of these like native HTML slider that it reads

01:06:08-01:06:11
you back the value that you set.

01:06:11-01:06:13
You can do fun stuff here.

01:06:13-01:06:15
Like can have steps.

01:06:15-01:06:17
Step I think.

01:06:17-01:06:18
Equals.

01:06:18-01:06:20
Let's see.

01:06:20-01:06:21
What makes sense for this?

01:06:21-01:06:25
Like five probably.

01:06:25-01:06:29
And now we have made like the minimum of changes.

01:06:29-01:06:35
And we can reload that.

01:06:35-01:06:37
Voiceover on Safari.

01:06:37-01:06:38
Yep.

01:06:38-01:06:39
Tap.

01:06:39-01:06:41
Show sidebar.

01:06:41-01:06:43
20 euro.

01:06:43-01:06:47
Your donation slider.

01:06:47-01:06:51
And then if I make a change, press the right arrow once.

01:06:51-01:06:52
20 euro.

01:06:53-01:06:56
Oh, it doesn't want to collaborate, of course.

01:06:56-01:06:57
Show side.

01:06:57-01:06:58
Tap.

01:06:58-01:06:59
Rain drop.

01:06:59-01:07:00
20 euro.

01:07:00-01:07:03
Your donation slider.

01:07:03-01:07:05
Close to 20 euro.

01:07:05-01:07:06
Your donation slider.

01:07:06-01:07:07
25 euro.

01:07:07-01:07:08
There we go.

01:07:08-01:07:12
Like now it goes in five euro steps.

01:07:12-01:07:13
30 euro.

01:07:13-01:07:14
35.

01:07:14-01:07:15
40 euro.

01:07:15-01:07:16
50 euro.

01:07:16-01:07:22
And here you also see like if it changes too quickly, it will because this is a polite live

01:07:22-01:07:25
region, basically, it will not try to catch up.

01:07:25-01:07:28
It will just read the last value.

01:07:28-01:07:29
45 euro.

01:07:29-01:07:32
20 euro.

01:07:32-01:07:34
Which is a good thing.

01:07:34-01:07:39
Because you don't want that it has like ten minutes of like speech just to tell you like

01:07:39-01:07:43
what the current thing is.

01:07:43-01:07:44
So yeah.

01:07:44-01:07:51
I think this is a good example of like how you use a little bit of ARIA can help to do

01:07:51-01:07:53
a lot.

01:07:53-01:07:56
And also -- voiceover off.

01:07:56-01:07:59
Which is like one of my little tricks.

01:07:59-01:08:04
Like I talked about like using the ARIA current to do the styling.

01:08:04-01:08:08
Here I basically do the same to put the ARIA value text in.

01:08:08-01:08:11
Because I wait for the change.

01:08:11-01:08:12
Change event.

01:08:12-01:08:13
Right?

01:08:13-01:08:24
And then for the visible output, which is here, I put in the target value plus euro.

01:08:24-01:08:31
So if I change anything with the min range or the max range or anything like that, or

01:08:31-01:08:36
the step value, it will not -- you know, I don't make assumptions based on like oh, they

01:08:36-01:08:38
press the right arrow.

01:08:38-01:08:43
So I add one and put that out and then set the value or something like that.

01:08:43-01:08:48
So this comes from the value that the slider has.

01:08:48-01:08:50
And then I go and look at it.

01:08:50-01:08:51
And that's useful.

01:08:51-01:09:02
And then I do the same set the ARIA value text to the same like value plus euro on it.

01:09:02-01:09:07
And by the way, if you're using the mouse, it will also like jump around like in five

01:09:07-01:09:08
euro steps.

01:09:08-01:09:12
Like this is a nice thing.

01:09:12-01:09:22
And I think if you remove the CSS, because I styled this, so it's easy to see, but I

01:09:22-01:09:29
think there is a way to like oh, yeah, this was this complicated thing.

01:09:29-01:09:35
I just copied and pasted that from someone.

01:09:35-01:09:43
And because styling those range inputs is not the easiest thing.

01:09:43-01:09:55
So if I do this and then that, then you see that this is the normal like default styling

01:09:55-01:09:56
for it.

01:09:56-01:10:01
This also looks like not the best.

01:10:01-01:10:07
Let's delete all of that.

01:10:07-01:10:12
Oh, now I have also have white background color.

01:10:12-01:10:17
Sometimes you have like little like notches in there like for what you can select.

01:10:17-01:10:19
But this is not the case here.

01:10:19-01:10:24
Quickly see that I've resetted it.

01:10:24-01:10:25
Yes.

01:10:25-01:10:26
Yeah.

01:10:26-01:10:30
But this is a nice thing to like, you know, again, make sure that what's visually there

01:10:30-01:10:37
is also announced, making sure that everything like looks at each other and not have like

01:10:37-01:10:43
things assumed somewhere that then goes out of sync.

01:10:43-01:10:48
That happens quite often.

01:10:48-01:10:50
And then this is an example.

01:10:50-01:10:55
And I don't know, yes, this is just this.

01:10:55-01:11:00
So often what you will see when you're using live regions, and I think I talked about that

01:11:00-01:11:12
before, often when you have live regions and you put them onto the page at the same time

01:11:12-01:11:19
when you put the text that should be read in it, it will read nothing or it will take

01:11:19-01:11:21
like some time until it's announced.

01:11:21-01:11:24
Like there's a lot of inconsistencies there.

01:11:24-01:11:30
But live regions are notoriously hard to use that way.

01:11:30-01:11:37
So what you want to do is often to use some delay in it.

01:11:37-01:11:42
Now I forked that from my colleague Daniel.

01:11:42-01:11:46
Can I go back to that fork?

01:11:46-01:11:48
Is that a thing that exists?

01:11:48-01:11:49
Oh, no.

01:11:49-01:11:50
Now I'm forking my own.

01:11:50-01:11:57
Now I'm forking my own fork, which is like forking ridiculous.

01:11:57-01:12:00
So let's see.

01:12:00-01:12:18
I don't know if that's even like a public thing, but I think so.

01:12:18-01:12:34
Yeah, that's his.

01:12:34-01:12:35
I think, yes.

01:12:35-01:12:42
And so what he did here is he only has a diff here and this is like, it's very quite complicated

01:12:42-01:12:47
the stuff around it, but concentrate on this diff here, which basically says just live

01:12:47-01:12:53
and then he has an alert example on the bottom.

01:12:53-01:12:59
What he does is he creates a P element and that P element then gets the ARIA live region.

01:12:59-01:13:09
So you only, when he sets the content in it, it will be added to that just live diff, which

01:13:09-01:13:12
is somewhere here.

01:13:12-01:13:14
And then it should be read.

01:13:14-01:13:19
Now what you will see when I'm using the screen reader is unless I have a delay here, it will

01:13:19-01:13:27
not be read because basically that delay is here.

01:13:27-01:13:35
So what he does is like, if there's no delay, everything will be added to the DOM directly.

01:13:35-01:13:41
And if there's a delay, he first adds the paragraph empty with the ARIA live region

01:13:41-01:13:47
and then after the timeout, like after 50 milliseconds or whatever, he adds the actual

01:13:47-01:13:49
text and then that text is announced.

01:13:49-01:13:56
And the reason why he does that and why this test is done like that is because screen readers

01:13:56-01:14:04
don't always like pick up on newly added live regions to a page.

01:14:04-01:14:10
That's why my recommendation is putting live regions in the page when it loads because

01:14:10-01:14:11
it makes everything easier.

01:14:11-01:14:14
But not everyone likes that.

01:14:14-01:14:17
So let's see how that works.

01:14:17-01:14:25
Can't I see that in like the view up?

01:14:25-01:14:26
Obviously I can't.

01:14:26-01:14:35
So let's see how that goes.

01:14:35-01:14:41
So this is the no delay example where basically the paragraph and the text inside it is added

01:14:41-01:14:45
to the page immediately.

01:14:45-01:14:52
And you hear that you don't hear anything because the live regions came there and it

01:14:52-01:14:58
had text in it so there was no text change so it doesn't announce it.

01:14:58-01:14:59
>> Zero milliseconds.

01:14:59-01:15:00
Button.

01:15:00-01:15:01
Add text.

01:15:01-01:15:06
>> This is with a delay of zero milliseconds.

01:15:06-01:15:08
Also nothing.

01:15:08-01:15:10
Which makes sense.

01:15:10-01:15:11
>> One millisecond.

01:15:11-01:15:12
Button.

01:15:12-01:15:13
Add text.

01:15:13-01:15:14
>> Same try.

01:15:14-01:15:15
Nothing.

01:15:15-01:15:16
50 milliseconds.

01:15:16-01:15:17
I think it does it.

01:15:17-01:15:18
>> 50 milliseconds.

01:15:18-01:15:19
Button.

01:15:19-01:15:20
Add text.

01:15:20-01:15:21
>> I think that should work.

01:15:21-01:15:22
>> I'm alive.

01:15:22-01:15:23
50 milliseconds.

01:15:23-01:15:32
>> So basically that 50 milliseconds is the time that the browser needs to say like oh,

01:15:32-01:15:35
these are two different things that are happening.

01:15:35-01:15:40
There's a live region there and then text is added to it.

01:15:40-01:15:45
Which like, yeah, you can do that but you can also do what I like to do.

01:15:45-01:15:48
Which I have here.

01:15:48-01:15:54
And that is you have the live region on the this has not loaded correctly.

01:15:54-01:15:58
>> Page 90.

01:15:58-01:16:03
>> So this is basically you already have the live region on the page and then you only

01:16:03-01:16:04
add the text.

01:16:04-01:16:07
Like here I only add in the inner div.

01:16:07-01:16:09
I only add the text.

01:16:09-01:16:15
And I do that with timeouts and without timeouts and it doesn't matter.

01:16:15-01:16:19
And if you have no delay it will just read the text.

01:16:19-01:16:20
>> Test.

01:16:20-01:16:21
No delay.

01:16:21-01:16:22
Button.

01:16:22-01:16:23
Add text.

01:16:23-01:16:25
>> So let's try it.

01:16:25-01:16:26
>> I'm alive.

01:16:26-01:16:27
No delay.

01:16:27-01:16:28
>> Magic.

01:16:28-01:16:29
>> Zero milliseconds.

01:16:29-01:16:30
Button.

01:16:30-01:16:31
Add text.

01:16:31-01:16:32
I'm alive.

01:16:32-01:16:33
Zero milliseconds.

01:16:33-01:16:34
One millisecond.

01:16:34-01:16:35
Button.

01:16:35-01:16:36
I'm alive.

01:16:36-01:16:37
One millisecond.

01:16:37-01:16:44
>> So this is one of the things that you just have to know.

01:16:44-01:16:51
That live regions can be like fickle like that.

01:16:51-01:16:54
If you create them while the page is already loaded.

01:16:54-01:17:01
And we see that a lot with like your react or other front end code where people think

01:17:01-01:17:03
like oh I need to announce something right now.

01:17:03-01:17:07
I create this live region and I just put the text in it.

01:17:07-01:17:08
That doesn't work.

01:17:08-01:17:11
You have to have either a little delay in it.

01:17:11-01:17:18
Which depends on your application but might be like you know just slowing the user down.

01:17:18-01:17:22
Even if it's only 50 milliseconds.

01:17:22-01:17:25
Or you just put like which is my recommendation.

01:17:25-01:17:33
Just put on every page at the bottom you put a div that is that is the live region.

01:17:33-01:17:38
And you can put one for polite and one for status.

01:17:38-01:17:39
Road status.

01:17:39-01:17:41
And one for alerts.

01:17:41-01:17:47
And then you know you just put text in there and you remove it after a few seconds.

01:17:47-01:17:51
And then you're always good with that stuff.

01:17:51-01:17:52
>> Safari.

01:17:52-01:17:53
Excel slash chat.

01:17:53-01:17:54
HTML code editor.

01:17:54-01:17:55
Edit text.

01:17:55-01:18:06
>> I have this ARIA hidden demo and now I try to figure out what this was.

01:18:06-01:18:09
>> Voice over off.

01:18:09-01:18:13
>> Where's my output?

01:18:13-01:18:19
There we go.

01:18:19-01:18:22
Oh, yeah.

01:18:22-01:18:25
This is again about ARIA hidden true.

01:18:25-01:18:29
That the same thing that I showed with the button.

01:18:29-01:18:31
But now for links.

01:18:31-01:18:34
So here we have a div set to ARIA hidden true.

01:18:34-01:18:36
Link with tab index minus one.

01:18:36-01:18:41
And here we have an ARIA hidden true only for the link.

01:18:41-01:18:43
And then here an ARIA hidden true for the link.

01:18:43-01:18:45
And a tab index minus one for the link.

01:18:45-01:18:53
So if you can see the screen, basically we have four divs.

01:18:53-01:18:55
The first two divs are marked in yellow.

01:18:55-01:18:59
That means they are set to ARIA hidden true.

01:18:59-01:19:01
And then there's a link in there.

01:19:01-01:19:06
And the link in the second one is marked green.

01:19:06-01:19:07
Because it has a tab index minus one.

01:19:07-01:19:13
And then on the third example, the link has an ARIA hidden true.

01:19:13-01:19:16
So it's marked with the yellow background.

01:19:16-01:19:22
And then in the fourth example, the link has a background that is yellow and has a green

01:19:22-01:19:23
background as well.

01:19:23-01:19:26
And a dotted line around it.

01:19:26-01:19:31
And that's basically because it has both ARIA hidden true and tab index minus one.

01:19:31-01:19:39
And then as like the I don't know, the common thing, you have an inert example at the bottom.

01:19:39-01:19:40
Which will not be red at all.

01:19:40-01:19:42
Because like it's inert.

01:19:42-01:19:47
So we have already covered that.

01:19:47-01:19:54
But that's again like seeing how different things work together.

01:19:54-01:19:56
>> Voice over on Safari.

01:19:56-01:20:00
>> Don't read that.

01:20:00-01:20:01
>> Close tab link.

01:20:01-01:20:02
A link.

01:20:02-01:20:05
>> So link, a link.

01:20:05-01:20:07
I should have named this better.

01:20:07-01:20:13
So this is despite everything like the div is set to ARIA hidden true, the link itself

01:20:13-01:20:15
you can get to.

01:20:15-01:20:18
And even if I use the arrow key navigation.

01:20:18-01:20:19
>> Heading level two.

01:20:19-01:20:21
Five items.

01:20:21-01:20:22
Complete.

01:20:22-01:20:23
Less div greater.

01:20:23-01:20:25
Set to ARIA hidden equals.

01:20:25-01:20:26
True.

01:20:26-01:20:27
Completed.

01:20:27-01:20:29
>> And then I press right arrow.

01:20:29-01:20:30
>> Link.

01:20:30-01:20:32
A link.

01:20:32-01:20:33
Heading level two.

01:20:33-01:20:34
Seven items.

01:20:34-01:20:40
>> So because there's an ARIA hidden true around it, but the link is focusable, the focusable

01:20:40-01:20:42
link will always be announced.

01:20:42-01:20:44
So you can't hide a link with that.

01:20:44-01:20:47
Now let's see how it works with tab index minus one.

01:20:47-01:20:50
Of course if I press the tab key, it cannot go in there.

01:20:50-01:20:51
>> Link.

01:20:51-01:20:52
A link.

01:20:52-01:20:55
>> But what happens if I use arrow key navigation.

01:20:55-01:20:56
So let's go to tab.

01:20:56-01:20:57
>> Link.

01:20:57-01:20:58
A link.

01:20:58-01:21:02
>> And then use arrow key navigation.

01:21:02-01:21:03
>> Heading level two.

01:21:03-01:21:04
Seven items.

01:21:04-01:21:05
Heading level two.

01:21:05-01:21:07
Three items.

01:21:07-01:21:09
Only the link is set to.

01:21:09-01:21:15
>> And here it also even though I'm using arrow key navigation because the ARIA hidden

01:21:15-01:21:18
true is around the link, it will not read it.

01:21:18-01:21:24
But if it's only the link, it will let's see how it does there.

01:21:24-01:21:29
So in this sentence there is a link and the link is set to ARIA hidden true.

01:21:29-01:21:33
>> In this sentence there is that you can or cannot activate.

01:21:33-01:21:39
>> So funny enough when I focus the paragraph, it says like in this sentence there is that

01:21:39-01:21:41
you can or cannot activate.

01:21:41-01:21:44
So the link is completely hidden from it.

01:21:44-01:21:48
But now I'm pressing the right arrow again with control and option.

01:21:48-01:21:50
>> Heading level two.

01:21:50-01:21:51
Five items.

01:21:51-01:21:55
In this sentence there is that you can or cannot activate.

01:21:55-01:21:56
Heading level two.

01:21:56-01:21:57
Three items.

01:21:57-01:22:02
Only the link is set to ARIA hidden equals.

01:22:02-01:22:03
>> But if I press tab key.

01:22:03-01:22:04
>> Link.

01:22:04-01:22:05
A link.

01:22:05-01:22:07
>> I can't get to it.

01:22:07-01:22:13
So you get this like really weird option here where like oh, yeah, the link is not there

01:22:13-01:22:15
if you're using arrow key navigation.

01:22:15-01:22:21
But it is here when you use the tab key because it has the tab like it's just in the tab order.

01:22:21-01:22:26
So yeah, be very cautious with using ARIA hidden true.

01:22:26-01:22:31
And then in the bottom like if you have ARIA hidden true on the link directly and you have

01:22:31-01:22:35
tab index minus one so it cannot be focused with the tab key, you don't have an option

01:22:35-01:22:36
to go to that link.

01:22:36-01:22:44
Like if I press tab, I go to the like browser Chrome because it's the last focusable thing

01:22:44-01:22:45
here.

01:22:45-01:22:46
>> Show sidebar button.

01:22:46-01:22:47
Show sidebar.

01:22:47-01:22:48
>> And if I use arrow keys.

01:22:48-01:22:49
>> Link.

01:22:49-01:22:50
A link.

01:22:50-01:22:51
That you can or cannot act.

01:22:51-01:22:52
Heading level two.

01:22:52-01:22:53
Five.

01:22:53-01:22:54
In this sentence there is that you can or cannot activate.

01:22:54-01:22:55
Heading level two.

01:22:55-01:22:56
Three items.

01:22:56-01:22:57
Setting.

01:22:57-01:22:58
>> And there is no way to like get to this link or activate it because it's just like

01:22:58-01:22:59
it's hidden from everything.

01:22:59-01:23:00
So yeah, this is like, yeah, you know, not everything when you put ARIA hidden true.

01:23:00-01:23:01
So yeah, this is like, yeah, not everything when you put ARIA hidden true.

01:23:03-01:23:24
So yeah, this is like, yeah, not everything when you put ARIA hidden true.

01:23:24-01:23:25
So that was that.

01:23:25-01:23:26
Was there anything else I wanted to show?

01:23:26-01:23:27
No, I think that's basically it.

01:23:27-01:23:28
Yeah, I think that's it.

01:23:33-01:23:38
Yeah, I think we have all the fun demos behind us.

01:23:38-01:23:44
Any questions I should ask?

01:23:44-01:23:46
There is one question from Hugo.

01:23:46-01:23:52
>> Yeah, I think I maybe had three, but I only remember two.

01:23:52-01:24:00
So the one with the slider, I just wanted to see that I didn't misunderstand.

01:24:00-01:24:09
If you hadn't used the value text, ARIA value text, would it then still read the value?

01:24:09-01:24:13
Because it would say 20 instead of saying 20.

01:24:13-01:24:15
So if you do nothing, it will still.

01:24:15-01:24:17
>> Yes, exactly.

01:24:17-01:24:27
So if I remove the ARIA value text from here, and then I also don't set it again with JavaScript,

01:24:27-01:24:37
because that would not be helpful to answer your question, then it would only announce

01:24:37-01:24:42
like 20 or 25 or whatever you set.

01:24:42-01:24:48
>> VoiceOver on Safari, show side 20, your donation slider.

01:24:48-01:24:51
>> It says 20, your donation slider.

01:24:51-01:24:52
>> 20 euro.

01:24:52-01:24:55
20, your donate frame.

01:24:55-01:24:57
20, your donation slider.

01:24:57-01:24:58
Close tab.

01:24:58-01:25:02
Close 20, your donation slider.

01:25:02-01:25:08
25, 30, 35.

01:25:08-01:25:10
VoiceOver off.

01:25:10-01:25:14
>> Okay, great.

01:25:14-01:25:23
And then the first thing you showed with the SVG in the button, and the edit buttons, I

01:25:23-01:25:30
think it was, there was a title tag and a labeled by.

01:25:30-01:25:32
>> Yes.

01:25:32-01:25:39
>> Why would you not just use label?

01:25:39-01:25:44
>> So in this case, right?

01:25:44-01:25:51
So the, you wouldn't, so, good question.

01:25:51-01:25:58
The reason is because, like, you end up often, like, duplicating things.

01:25:58-01:26:06
So sometimes you have the edit, and this is more like being consistent in different situations

01:26:06-01:26:07
type of thing.

01:26:07-01:26:10
Like here you could probably say, like, oh, I just use ARIA label.

01:26:10-01:26:15
I mean, technically you could just put the ARIA label on button and be okay with it,

01:26:15-01:26:16
right?

01:26:16-01:26:19
So it's not a big deal.

01:26:19-01:26:26
But I like to, like, reference something that has more substance than just an attribute

01:26:26-01:26:27
sometimes.

01:26:27-01:26:31
So in this case, I referenced the title for portability reasons.

01:26:31-01:26:34
I can copy and paste that somewhere else.

01:26:34-01:26:40
And also if I feel this should not be added, but, like, edit profile, I can edit that here,

01:26:40-01:26:44
and it will be automatically referenced in the ARIA label.

01:26:44-01:26:47
It doesn't make that much of a difference.

01:26:47-01:26:54
It's some browsers, but I don't know how well that's supported these days.

01:26:54-01:26:59
Even take the title here as the automatic accessible name for the SVG.

01:26:59-01:27:04
But it's, like, that used to be a little bit hit and miss, and so I got into doing this,

01:27:04-01:27:06
and so I'm just doing that.

01:27:06-01:27:07
>> Okay.

01:27:07-01:27:13
Like, to me, you still have to, if you want to have the button be called something else,

01:27:13-01:27:14
you will still have to edit it.

01:27:14-01:27:21
And if you edit that text or the actual label attribute, it will be the same work.

01:27:21-01:27:22
>> Doesn't matter too much.

01:27:22-01:27:23
That's true.

01:27:23-01:27:34
Like, the one thing is that depending on your browser and how you do it, ARIA label attributes

01:27:34-01:27:35
do not get translated.

01:27:35-01:27:41
So if you say, like, you have, like, let's say a tourist site or something like that

01:27:41-01:27:47
where users would regularly, like, translate it to other languages on their site, it might

01:27:47-01:27:52
be good practice to use ARIA label because text that's inside of the page almost always

01:27:52-01:27:55
gets translated properly.

01:27:55-01:28:01
And ARIA label stuff, because it's an attribute, it's hit and miss.

01:28:01-01:28:03
>> All right.

01:28:03-01:28:04
Thanks.

01:28:04-01:28:06
>> All right.

01:28:06-01:28:07
Any other questions?

01:28:08-01:28:14
Doesn't look like it.

01:28:14-01:28:16
Which is fine.

01:28:16-01:28:18
We went long today.

01:28:18-01:28:24
And if you have any questions, feel free to put them into Slack, as always.

01:28:24-01:28:29
And yeah, this has been my last week with you.

01:28:29-01:28:34
So thank you for being here and listening and asking the best questions.

01:28:34-01:28:42
I leave you now into the hands and arms of Hampus, who will entertain you for the next

01:28:42-01:28:43
two weeks.

01:28:43-01:28:46
And see you around.

01:28:46-01:28:47
Yeah, thanks for being here.

01:28:47-01:28:48
Thanks for doing this.

01:28:48-01:28:52
I really appreciate the interest in accessibility.

01:28:52-01:28:55
And yeah.

01:28:55-01:28:56
See you around.

01:28:56-01:28:57
Thank you very much.

01:28:57-01:28:58
>> Thank you.

01:29:00-01:29:01
Take care.

01:29:01-01:29:02
Bye.

01:29:02-01:29:03
>> Thank you.

01:29:03-01:29:04
Bye bye.

01:29:04-01:29:05
Thank you.

01:29:05-01:29:06
Bye.