Imagine you go to your favorite website and you can’t use it, because it wasn’t built with the way you would use it in mind.
This is the situation that many people with disabilities face when they try to use the internet today. That’s why I wanted to write about and dig deeper into what web accessibility means today.
What Is Web Accessibility?
It’s easy to fall into the trap of thinking that all our users will have the same abilities, or that they’ll always be able to use a cursor to interact with our site. Every user is going to have a unique experience, and this is important to keep in mind when thinking about accessibility.
Creating an accessible website means making a site available to everyone, so they can use all of the site’s functionality regardless of whether they have a disability.
Types of Disabilities
When we talk about disability, we first need to think about how long the disability lasts.
It can be situational — a limitation caused by a situation (you’re carrying something in one hand and can only use one hand to browse), temporary — a limitation from an accident or illness (you broke your arm and can only use the mouse or keyboard), or permanent — you live with a disability for the rest of your life.
Then we need to think about the types of disabilities a user might have. For this, I want to reference statistics from disabilitycompendium.
- 2% of the population has some type of vision disability
- 50% of the population has vision errors
- 8% have color vision deficiency
- 2% of adults have hearing disabilities
- 4% have cognitive disabilities
What Other Interfaces Are Used to Browse the Internet
Depending on the disabilities a person has, they’ll use an interface that lets them use the internet. These include:
Screen reader — for people who can’t see, this device reads the screen’s content using a sound synthesizer.
Braille reader — for people who can’t see and/or hear, it allows them to feel what’s on the screen with their fingers.
Voice control or eye tracker — for people with motor disabilities.
Simple interfaces — for people with mental impairments (dyslexia, autism), they don’t necessarily need special hardware. It depends on how complex the site they’re visiting is — they need simple sites.
Accessibility Guidelines
The W3C has Web Content Accessibility Guidelines (WCAG).
This is a guide for building accessible interfaces based on 4 principles:
Four Principles:
- Perceivable: Help people see or hear web content in the browser or using a screen reader.
- Operable: Provide the ability to interact with the website’s content using the keyboard, mouse, or an assistive device.
- Understandable: Have a clear and comprehensible interface.
- Robust: Content can be accessed from a wide range of devices.
They also provide a checklist you can use to check if you meet these guidelines.
How to Build Accessible Interfaces
While building your interfaces, you can also use a set of tools to test your website’s accessibility. Some of them include:
- Axe: You can use it as a Chrome/Firefox extension, or you can use it as a script if you want to automate the testing process.
- eslint-plugin: You can use an eslint plugin that tells you about common mistakes you’re making and how to fix them.
- Lighthouse: Inside Chrome’s developer tools, you can find the audit tab where you can audit your site’s accessibility.
Implementing these or other tools in your build process will help you improve your site’s accessibility, but the reality is that the best test you can do is to test your application with people who have some type of disability and understand how they use your application.
Resources
Some good resources for learning about accessibility:
Conclusion
The internet is incredibly important today for many aspects of our lives (education, employment, health, recreation, etc.). Creating an accessible web will improve people’s lives and provide equal opportunities.
Something that concerns me is how few resources there are on this topic. I think as programmers we can influence change. Some actions that can help improve this are:
- Caring that the sites we build are accessible.
- Pushing for web development courses to include accessibility topics.
- Including people with some type of disability in user testing.
Would you like me to talk more about accessibility?