A11y Accessibility
Tags: a11y, webdev, html, design
Published: 2023-02-10 21:59:14

<h1><em><a href="https://www.a11yproject.com/">The A11y Project</a></h1>("A"-eleven-"Y") is a community driven effort to make digital accessibility easier.</em></h1>
&nbsp;

![A11y Mission Statement from official website.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t25smnqlrv7zkkrl1idl.png)
<figcaption>
A11y Mission Statement from official website.
</figcaption>
&nbsp;

<h3>Accessibility is the goal of incorporating a set of practices and principles that make your application, website, or product useful for a broader audience. It is in nature a humanitarian effort, and the following is my small contribution to that effort, which aims to help newer developers establish a big picture overview of what it means to
incorporate great accessibility practices.</h3>
&nbsp;


![Students working at GenCyber bootcamp, Virginia Commonwealth University](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d6857d4288rhr56lhc7h.jpg)
<figcaption>
Students working at GenCyber bootcamp, Virginia Commonwealth University
</figcaption>
&nbsp;

<p>
While completing a Full Stack bootcamp in 2022 I learned a ton about web development, but one of the things that gets overlooked in programs like the one I did is accessibility.
This is common in these types of programs because the focus is on building projects and gaining practical experience, which is a great fit for the stage of learning most bootcamp attendees are at. If you have recently finished a bootcamp and are considering what to learn next, learning about accessibility practices is one way to make yourself more valuable as an engineer, expand your understanding of technology and improve your decision-making in your day-to-day workflow. The best way to create stellar accessibility
in your projects is to think about it from the start as you work on a project. If you wait until the end of your project, making it accessible can be expensive and time-consuming. So
as an engineer, we want to cultivate workflows that produce beautiful, clean, accessible code from the start. An important thing to understand is that
when done correctly, the investment in creating a robust inclusive experience pays off.
</p>

<h2>Who benefits from accessibility?</h2>
<h4><em>Individuals with...</em></h4>
<ul>

<li>Cognitive Disabilities: <em>ADHD, Dyslexia, Autism, Down Syndrome, Traumatic Brain Injury, Seizure Disorders, etc. (this is the largest and most varied group!)</em></li>
<li>These individuals may benefit from great practical and informational design.</li>
&nbsp;

<li>Physical Limitations: <em>Using a mouse, using a keyboard, using a touchscreen, using your voice.</em></li>
<li>These individuals may benefit from great focusability in our designs.</li>
&nbsp;

<li>Visual Disabilities: <em>Blindness, Color Blindness, etc.</em></li>
<li>These individuals may benefit from thoughtfully designed layouts, good contrast, and resizability.</li>
&nbsp;

<li>Audio Disabilities: <em>Deafness, Hardness of hearing, etc.</em></li>
<li>These individuals may benefit from captioning, sign language interpretation, and video with audio.</li>
</ul>

<strong>Accessibility benefits everyone.</strong>

<em>Accessibility is not just about ensuring that your text is visible on a black background, but rather considering the needs of a diverse range of individuals.</em>
&nbsp;


![Carrie Fisher and cohost explain concepts as a part of a Scrimba livestream Seminar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w43egr07ixx30lv6z6zb.png)
<figcaption>
Carrie Fisher and cohost explain concepts as a part of a Scrimba livestream Seminar.
</figcaption>


<h2>Where do we learn about accessibility best practices?</h2>

<p>This blog serves as a brief guide and overview of the topics covered in <a href="https://www.youtube.com/live/oEiTjDMA7UU?feature=share">Carie Fisher's Web Accessibility 101 Seminar</a>, which is a one hour live stream provided by Scrimba and led by Carie Fisher, a Senior Accessibility Trainer.</p>

<h1>Terminology</h1>

<strong>AT devices/AT Compatible</strong>
<p>
    Assistive Technology (Devices) can refer to screen readers, keyboards, displays that magnify, but also things like Google Assistant/Siri. Any technologies that allow someone to organize what their viewing in a way that works for them.
</p>

<strong>Accessibility Overlays</strong>
<p>
    Accessibility Overlays are technologies and strategies that we can slap in place to improve accessibility either as
    developers or in some cases as users.
</p>


![Illustration of a large`` computer surrounded by individuals who benefit from accessibility.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apgvqrqhurau2nvhkzsc.png)

<h1>Developing an Accessibility Plan</h1>

<p>
    We will adopt a good, better, best approach. Fisher explains in the seminar that when we wait until the end to implement accessibility we tend to start at the bottom of our "pyramid" of needs, which imagines those at the top as a group dependent on the narrowest window of informational presentation
    formats, and those at the bottom as being limited in some ways but able to utilize a wider range of designs than those at
    the top. However, when we begin by presenting our information in a way that works for folks at the top, it generally has the effect of
    making our product work for everyone below them on the pyramid too. "Good" might be implementing good contrast practices, "Better" might be using a many-pronged approach where we're also offering choices between different fonts-- and "Best" might be where we are doing those things, but where our primary concern and starting point is making sure our information is presented in an order that makes it easy to follow, where we're offering images for visual learners and text for folks who absorb information best by reading, and videos for folks who learn best that way-- where we're optimized for screen readers, for use without a mouse, across different screens etc. etc. and thinking about our designs in terms of the whole being greater than the sum of the parts.
</p>

![Pyramid Diagram showing very restricted needs in accessibility at the top.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjxrtzkn3rpggljlvqk1.png)

<p><em>Accessibility isn't necessarily about following a set of prescribed rules rather than it is about developing an understanding of what works for who. Don't worry though! We will get to some checklists and more granular tips soon.</em></p>

<p>
    According to Fisher, the most important tenant of accessibility is the skeleton. And I really love this approach, because it tickles
    the part of my brain that thinks about visual design (an area where I have more experience) as being much more than aesthetics. The idea that where we put information and how "big" it is, or even <em>when we encounter it</em> is the <em>biggest</em>
    thing that determines how readily we can follow along and relate to what we're engaging with highlights why the skeleton is so important and helps us understand why Accessibility Overlays may fall short. AT tools typically address the top level, for example by ensuring the focus highlighting is large enough or giving users control over font size, but we want to adopt a mindset where we understand that...
</p>

<em>Tools that only address the top level cannot fix poor design language.</em>


![Example of good visual design on a business card.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96dmq39awugyod30k50n.png)
<figcaption>
Example of good visual design on a business card.
</figcaption>

<h1>Informational Hierarchy & Design Language</h1>

<p><em>If you're familiar with visual design and the concept of using size to determine the order in which information is digested and the way that size can be used to communicate the importance and scope of related items automatically-- the following will make a lot of sense and is sort of the code-equivalent of that concept.</em></p>

<p>We will first discuss the main goal, the skeleton, structure, and HTML, and then move on to tips that focus on the middle of the pyramid. When using a screen reader, the HTML is the biggest factor in determining the accessibility of the content. So how do we write legible HTML?</p>

<h2>Great HTML</h2>

<ul>
<li><strong>Use semantic HTML:</strong> Use the appropriate HTML element for the type of content it contains, such as lists for lists, quotes for quotes, p for paragraphs etc. This provides information about the structure and purpose of the content to assistive technology.</li>

<li><strong>Use heading structure:</strong> Use the HTML heading tags (H1-H6) to structure the content of the page, with H1 being the main heading and H2-H6 being subheadings. This helps users understand the page structure and allows assistive technology to accurately navigate the page.</li>

<li><strong>Use descriptive link text:</strong> Use descriptive link text that clearly describes the purpose or destination of the link. Avoid using generic text such as "click here".</li>

<li><strong>Use tables appropriately:</strong> Use tables only for tabular data, not for layout purposes. Use the appropriate table elements such as TH for header cells and TD for data cells to provide context and structure to the table.</li>

<li><strong>Organize content with ordered and unordered lists:</strong> Use ordered and unordered lists to organize content into manageable sections, making it easier to read and understand.</li>

<li><strong>Use descriptive title and alt attributes:</strong> Use the title and alt attributes to provide descriptive text for images, links, and other elements. This provides additional information to assistive technology and is also used to display a text description for images that do not load properly.</li>

<li><strong>Use ARIA attributes:</strong> Use ARIA (Accessible Rich Internet Applications) attributes to provide additional information about the purpose and role of elements on the page, such as a landmark region, a tooltip, or a dialog box.</li>
</ul>

<p>More broadly speaking, putting information in front of someone when it is useful to them is essential not just to great UX, as you may already think of it being, but to great accessibility too.</p>

<p>
    It may sound overly simplified, but after working with a senior developer friend and improving my skills, I have come to realize that using code (especially HTML tags) for their intended purpose (as outlined in item 1) is key. 
</p>

<h2>More Quick Tips</h2>

<p>
The following tips are based on the Web Content Accessibility Guidelines (WCAG) and Fisher's personal perspective on accessibility.</p>

<ul>
<li><strong>Provide text alternatives for non-text content:</strong> All non-text content such as images, videos, and audio files should have text descriptions or transcripts that can be read by assistive technology.</li>

<li><strong>Provide visual cues for audio content:</strong> For audio content such as videos or podcasts, provide visual cues such as captions or transcripts to make it accessible to people with hearing impairments.</li>

<li><strong>Avoid flashing content:</strong> Avoid using flashing or blinking content, as it can cause seizures in people with photosensitive epilepsy.</li>

<li><strong>Make sure content is resizeable:</strong> Web content must be scalable and readable without the need for zooming, as many people with visual impairments may not be able to use a mouse or trackpad to zoom in on the content.</li>

<li><strong>Provide context for icons:</strong> When using icons, ensure that they are accompanied by text that provides context or a clear label that explains their meaning and vice versa. This will make the content more accessible to users with visual impairments or cognitive disabilities who may have difficulty understanding the purpose of an icon on its own. Tooltips can help as well!</li>

<li><strong>Use sufficient contrast:</strong> The contrast between text and its background must be high enough to ensure readability for people with visual impairments. To get more granular, The color contrast ratio between text and its background must be at least 4.5:1 for regular text and 3:1 for large text (24 point or larger and bold text or 19 point or larger).</li>
&nbsp;

<p>You can use online tools such as the <a href="https://webaim.org/resources/contrastchecker/">WebAIM Color Contrast Checker</a> or the Accessibility Checker in Adobe Photoshop to test your color contrast and see if it meets the minimum requirements.</p>
&nbsp;

<p>It's important to keep in mind that while this is a general rule, there may be exceptions for logos, graphs, and charts, among other things. It's always best to consult the WCAG guidelines directly for a more complete understanding of the requirements.</p>
&nbsp;

<p>Fisher suggests using the <a href="https://www.tpgi.com/color-contrast-checker/">Color Contrast Analyzer</a> by TPGi for checking contrast because it can analyze the code itself. But let's breifly look at how to perform a manual check to find problems that the automated checker can't catch.</p>
&nbsp;

<h4>Contrast Checker Quick-Demo</h4>

<p>
We can select colors on our page using this checker by selecting the background color first...
</p>

![Screenshare from lecture showing background color selection.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u6b91z7ey26x2p2hmfgl.png)

<p>Then, selecting the font color...</p>


![Screenshare from lecture showing foreground color selection.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6onlqcscvr029xpl1nk.png)

<p>Now we can see our contrast ratio-- in this case, 1.57:1, which according to Fisher is "horrible".</p>


![Screenshare from lecture showing analysis of selected colors.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dfbje0xp1klxdwo5gqq3.png)

<p>
    In her demonstration, Fisher goes on to resize the window and check the same area on screen. This demonstrates how the contrast ratios a user encounters can change as the elements move around.
</p>


![Screenshare from lecture showing mobile layout.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmit9enaaojn8uipq1be.png)

<p>These kinds of checkers (specifically their automated code analyzing features) can highlight problems of many kinds, for example showing us whether elements are focusable when we might want them to be. Fisher says by far this is her favorite one!</p>

</ul>

<h2>Fonts</h2>

![Example of Comic Sans font](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ac19xbrqeb1jq14xmq51.png)
<figcaption>
Example of Comic Sans
</figcaption>

<p>Fonts tend to be more accessible when each character is very distinct. To my surprise, comic sans is a very accessible font. But when you know what makes a font accessible it makes sense! Dyslexie and Atkinson Hyperlegible are two fonts that are designed specifically to be useful for individuals with dislexia.</p>

![Example of Dyslexie, a font for individuals with dislexia.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/10padfpzx6l04iign0de.png)
<figcaption>
Example of Dyslexie, a font for individuals with dislexia.
</figcaption>


![Example of Arial Font](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/74vs2vmherx9fzxqu0ko.png)
<figcaption>
Example of Arial
</figcaption>

<p>
    However, Arial is a font that individuals with dyslexia have encountered many times. Studies have found that Arial is just as good as these specialty fonts in terms of reading comprehension and speed. So it isn't always intuitive which choices will work for a largest number of users and for that reason...
</p>

<p><em>One of the best things we can do in our teams is to run our designs by and get feedback from the individuals who will benefit from accessibility the most.</em></p>

<p>
    Font choice largely comes down to personal preference. But avoiding cursive fonts, since cursive is no longer taught in schools, or
    avoiding fonts that do not have distinct characters can be a great place to start.
</p>

<h2>Providing Options</h2>
<p>Now with the above in mind, you can do something like implementing a toggles for different fonts, but you can also do something like not locking down your CSS so that someone can utilize their own style sheets using an AT tool or Screen Reader or something that would allow them to control how the page looks.</p>


![Illustration of computer surrounded by individuals who benefit from accessibility.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3fqicc3eohfpqps484zc.png)

<h1>Conclusions</h1>

<p>Accessibility is a crucial aspect of web development that is often overlooked due to the fast pace of most bootcamp programs. However, it is an important area for new developers to focus on as it helps make applications, websites, and products useful for a wider audience, including those with physical, cognitive, and visual disabilities. Developing with great accessibility doesn't take extra time <em>most
of the time</em>, it just requires an awareness of a few basic principles, and that awareness can actually help us make decisions more easily about where to put what and how to do things. Hopefully, this brief introduction to key terms and concepts, and overview of how to develop and incorporate an accessibility plan will help you as you encounter new codebases and begin to make more specific decisions with
regard to accessibility. If I've learned anything from Carie Fisher's seminar, it's that having a broad understanding of accessibility will go a lot further than any one technology or practice could! By making accessibility a priority, we can create a more inclusive and accessible digital world for all.</p>

<p>I hope this overview helps someone develop a more well-rounded understanding of accessibility. Take care!</p>
<p>-Elliot</p>