Web Accessibility Explained: Designing for Everyone
What web accessibility means, who it helps, how the WCAG guidelines work and where to start on your own site.
Key takeaways
- Accessibility serves people with permanent, temporary and situational limitations, which at some point includes almost everyone.
- The Web Content Accessibility Guidelines (WCAG) are organized around content that is perceivable, operable, understandable and robust.
- Native HTML elements give you a great deal of accessibility for free, and custom widgets take it away unless rebuilt carefully.
- Automated checkers catch only part of the problem, so keyboard, zoom and screen reader testing are essential.
- Accessibility is easiest when planned from the start and maintained as content changes.
Web accessibility means building sites that people can perceive, understand and operate regardless of how they see, hear, move or think. In practice that covers things such as text alternatives for images, captions for video, enough color contrast, full keyboard control, clear labels and pages that survive being zoomed. Most of it comes from using HTML as intended and testing with more than a mouse and good eyesight.
This article explains who benefits, what the main guidelines say, which fixes matter most and how to check your own pages.
Who it helps
People use the web in many ways. Someone who is blind may use a screen reader, software that reads the page aloud or sends it to a braille display. Someone with low vision may enlarge text to several times its size. A person who can't use a mouse may use a keyboard, switch device, voice control or eye tracking. Deaf and hard-of-hearing people rely on captions and transcripts. People with cognitive or learning differences benefit from plain language, predictable layouts and no time pressure.
Limitations are also temporary or situational. A broken wrist, a bright sunny day, a noisy train, a slow connection or a parent holding a baby all change what someone can do. Design that works for the permanent cases tends to help the others.
The four principles
WCAG is published by the World Wide Web Consortium (W3C). Its success criteria are grouped under four principles, often shortened to POUR.
Each criterion has a level: A (the basics), AA (the usual target for organizations and laws) and AAA (stricter, often not achievable for every kind of content). WCAG 2.2 builds on 2.1 and 2.0, adding criteria on topics such as focus visibility and target size. Work toward AA unless a specific rule tells you otherwise, and pick the newest version your obligations allow.
Why the law may apply to you
Many countries require accessibility for public sector sites, and often for private businesses too. Examples include the Americans with Disabilities Act and Section 508 in the United States, and the European Accessibility Act, which covers a range of products and services including e-commerce. Details, exemptions and deadlines differ and continue to be interpreted by courts and regulators. Accessibility law and the web gives an overview, and a lawyer can tell you what applies to your organization.
Compliance is only one reason. Accessible pages tend to be easier to use, easier for search engines to read and cheaper to maintain.
Start with real HTML
The cheapest accessibility win is using the element made for the job. A <button> can be reached with the keyboard, activates with Enter and Space and is announced as a button. A clickable <div> does none of that until you add every behavior yourself.
| Need | Use | Avoid |
|---|---|---|
| Trigger an action | <button> | Styled div or span |
| Go somewhere | <a href> | Button that changes location by script |
| Page outline | h1 to h6 in order | Big bold text posing as headings |
| Form field name | <label> tied to the input | Placeholder text only |
| Tabular data | <table> with header cells | Layout made of spaces or images |
| Page regions | header, nav, main, footer | Unlabeled containers |
ARIA attributes can describe custom widgets to assistive technology, but they add no behavior. A common rule of thumb is that no ARIA is better than wrong ARIA. Reach for it when HTML has no suitable element, and follow established patterns. HTML, CSS and JavaScript explains the division of labor.
Fix the problems people hit most
A short list covers a large share of real trouble:
- Images without alternatives. Describe meaningful images and mark decorative ones with an empty
alt. See writing useful alt text. - Low contrast. Pale gray text fails many readers. See color contrast and readability.
- Keyboard traps and invisible focus. Every control must be reachable and show where you are, as in keyboard navigation and focus.
- Unlabeled forms and vague errors. Name each field and explain how to fix mistakes.
- Layouts that break when zoomed. Content should reflow rather than require sideways scrolling.
- Video without captions. Auto-generated captions need human correction.
- Meaning carried by color alone. Add text, icons or patterns.
- Motion and autoplay. Give controls and respect reduced-motion preferences.
Also set the page language with the lang attribute, give every page a distinct title and make link text meaningful out of context.
Forms, the place where barriers cost most
Forms are where visitors try to do something, so a barrier there stops a purchase, an application or a message. Give every field a visible label that stays visible while typing. Group related choices, such as a set of radio buttons, with fieldset and legend so the question is announced with each option.
Tell people the rules before they type: required fields, formats and password conditions. Connect hints to their fields with aria-describedby. Use autocomplete values for personal details, which helps people who find typing slow or tiring.
When submission fails, keep what was entered, say how many problems there are, and describe each in text next to its field. Don't rely on a red outline. For anything with legal or financial consequences, let people review and correct before final submission.
Media, motion and documents
Captions give the words and relevant sounds in a video, synchronized with the picture. A transcript offers the same content as text that can be searched, skimmed and read in braille. If important information appears only visually, such as a chart shown without being discussed, describe it in narration or provide an audio description.
Avoid content that flashes rapidly, which can trigger seizures in some people. Give a pause button for carousels and moving banners, and don't start sound without being asked. Large sliding or zooming effects make some people dizzy, so tone them down when the system setting asks:
@media (prefers-reduced-motion: reduce) {
.hero { animation: none; }
} For downloadable documents, export with real headings, lists, table headers and alternative text, set the document language and check the reading order. A scanned page is only a picture until it has been converted to text and corrected.
Write so people can understand
Plain language is part of accessibility. Lead with the main point, use short sentences and common words, define terms and break text with informative headings. Keep navigation in the same place across pages. Don't change context unexpectedly, for instance by submitting a form the moment someone selects a menu item.
Time limits deserve care. If a session will expire, warn people and let them extend it. Avoid verification steps that depend on solving puzzles or memorizing strings without an alternative.
Test in layers
No single method finds everything.
Browser developer tools often include accessibility inspectors and contrast readouts. Free screen readers and built-in ones are available on the major operating systems, including NVDA on Windows, Narrator on Windows and VoiceOver on Apple devices. Learn a few basic commands before judging results, and test with the browser your users are likely to pair with them.
An automated score of 100 doesn't mean a page is accessible. A tool can see that an image has alt text but not whether the text is any good.
Be wary of quick fixes
Overlay scripts that promise to make any site compliant with one line of code can't repair missing structure or poor content, and some users find that they interfere with their own assistive tools. Time and money usually go further when spent fixing the underlying pages.
Build it into your routine
Assign ownership. Add accessibility checks to design reviews, content publishing and code review. Train anyone who uploads images or documents, since a well-built site can degrade quickly through daily publishing. PDFs and other documents need headings, reading order and alternatives too, and an ordinary web page is often the better format.
When choosing a theme, plugin or website builder, test its menus, pop-ups and forms with a keyboard before committing. Third-party embeds such as chat widgets and video players are frequent sources of barriers.
Publish a short accessibility statement that says what you've tested, what you know is still broken and how someone can report a problem or get information another way. Then respond when they do. Fix the barriers that block core tasks first: reading main content, finding contact details, buying, booking or signing in. Steady improvement on those matters more than a perfect score on pages nobody visits.
Finally, ask for feedback in a way that works for everyone: an email address or a simple form, not only a chat widget that may itself be hard to use.