Using Aria DevTools to improve accessibility
Tags: a11y, webdev, html, frontend
Published: 2023-10-25 07:49:48

Accessibility involves putting yourself in others' shoes. You might be surprised that this is a challenging endeavor.

Luckily, there are tools out there that help us get closer to understanding how people with disabilities can use the web. [ARIA DevTools](https://chrome.google.com/webstore/detail/aria-devtools/dneemiigcbbgbdjlcdjjnianlikimpck) is one of them, It compiles a visual representation of the website that brings a new perspective and helps you build more accessible website.

> With ARIA DevTools you see your website the way screen readers present it to the blind users. All page elements are presented according to their explicit or implied ARIA roles.

Here is a representation of the MDN website that showcases beautifully accessible Markup.

![MDN website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r32hf9900we4spywx4rj.png)



In this article I will share my experience with ARIA DevTools and how used it to make [my website ](https://omarnaguib.vercel.app/)better.

## Using ARIA DevTools

When I first learned of this extension, I was my website was going to look good in them and was eager to test it.
After all, i knew about semantic HTML and i always wrote alt text.

![Portfolio website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mm933jy5tlt59fmsb8jj.png)


To my disappointment, this is how it looked:


![aria devtools screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wld0175uehcdbyawoh3p.png)



Apparently, there was some work to do. I wanted my website too look more like MDN's.

##Making improvements

A question that popped in my mind was, "Can I even do this? or this an incredible feat that only experienced developers can do?"

what did my markup need so it can look good and have a clear nested architecture?


Using ARIA DevTools made the needed improvement much more clearer, with further analysis i realized the following:

1. my projects should be wrote as a list, this makes for much better semantics.
1. for an element to be recognized with that blue color it needed 2 things:
    1. be a semantic html tag (header, section, article ..etc).
    1. have an aria-label.
1. I noticed some alt text that was incorrect or that needed to be more descreptive.

This is a simplified version of some of the changes; it went from this:

```html
<section>
    <div class="projects">
        <div class="project">
            Project content
        </div>
    </div>
</section>
```



to this*:
```html
<section aria-label="section-label">
    <ul class="projects">
        <li style="display: contents;">
            <article class="project" aria-label="project-label" aria-description="description">
                Project content
            </article>
        </li>
    </ul>
</section>
```

*: note the use of`display: contents` which allows for adding a list element layer without breaking the already written CSS.

And here is the final result:




![Final result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmtrwcy68bz9jzlh11mb.png)




Looks a lot better!

### Quick note

I learned about ARIA-DevTools from this [Frontend Roadmap discussion](https://www.youtube.com/watch?v=ykLHTtS5J_Q).