Accessibility is a core requirement in modern web development. Making applications usable by everyone, including people with disabilities, is the right thing to do, and in many places it’s also a legal requirement. Angular gives you good tools for this. In this guide, we’ll take a step-by-step look at how to write an accessible Angular application.
Why is accessibility important?
Accessibility refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e., unassisted) and “indirect access,” meaning compatibility with a person’s assistive technology (for example, computer screen readers).
Creating accessible applications means that your applications will reach a wider audience, including the 15% of the world’s population who live with some form of disability. It also often leads to a better user experience for everyone, disability or not.
Step 1: Understand accessibility guidelines
The Web Content Accessibility Guidelines (WCAG) is an internationally recognized set of recommendations for improving web accessibility. They provide a wide range of recommendations for making web content more accessible to people with disabilities, including blindness and low vision, deafness and hearing loss, learning disabilities, cognitive limitations, limited movement, speech disabilities, and others.
Before diving into Angular’s accessibility features, take some time to get familiar with these guidelines. They’re the reference point for everything else in this guide.
Step 2: Use semantic HTML
The foundation of an accessible web application is semantic HTML. It provides the necessary context to assistive technologies, enabling them to present content in a meaningful way. Angular’s directives map onto a wide variety of standard HTML elements, which can then be styled and interacted with in a standard way.