A11Y 101: Analysing my website issues

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Search for a command to run...

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
No comments yet. Be the first to comment.
In this series I'll explore the basics of accessibility and you can join me on this learning trip.
This is less of a technical article but more a description and call out why semantic HTML always wins. What is this semantic HTML The main difference between semantic and non-semantic HTML is that semantic is a descriptive way of coding. We (the deve...
Most of you know me for my consistency, a golden arrow in my blog series. I've written 1000 articles in 1008 days! Almost an article a day, and my honeymoon was the only holiday I ever took. I'm super proud of this achievement; it has been a fantasti...

It's not the first time I'll be talking about community. I think it's an essential aspect of any successful tool. This shows in my previous explorations of Astro, Medusa, and now Vendure as well. All these products thrive in a super open, welcoming, ...

The cool part about Vendure is how easy it is to set up and how abstract each layer is. Basically, we get the following elements: External database Server Worker Admin UI Frontend While this is amazing, it also brings a bit of complexity when it co...

The previous article looked at customizing Vendure on a data and process level. In this article, we'll look at customizing emails, as they are often a big part of a webshop system. We'll be looking at two different layers of customization for customi...

Even though Vendure is a pretty significant project out of the box, in some cases, we might want to go in and modify some elements to work to our specific use case. In this article, I'll take a high-level look at some elements we can customize within...

We evaluated the website by using all kinds of accessibility tools. It's good to go through the issues we found and see what they mean.
We'll do this point by point by taking the main issues we discovered in the previous article.
This article is more about understanding each element rather than providing the ultimate fix. I'll be writing more in-depth solutions for each point, as often multiple solutions might be applicable.
The first issue that surfaced was the double focus issue. We found this issue by simply using the screen reader and tabbing through the items.
I'm using Accessibility insights to show the visible focus in the image below. You can see it moves from the title to the image focus.

This is weird from two sides:
There are multiple fixes here, so let's dive into more details in another article.
For future reference, some options are:
Another issue we found in all of the tools is color contrast. This one might be easiest to test in Lighthouse as it's the quickest to run.

I've highlighted some sections where the contrast is awful in the image above. We see a super light-grey text on white background, which is hard to see (even for non visually impaired people).
We need to get the color at least to an AA standard to fix this. If you like to have some help finding the right colors, here is an amazing tool to help you:

In the image above, we see the contrast, which I have an issue with. You can then play around with the slider to get to a AA acceptable color ratio.
When we ran Axe DevTools, we saw that I stated: "Document should have one main landmark".
For me, this was a bit of a vague description, and even in the more content section, it wasn't super clear:

However, after talking to Abbey about this and doing some more research, I was not using the <main> tag on my page, which is required.
Instead, I wrapped my whole page in a <article> tag.
So the fix here is simple, replace that article tag with the main tag, and we are good to go.
When we ran the Axe DevTools on an article page, we saw that it gave the error that some landmarks are not unique.
After some investigation, it shows two <nav> elements on the page.
However, they are not identifiable by screen readers.

The solution here is to make them unique. We have multiple options to do this, including:
We'll dive more into details about these elements in a later stage.
The tools did not pick this one up, but I used a <summary> element on my website for the TLDR sentence.
However, we should, of course, only use this in combination with a details element. (To make the native accordion).
To address this, we can switch to another element. In this case, a div might be the best option.
Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter