- [Instructor] Great devs write code
that works for everyone.
So writing accessible code isn't extra work,
it's doing the correct work.
If accessibility is a new concept to you,
there are plenty of courses on LinkedIn Learning.
Accessibility ensures that your code is usable by everyone,
including people with disabilities.
Now, like much of the course, I'll ask AI to help out here.
I'm going to provide the components directory as context
and I'll ask Copilot if these files are accessible.
Of course, this is placeholder content,
so it's a little ambiguous anyway,
but let's see what Copilot comes up with.
It seems to like the code that it wrote.
I want to look at the LogoCloud.
And again, this is placeholder content.
The images do have alt text.
It's great. It's not very descriptive.
So I'm going to dig in a little further.
This is a quasi programming question,
so it's something fair to ask Copilot.
Why is AI bad at creating accessible markup?
Copilot notes a few things.
But first, in my opinion,
is it the training data it's working from
isn't very accessible.
In some ways this makes sense.
Older markup probably wasn't accessible,
but devs have also not been doing a great job
of writing accessible code.
Copilot also says that there's lack of context,
accessibly standards are complex,,
dynamic content, limited testing, generalization.
Point six is the important one,
human oversight is required.
I'm going to change over to Edit,
and I'm going to ask Copilot to make this file more accessible.
So Copilot does actually suggest some improvements.
This is a great example of how context
can bias AI toward action.
I asked it to improve accessibility
and it found things it could work on.
However, when I asked about this and other files earlier,
it suggested
that they did not need accessibility improvements.
Paying attention to accessibility is worth your time
because it makes your code usable by all users.
With the time you save using AI to create markup,
you can focus time on accessibility.