The most popular accessibility standard for developers is currently the Web Content Accessibility Guidelines (WCAG) 2.1.
According to WCAG, their purpose is to make “Web content more accessible to people with disabilities. Accessibility involves a wide range of disabilities, including visual, auditory, physical, speech, cognitive, language, learning, and neurological disabilities.”
I won’t go into detail, but for the sake of a summary, here are some highlights of what WCAG 2.1 addresses:
- Images — Add alt tags that properly describe all images. This allows a visually impaired user to fully understand what is on the page, since the alt text will be available to their screen readers.
- Font size adjustments — Visually impaired users should be able to increase font size by up to 200% without any loss in readability or functionality.
- Keyboard accessibility — Users should be able to navigate the entire website using only a keyboard. For example, someone should be able to use the Tab key to cycle through all links on a page if they cannot operate a mouse.
- Flashes — No webpage should have anything that flashes more than three times per second to avoid inducing photosensitive seizures.
- Contrast — WCAG has numerous contrast recommendations to ensure all text and images are visible to color-blind users. For example, text and the background on which it sits should have a contrast ratio of at least 4.5:1.
- Distinguishability — WCAG discourages the use of color alone to differentiate things like inline links or important content. For example, if you have an inline link in the middle of a paragraph that is styled exactly like the font around it except for its color, a color-blind or visually impaired user will likely not be able to distinguish it as a clickable element.