Quantcast
Channel: Telerik Blogs
Viewing all articles
Browse latest Browse all 5210

Web Accessibility for Developers Part II: Disability Types and Tips to Make Your Website More Accessible

$
0
0

Web accessibility is an increasingly important component of web development. In the second part of this series, we talk about types of disabilities and how you can develop accessibility for each type of user.

In the process of implementing accessibility compliance (Section 508, WCAG 2.0 and WAI-ARIA) for KendoReact, our suite of native UI components for React, we learned a lot on the topic. With this blog series, our goal is to introduce fellow engineers to web accessibility and share our practical knowledge and best practices.

Part II of this series further defines the problem, breaking the conversation down to look at the different types of disabilities and offers ideas how to build your web apps to be more accessible for each type of user.

Types of Disabilities and Accessibility Best Practices

There are four major disability types - hearing, sight, motor and cognitive disabilities. Each type includes a multitude of conditions. They cause different challenges when interacting with the web and require different approaches to solve these challenges. Let’s explore some best practices addressing each separate type of disability. You will notice that most of these practices are not about the underlying technology we use but about how we design our software. This means that everyone involved in the development process can contribute to better accessibility.

Hearing (Auditory) Disabilities

Hearing disabilities range from mild hearing loss to deafness. The best way to help these users is to avoid relying only on sound to convey critical information. Instead, add another media in parallel for support. For example, if you use video, make sure it supports subtitles with full captions. If you use audio, provide a transcript. Subtitles and transcripts should be full and not miss critical lines. In a later paragraph, we will list guidelines for readability. They strongly apply to subtitles and transcripts. In addition to this, for both video and audio, make sure background noise is minimized, so that the conveyed information is as audible as possible.

Visual Disabilities - Low Vision

The primary way to accommodate for low vision is to have a readable interface. UI elements need to be big and clear. Text is more complex, though, and in a later paragraph, we will list guidelines for readability. They are designed to assist people with low vision.

Contrast is another important aspect. High contrast between elements and colors in the UI will help people with low vision. There are tools available that examine if contrast is insufficient for people with this condition. Here you can find the tools recommended by the Web Accessibility Initiative (WAI). In most page designs used nowadays, contrast is indeed problematic. Below is an example of a high contrast theme that complies with WCAG. Such high contrast will not work well with regular themes and you would probably prefer not to sacrifice the visual appeal of your site. A good compromise is to include a high-contrast theme as an option on your website, much like the option to change the language.

High Contrast Theme

Visual Disabilities - Blindness

Blind people use screen readers. These applications parse the HTML and describe it to the user using natural language. Developing for screen readers has its specifics, so the next part in the series will focus exclusively on them. Additionally, the input device a user with blindness will work with will be different. Using a mouse requires sight. A blind person will need full keyboard support instead.

Sight Disabilities - Colorblindness

Colorblindness, too, is not a single condition. There are different types of colorblindness. Deuteranomaly is difficulty to perceive green light and is the most common. Having difficulty perceiving red light is called protanomaly and is a bit less common. The visible specters of these two conditions are somewhat similar and the conditions are more commonly known as red-green colorblindness. Tritanomaly is a problem with perception of blue colors and is very rare.

The severity of each condition also varies - they can range from a slight perception problem to full inability to perceive that color. We use the prefix -nomaly when the color perception is partially affected and – nopia when a color cannot be perceived at all. Achromatopsia is the condition of seeing everything in greyscale and is very rare. Keep in mind that explanation given here is quite simplified. Changes in color perception do not affect a single color but the whole visible spectrum.

Your initial idea may be to pick colors that most people with colorblindness can see. This is not ideal because of the numerous variations of the disability, but orange and blue work ok in most cases. This is one of the reasons why the internet loves blue so much.

There are tools that simulate how your site looks when seen by colorblind people. You can use them to detect if there is a problem and then design and add optional themes for problematic types of the condition. This still requires your user to be able to find and switch to the respective theme.

Your most efficient solution is to not rely on color alone to convey critical information. You can design around the problem by using shapes, symbols, animation and other creative means.

Motor Disabilities

Fast and/or repetitive actions, actions that require holding a button, actions with time limits - all of these are hard for people with motor disabilities and can cause physical pain. You need to avoid them, but it is not so simple. The following example illustrates why: imagine you have a slider that requires you to hold a button to move. Your solution may be to allow the slider to move by tapping a key, but if the step is too small, the result will be a repetitive action that is not much of an improvement. The general rule is you need to design a website so a user would be able to conveniently use it both with a keyboard only and with a mouse only.

Cognitive Disabilities Related to Motion Sickness and Sensory Overload (eg: Epilepsy)

There are several patterns that can cause motion sickness or sensory overload. Usually these are rapid effects such as shaking, bright lights, quickly flashed (3 times/second or faster). Repeating movement patterns, rapid or not, can cause the same issues. A good example for a repetitive but slow movement on a page is an animation of falling snow we often see around the winter holidays. Sharp changes using flashy transitions in the contents on a page are also problematic; we need to use smooth transitions instead. A good practice is to avoid problematic effects, but if you want to use them, allow users to disable them as a compromise.

Cognitive Disabilities - Learning Difficulties

Simplicity is key. Make your scenarios simple, make your interface simple and free of clutter. Use simple language, avoid fancy words. Always provide clear instructions with concise information. The amount of information should be just right – too little will not be enough but add too much and some users will get distracted. Avoid time limits that can put unnecessary pressure on the user.

Cognitive Disabilities - Dyslexia

Dyslexia is a type of disability that makes it difficult for some people to read: dyslexic people may confuse letters or see them rotated or crowded together. In the next paragraphs, we will list guidelines for readability. They strongly apply to addressing the challenges of dyslexia.

Tips on Readability

Good readability ensures your website will be accessible for a number of people with disabilities: readable subtitles and transcripts will be of help to people with hearing problems and readable text in general will be of help to people with low vision or dyslexia. A rule of thumb is to use simple and clean sans-serif font in a large font size.

Space matters. For example, long lines are hard to read, so apply a limit of 70 characters per line. For subtitles, the recommended limit is 35 characters. Provide enough space for characters to breathe - 1.5x line spacing is ok. On the topic of space, text in all capital letters is hard to read, so use mixed case. Reading speed also matters, so do not advance text automatically or in the case of subtitles - keep them on the screen for at least 0.3 seconds per word.

A key part of the puzzle is contrast. Background images usually obscure text. Good fonts have a border around the letters to enhance contrast, but it is even better to avoid background images altogether and provide a solid background that contrasts well with the text.

The IT industry has created awesome and free specialized fonts that are optimized for readability. You may consider some of them. Opendyslexic and Inter are good examples.

Conclusion

Accessibility is such a difficult problem to solve primarily because it consists of so many scenarios with individual solutions. But even if you know about all of the different types of disabilities, it is still very hard to keep in mind so many independent variables and come up with a solution that works for all. The good news is that a lot of the time accessibility is not about complex technological implementations but can be addressed by relying on simple design principles. In KendoReact, we try to follow them as much as possible.

In the next part of this series, we will share with you our experience with screen readers and offer some more tips. 

The Whole Series

  • Part 1: An introductory article on web accessibility that attempts to answer what accessibility is and why it matters.
  • Part 3: Technical Best Practices. This part is technically oriented and focuses on working with screen readers. (coming up)
  • Part 4: More Best Practices and Resources. Here we go over more practices about organizing our workflow and further explore how to make this daunting task manageable. (coming up)

Viewing all articles
Browse latest Browse all 5210

Trending Articles